View Full Version : Depth texture and register combiners..

04-30-2003, 05:47 AM
Anyone else experienced problem with a texture containing depthvalues, the depth texture mode, and nv_reg_combiners together?

I copy the depthbuffer from the current context, bind the texture, set glTexParameteri(GL_TEXTURE_2D, DEPTH_TEXTURE_MODE_ARB, GL_LUMINANCE); which i think is the default? then i try to use the RGB part as input to a regcombiner variable.. and i get nothing!

If i change the RGB to get Alpha insted ( not changing the texparameter call) it works..

Have i missed something in the spec? have i missread anything, or is this a bug?

04-30-2003, 05:57 AM
Look at "[Table NV_register_combiners.2]: Correspondence of texture components
to register components for texture registers" in the NV_register_combiners spec.
If TEXTURE_COMPARE_SGIX is false (and I assume this also applies to TEXTURE_COMPARE_MODE_ARB being NONE) a texture register containing a value of a texture with DEPTH_COMPONENT internal format will have RGB components all 0 and the luminance in the alpha component.

[This message has been edited by Asgard (edited 04-30-2003).]

04-30-2003, 09:03 AM
So, im just a bad reader http://www.opengl.org/discussion_boards/ubb/smile.gif thanks