Commit be4cace6 authored by Christopher Tenter's avatar Christopher Tenter

fix viewspace reconstruction shader code

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20112 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 1e26f2af
......@@ -177,6 +177,6 @@ vec3 ScreenspaceToViewspace(vec2 uv, float zVS, vec2 scale, vec2 shift)
vec3 ReconstructViewspace(in sampler2D depthTex, in vec2 uv, in mat4 proj)
{
float nonlinearDepth = texture(depthTex, uv).x;
float linearDepthVS = ViewspaceToProjectedDepth(nonlinearDepth, proj[2][2], proj[2][3]);
float linearDepthVS = ProjectedToViewspaceDepth(nonlinearDepth, proj[2][2], proj[2][3]);
return ScreenspaceToViewspace(uv, linearDepthVS, proj[0][0], proj[1][1]);
}
\ No newline at end of file
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