Commit c72fbad5 authored by Jan Möbius's avatar Jan Möbius

Convert z buffer data to the 42 display data

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7484 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7635ee57
......@@ -15,7 +15,11 @@ void main(void)
gl_FragColor = texture2D( ColorTexture, gl_TexCoord[0].st );
} else {
gl_TexCoord[0].s = (gl_TexCoord[0].s - 0.5) * 2.0;
gl_FragColor = texture2D( DepthStencil, gl_TexCoord[0].st );
vec4 convert = texture2D( DepthStencil, gl_TexCoord[0].st );
// This conversion is specified in the docs for a 42'' Display
convert.rgba = (-1960.37 *( 1.0 - (7.655192 / ( convert.r - 0.467481 + 7.655192)) ) + 127.5) / 255.0;
gl_FragColor = convert;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment