View Full Version : can not update shadow-map

08-24-2005, 08:30 PM
i use a shadow map for order-independent transparency. it is basicly the same as shadow mapping with the light's position at the viewer's position.
i create a tex_object_rectangle with

glTexImage2D(m_ztex.target, 0, GL_DEPTH_COMPONENT, m_ScreenWidth, m_ScreenHeight, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, NULL);

then i render the scene and save the depth values with glCopyTexSubImage().

now i render a quad with a cg fragment shader which takes the depth texture and displays its values' absolutes as rgb. now i should see the scene which i have drawn first but with the depth values as color. but everything is white. first i thought the depth values might be clamped between 0 and 1, but when i render a triangle at z=0.2 the shadow-map is white, too.