Browse Source

Fixed writing the depth in OpenGL deferred shader.

Lasse Öörni 14 years ago
parent
commit
f38c7fe55e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      SourceAssets/GLSLShaders/Deferred.frag

+ 1 - 1
SourceAssets/GLSLShaders/Deferred.frag

@@ -46,6 +46,6 @@ void main()
     gl_FragData[1] = GetFogFactor(vVertexLighting.a) * vec4(diffColor, specIntensity);
     gl_FragData[2] = vec4(normal * 0.5 + 0.5, specPower);
     #ifndef HWDEPTH
-        gl_FragData[3] = vVertexLighting.a;
+        gl_FragData[3] = vec4(EncodeDepth(vTexCoord.z), 0.0);
     #endif
 }