glsl09
09-15-2010, 11:38 AM
hello
i want to use depth texture for shadow mapping.first pass I render scene from point of light view then copy depth result to depth texture. the second pass i render depth texture onto full screen quad to see wheter everything is working or not. but i get wrong result if i add the folowing line in texture objetct creation
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
if i remove the above line in the texture object creation. i get correct depth texture expected. how can i fix problem.
thanks in advance
i want to use depth texture for shadow mapping.first pass I render scene from point of light view then copy depth result to depth texture. the second pass i render depth texture onto full screen quad to see wheter everything is working or not. but i get wrong result if i add the folowing line in texture objetct creation
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
if i remove the above line in the texture object creation. i get correct depth texture expected. how can i fix problem.
thanks in advance