DZ4__
07-18-2011, 05:46 AM
Hi,
I'm trying to implement a cross-platform shadowmap DirectX10/OpenGL.
When I'm fetching the same depth texture within the same conditions I get Z values near to 0.5f for objects near to the camera with OpenGL while they are closed to 0.1f with DirectX version. I have verified all other computations. All results are identical but the value returned by the texture lookup. (Of course I've verified the computed UV is correct as the y coordinate for a render target is not the same for Dx10 and OGL)
For information, my Z-texture is a 32 bits one, I've ensured the GL_TEXTURE_COMPARE_MODE is set to GL_NONE and tried to set the GL_DEPTH_TEXTURE_MODE to GL_INTENSITY. But now I really don't know what could give me these bad values.
Thanks for help...
I'm trying to implement a cross-platform shadowmap DirectX10/OpenGL.
When I'm fetching the same depth texture within the same conditions I get Z values near to 0.5f for objects near to the camera with OpenGL while they are closed to 0.1f with DirectX version. I have verified all other computations. All results are identical but the value returned by the texture lookup. (Of course I've verified the computed UV is correct as the y coordinate for a render target is not the same for Dx10 and OGL)
For information, my Z-texture is a 32 bits one, I've ensured the GL_TEXTURE_COMPARE_MODE is set to GL_NONE and tried to set the GL_DEPTH_TEXTURE_MODE to GL_INTENSITY. But now I really don't know what could give me these bad values.
Thanks for help...