Fragment Shaders

I know the ARB is trying hard to get the spec for ARB_vertex_program into the 1.4 specification. But do they have any intent on creating a vendor independent extension for fragment shaders??

If they ever want to catch up to Direct3D in the ease of programming programmable graphics hardware before OpenGL 2.0 there needs to be a hardware independent way to write fragment shaders aswell as vertex programs!

Unfortunately, that’s not likely. Thanks to D3D’s vertex shader specification, both nVidia and ATi have built vertex processing hardware that do virtually the same thing. Therefore, creating an OpenGL extension that does what their hardware does is relatively simple.

However, note that even D3D’s pixel shaders aren’t platform-independent. Oh, sure, you can querry the hardware as to which version of pixel shaders it supports, but you have to write different shaders on different hardware. This is because of the very fundamental differences between what the per-fragment operations are on the various cards.

Building a cross-platform fragment shader that is more powerful than the current env_combine paradigm is virtually impossible. The significant difference between pixel shaders and env_combine extensions is texture addressing operations. And, since neither platform supports the other’s texture ops (ATi’s does the more reasonable thing, allowing you to define your own ops, while nVidia has a set of macro-ops), you can’t put together an extension that melds the two.

Granted, with D3D 9’s pixel shaders on the horizon, those bugs should be worked out. That won’t help any of us with older hardware. Besides, D3D 9 hardware will be arriving about the same time that the OpenGL 2.0 spec is approved. Hopefully, 2.0 will be flexible enough to allow D3D 9 hardware to run vertex and pixel shaders on it.

Yes I understand your point about different vendor’s requiring different versions of pixel shaders in DX8. But the main advantage they have is their ability to write them all in a “standard” assembly like language. NV_texture_shader and ATI_fragment_shader use totally different syntax making it very confusing to write shaders for various hardware.

So i guess what I was asking was will their be an extension that lets us OpenGL programmers write shaders for various hardware in a “standard” syntax?

>>>However, note that even D3D’s pixel shaders aren’t platform-independent. Oh, sure, you can querry the hardware as to which version of pixel shaders it supports, but you have to write different shaders on different hardware. This is because of the very fundamental differences between what the per-fragment operations are on the various cards.
<<<

Why not? What is the state of the D3D pshader now and the hardware support. There was a 1.3 -> 1.4 thing happening.

The problem I guess is that DX is a beast that requires constant refining.

V-man