ravage
08-22-2010, 12:08 PM
I was following the code from:
website (http://mynameismjp.wordpress.com/2009/03/10/reconstructing-position-from-depth/)
I'm a bit confused about these lines from the shader
out_vTexCoord = in_vTexCoordAndCornerIndex.xy;
out_vFrustumCornerVS = g_vFrustumCornersVS[in_vTexCoordAndCornerIndex.z]; (actually this line)
the shader is hlsl but it really no big deal to convert this to glsl but I'm a little confused about using in_vTexCoordAndCornerIndex.z for the index lookup.
Is it that the texcoord is an interpolation of when they did the depth stored in the texcoord?
website (http://mynameismjp.wordpress.com/2009/03/10/reconstructing-position-from-depth/)
I'm a bit confused about these lines from the shader
out_vTexCoord = in_vTexCoordAndCornerIndex.xy;
out_vFrustumCornerVS = g_vFrustumCornersVS[in_vTexCoordAndCornerIndex.z]; (actually this line)
the shader is hlsl but it really no big deal to convert this to glsl but I'm a little confused about using in_vTexCoordAndCornerIndex.z for the index lookup.
Is it that the texcoord is an interpolation of when they did the depth stored in the texcoord?