PDA

View Full Version : Cg useless until GeForce5 ?



Rml4o
06-13-2002, 11:17 AM
I have been reading the Cg user manual, and I was very disappointed to see that at the moment, with OpenGL, you can only make vertex programs with Cg, and not what they call Fragment programs (since there is no profile for them yet).
This means that we will have to wait until december (new GeForce or whatever they will call it) to get rid of the rigid register combiner design...

Nutty
06-13-2002, 11:45 AM
Why can't a profile be made for RC's. Surely DX pixel shaders aren't much different from NVParse style RC's?

Rml4o
06-13-2002, 11:56 AM
In fact, I guess that the RC system too rigid to be used through Fragment Programs.
(NVparse is far too limited to be considered a fragment program compiler)
For instance, with these programs, you could make complex operations on texture coordinates before accessing a texture. If this were possible with a GeForce3 under OpenGL, the current extensions could do it.
And we know they can't...
But I agree with you, and I don't understand why fragment programs (or even pixel shaders) exist for DX and not for OpenGL...

Nutty
06-13-2002, 12:26 PM
Well you could argue, that theres nothing stopping you writing incredably complex vertex programs on NV20 hardware, except the manual says you need to be careful about hardware limits. Why not just apply the same discipline to a NV20 GL RC profile?

Nutty

davepermen
06-14-2002, 01:06 AM
Originally posted by Rml4o:
In fact, I guess that the RC system too rigid to be used through Fragment Programs.
(NVparse is far too limited to be considered a fragment program compiler)
For instance, with these programs, you could make complex operations on texture coordinates before accessing a texture. If this were possible with a GeForce3 under OpenGL, the current extensions could do it.
And we know they can't...
But I agree with you, and I don't understand why fragment programs (or even pixel shaders) exist for DX and not for OpenGL...

a) its comming, they just didn't finished it yet

b) in gl fragment programs / pixel shaders do exist, they are called nv_texture_shader and nv_register_combiners, just if you don't know this yet.
they have the superior feature set to pixelshaders in dx, but i guess for the highlevel language they have to drop this superior power again to make it easy workable (you really have to know rc's if you want to get more power of them, knowing where what automatically happens..)

i want one for gf1/2, as they do have pixelshaders, just no programable texturelookups..

richardve
06-14-2002, 01:30 AM
GL_NV_fragment_program ...

Rml4o
06-14-2002, 04:44 AM
Thanks davepermen, I know register combiners and texture shaders (I make an extensive use of them http://www.opengl.org/discussion_boards/ubb/smile.gif ), and I do agree with you about their huge power. But I'm just looking forward to seing the appropriate Cg profile...

dorbie
06-14-2002, 06:36 AM
Have you looked at the Cg shader examples?

Stuff like this:




fragout OUT;

[snip]

//compute final color (diffuse + ambient)
OUT.col = color * mad(shadow, uclamp(dot3_rgba(bumpNormal.xyz, lightVector.xyz)), Ambient.xxxx);


Works on my GeForce3 and certainly counts as fragment shading (it IS doing this on the fragments), not just vertex.

[This message has been edited by dorbie (edited 06-14-2002).]

Jeeeez
06-14-2002, 08:00 AM
After reading the specs and manual, I just want to clarify one thing:

If your video card does not support the nv_vertex_program extension, cg wont work...correct? I mean, if you are using opengl, you can only use cg with this extension?

okapota
06-14-2002, 08:22 AM
so, i dont get it, this beutifull thing is not fully avilable to openGl for now? ooof.
and when the NV30 will be out they will release a full opengl profile? i at least hope this profile will fit to older generation cards.

jwatte
06-14-2002, 02:18 PM
I doubt Cg will work on older cards. OpenGL is quite sufficient at describing their capabilities. You can't go back and re-wire the hardware to do more after the fact.

Well, you didn't use to be able to, until the advent of the programmable graphics revolution :-)

okapota
06-15-2002, 06:16 AM
when saying old cards i mean geforce4.