Cg useless until GeForce5 ?

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…

Why can’t a profile be made for RC’s. Surely DX pixel shaders aren’t much different from NVParse style RC’s?

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…

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

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…

GL_NV_fragment_program …

Thanks davepermen, I know register combiners and texture shaders (I make an extensive use of them ), and I do agree with you about their huge power. But I’m just looking forward to seing the appropriate Cg profile…

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).]

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?

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.

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 :slight_smile:

when saying old cards i mean geforce4.