eleni@23: uniform sampler2D depth_tex; eleni@23: eleni@23: void main() eleni@23: { eleni@23: float depth = texture2D(depth_tex, gl_MultiTexCoord0.xy).r; eleni@23: vec4 vpos = gl_Vertex; eleni@23: vpos.z = depth; eleni@23: eleni@23: gl_Position = gl_ModelViewProjectionMatrix * vpos; eleni@23: gl_TexCoord[0] = gl_MultiTexCoord0; eleni@23: }