Nvidias CGFX for Linux floating around
- Lee04
- Minaton
- Posts: 945
- Joined: Mon Jul 05, 2004 4:06 pm
- Location: Sweden
- x 1
Nvidias CGFX for Linux floating around
Hi
CGFX 1.3 will be available for Linux as well as PC.
Some people are already testing CGFX on Linux even....
Have anyone done this? Tried it I mean?
CGFX 1.3 will be available for Linux as well as PC.
Some people are already testing CGFX on Linux even....
Have anyone done this? Tried it I mean?
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
I've found (and reported) bugs with both Cg 1.2 and Cg 1.3, unfortunately the Cg 1.3 one is pretty fatal (can't compile any vs_1_1 shaders with the '-profile-opts dcls' option in cg.dll, only on the the command line), but I've not received any updates from nVidia on it yet.
I can only assume it only happens when you use just cg.dll to generate assembler, rather than using the D3D/GL specific Cg runtime dlls to set the renderstate in D3D / GL for you (which we don't want to do).
I can only assume it only happens when you use just cg.dll to generate assembler, rather than using the D3D/GL specific Cg runtime dlls to set the renderstate in D3D / GL for you (which we don't want to do).
- Lee04
- Minaton
- Posts: 945
- Joined: Mon Jul 05, 2004 4:06 pm
- Location: Sweden
- x 1
Sorry
Hi Sinbad
Sorry for not being clearer in my posts
What I mean is Ogre can use FX know because there is a Linux version
of CGFX Nvidias free SDK for loading and using FX files.
Hopes this awakens you from all resource programming you are doing...
that seams to make you wery..
Sorry for not being clearer in my posts
What I mean is Ogre can use FX know because there is a Linux version
of CGFX Nvidias free SDK for loading and using FX files.
Hopes this awakens you from all resource programming you are doing...
that seams to make you wery..
-
- OGRE Retired Team Member
- Posts: 1263
- Joined: Wed Sep 24, 2003 4:00 pm
- Location: Halifax, Nova Scotia, Canada
CGFX1.3 is a nice shader editor and having the capability to import its output into Ogre would be nice for a lot of people. But Ogre material files are much more flexible and do more than FX files so I don't seeing FX files being supported by the core library (my opinion). I see this being a community effort to develop a converter from FX to .material script.
- Lee04
- Minaton
- Posts: 945
- Joined: Mon Jul 05, 2004 4:06 pm
- Location: Sweden
- x 1
Yeh
FX is here to stay I am afreid. And CGFX looks like a free lunch.
Must tools I know off DCC apc shader editors etc supports FX files.
So should Ogre I belive, how it does it is another matter.
I would like to see full support for FX.
Think of having crazy eddies GUI with sliders in Ogre for all parameters...
Would be nice.
Games and apps could have communities remaking new "skins" for games and apps made with Ogre.
Maybe a bit far fetched but FX is good and CGFX is almost a free lunch.
Must tools I know off DCC apc shader editors etc supports FX files.
So should Ogre I belive, how it does it is another matter.
I would like to see full support for FX.
Think of having crazy eddies GUI with sliders in Ogre for all parameters...
Would be nice.
Games and apps could have communities remaking new "skins" for games and apps made with Ogre.
Maybe a bit far fetched but FX is good and CGFX is almost a free lunch.
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
- Lee04
- Minaton
- Posts: 945
- Joined: Mon Jul 05, 2004 4:06 pm
- Location: Sweden
- x 1
Just to be sure
I just want too say that CGFX works for OpenGL as well just as good.
CGFX makes HLSL and CG work both in DX and openGL.
And supplies APIs for both.
But it dosn't support GLslang (openGL shader language) right know.
However DX don't support openGL shader so.
I rather use HLSL or CG that works in both openGL and DirectX on both Linux PC and perhaps later Mac than waiting around for openGL shader languages to start working in DirectX....
I just want too say that CGFX works for OpenGL as well just as good.
CGFX makes HLSL and CG work both in DX and openGL.
And supplies APIs for both.
But it dosn't support GLslang (openGL shader language) right know.
However DX don't support openGL shader so.
I rather use HLSL or CG that works in both openGL and DirectX on both Linux PC and perhaps later Mac than waiting around for openGL shader languages to start working in DirectX....
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
Yeah, my point was that you culd support both with one converter if you put your mind to it, since the syntax of CgFX is identical to .fx (since MS worked with nVidia on it), and it's just text after all. And that's a bonus because tools like RenderMonkey only support .fx,so with a converter like that you could support far more than just CgFX.
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
Pretty much, although really it's Cg which implements the HLSL (ie the shader), CgFX adds all the extra cruft like state setting etc - all the stuff .material lets you do.
There are a few more commands available in Cg than in HLSL to deal with some nVidia-specific profiles, and you have to transpose the matrices since HLSL uses the same stupid transposed matrices of D3D itself ie you have to do V * M1 * M2 instead of he more 'standard' (if you read most maths texts) M2 * M1 * V, but otherwise yes.
There are a few more commands available in Cg than in HLSL to deal with some nVidia-specific profiles, and you have to transpose the matrices since HLSL uses the same stupid transposed matrices of D3D itself ie you have to do V * M1 * M2 instead of he more 'standard' (if you read most maths texts) M2 * M1 * V, but otherwise yes.
- Lee04
- Minaton
- Posts: 945
- Joined: Mon Jul 05, 2004 4:06 pm
- Location: Sweden
- x 1
Tools , tools tools
Most of todays tools produce or/and loads FX files.
CGFX has one API for DirectX and one API for OpenGL.
And then a common API part.
CGFX has one API for DirectX and one API for OpenGL.
And then a common API part.
Last edited by Lee04 on Mon Dec 13, 2004 8:49 am, edited 1 time in total.
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
Re: Tools , tools tools
.. none of which we can use. The trouble with this API is that it wants to control the state pipeline, which is useless to us.Lee04 wrote:CGFX has one API for DirectX and one API for OpenGL.
And then a common API part.
The only thing that's useful to us is the format. It needs to be converted to .material to be any use in Ogre.
- :wumpus:
- OGRE Retired Team Member
- Posts: 3067
- Joined: Tue Feb 10, 2004 12:53 pm
- Location: The Netherlands
- x 1
A FXToOGREMaterialConverter would be a cool thing to have; I don't vote for internal FX support. Just a design decision to keep the core "light" and independent, and make it easier to include ogre-specific stuff; we also only support one .mesh format internally.
Adding HLSL support to the CG plugin is on my todo list for post 1.0 now.
Adding HLSL support to the CG plugin is on my todo list for post 1.0 now.
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
I'm confused - what I meant was that Cg essentially is HLSL, or at least a superset of it. The only thing you have to do is transpose your matrix operations to get around the D3D-ness of it. I've converted several HLSL shaders to Cg just by doing that, so I don't think you really have to do anything here, at least on the HLSL end.:wumpus: wrote:Adding HLSL support to the CG plugin is on my todo list for post 1.0 now.
-
- Halfling
- Posts: 71
- Joined: Mon Aug 09, 2004 8:28 pm
- Location: Austria
Just for info
Cg will not support Shader Model 3.0 in the near future for Direct3D (ps_3_0 and vs_3_0), there will be only Cg support for OGL (fp40 and vp40)
This information is directly from Nvidia. I have asked them when CgRuntime will support SM3.0, and that was the answer.
So Ogre should be HLSL compatible not only in same syntax.
Cg will not support Shader Model 3.0 in the near future for Direct3D (ps_3_0 and vs_3_0), there will be only Cg support for OGL (fp40 and vp40)
This information is directly from Nvidia. I have asked them when CgRuntime will support SM3.0, and that was the answer.
So Ogre should be HLSL compatible not only in same syntax.
-
- Gnoblar
- Posts: 1
- Joined: Thu Dec 23, 2004 12:06 am
I've tried to use CgFX as my solution for all the materials in an engine i was developing, and i didn't like it because:
1) They haven't yet implemented all the functionality of Microsoft's FX.
2) They haven't done a full documentation (just a couple of readmes and introduction documents).
3) NVidia seems to be focusing more on Microsoft's FX (with tools such as FX Composer) than on improving their own.
Anyway, Ogre material system is more powerful, so I don't see much the point of using an FX format.
Even with the standarized semantics and annotations, we cannot use any effect everywhere, yet. Many effects created with external tools cannot be used as-is in an engine, we are far from being able to universalize shaders. A serious developer still has to write materials/effects/shaders with a specific rendering engine in mind.
1) They haven't yet implemented all the functionality of Microsoft's FX.
2) They haven't done a full documentation (just a couple of readmes and introduction documents).
3) NVidia seems to be focusing more on Microsoft's FX (with tools such as FX Composer) than on improving their own.
Anyway, Ogre material system is more powerful, so I don't see much the point of using an FX format.
Even with the standarized semantics and annotations, we cannot use any effect everywhere, yet. Many effects created with external tools cannot be used as-is in an engine, we are far from being able to universalize shaders. A serious developer still has to write materials/effects/shaders with a specific rendering engine in mind.
-
- Gnoblar
- Posts: 10
- Joined: Thu Dec 23, 2004 5:58 pm
FX Composer for Linux
-------------------------------------------------------------------------------------------
> Do you plan to release FX Composer 1.6 for Linux?
The current version of FX Composer helps developers create HLSL shaders
using the DirectX .FX file format.
We have no plans to port FX Composer to Linux.
William Ramey
NVIDIA Corporation
-------------------------------------------------------------------------------------------
Bye!
Mash
> Do you plan to release FX Composer 1.6 for Linux?
The current version of FX Composer helps developers create HLSL shaders
using the DirectX .FX file format.
We have no plans to port FX Composer to Linux.
William Ramey
NVIDIA Corporation
-------------------------------------------------------------------------------------------
Bye!
Mash
-
- Halfling
- Posts: 71
- Joined: Mon Aug 09, 2004 8:28 pm
- Location: Austria
- Lee04
- Minaton
- Posts: 945
- Joined: Mon Jul 05, 2004 4:06 pm
- Location: Sweden
- x 1
Well it dosn't say that CGFX won't support ps30 is simply says that it uses fp40 to implement iy.Shader model 3.0 is supported by Cg under OpenGL through the fp40 profile.
We don't have any plan to add a ps_3_0 profile at this time.
Best regards,
Cyril Zeller
NVIDIA Developer Technology
So ps3.0 can still be used with cgfx right?
A tool such as fx composer dosn't neccerally have to run on all platforms.
Specials tools can run on very abscure systems and people will use the tool any way if they are the only tool. Windows are not so absqure so I think fx composer is OK for being a tool.
Have you seen RT/Shader:Ginza?