Original Post
Hello! Can anybody explain me how I can look on my depth map?? I create .cgfx file and use a technique with two passes. In this moment the first pass is empty only color push through it. After this render pass I take my depth value and save them in a map. pass = cgGetFirstPass(myCgTechnique); while (pass) { cgSetPassState(pass); glutSolidTeapot(5.0f); // copy the z glBindTexture(GL_TEXTURE_RECTANGLE_NV, depth_texture); glCopyTexSubImage2D(GL_TEXTURE_RECTANGLE_NV, 0, 0, 0, 0, 0, m_width, m_height); cgResetPassState(pass); pass = cgGetNextPass(pass); } All I want to do is to render this depth map. For that,I make a texture lookup im my second pass. And set my output color value to depth value. But in this point I realy don't know how to transform the depth value into RGBA values?? I just try some possibilities, but the teapot stays white!!!!!!! // final pixel shader void PSfinal(float4 Pos: POSITION, float4 color:COLOR, float4 wpos: WPOS, out float4 out_color:COLOR, uniform samplerRECT depthTex) { float4 depth= texRECT(depthTex,wpos.xyz); out_color=float4(depth.x,depth.y,depth.z,depth.w); //OR //out_color=float4(depth.x,depth.x,depth.x,1); } Thanks for help Froni