PDA

View Full Version : GL_TEXTURE_SHADER_NV equivalent in ATI ????



Bruno
04-26-2003, 12:50 PM
Hi..,


I have a piece of my code working using nvidia texture shaders, but i would like to support ATI also., so, anyone knows if there is a similar extension in ATI that works as gl_texture_shader_nv from Nvidia ?

thanks,

Bruno

zeckensack
04-26-2003, 12:56 PM
ATI_fragment_shader offers functionality for dependant reads, unified with combiner stuff.
In a way it's the sum of NV_texture_shader and NV_register_combiner.
But note that there are setups for both that are impossible to do on the other, ie squeezing the last bit of functionality out of NV_register_combiners leads to a shader that cannot be done on R200 hardware and vice versa.

Bruno
04-26-2003, 01:39 PM
glEnable(GL_TEXTURE_SHADER_NV);
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_CULL_FRAGMENT_NV);
GLint CullMode[4] = {GL_GEQUAL, GL_GEQUAL, GL_GEQUAL, GL_GEQUAL};
glTexEnviv(GL_TEXTURE_SHADER_NV, GL_CULL_MODES_NV, CullMode);
glDisable(GL_TEXTURE_SHADER_NV);

Can someone that has experience with ATI code , please translate this to ATI_fragment_shader ?
It's really simple, should be simple in ATI too, it just clips away all negative coords in Q, while preserving (S,T,R).

thanks,

Bruno


[This message has been edited by Bruno (edited 04-26-2003).]

vincoof
04-26-2003, 02:05 PM
ATi's fragment shaders do not support fragment culling. At best you could set the alpha channel to zero, which would result in a no-fragment operation if alpha testing or blending is enabled with some appropriate params.

Fragment culling is one of the rare features that NV_texture_shader provide and ATI_fragment_shader does not.

NitroGL
04-26-2003, 04:22 PM
Originally posted by vincoof:
Fragment culling is one of the rare features that NV_texture_shader provide and ATI_fragment_shader does not.

Yup. The other is depth replacement.

zeckensack
04-26-2003, 05:18 PM
Originally posted by NitroGL:
Yup. The other is depth replacement.Which kinda stinks, given that they do expose it under DX Graphics.
I tried lobbying for that a while back (http://www.rage3d.com/board/showthread.php?threadid=33634481&highlight=depth+replace) , but I was denied.