Browse Source

Fix Unlit HLSL shader in deferred modes.

Lasse Öörni 11 years ago
parent
commit
cc25bf2089
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Bin/CoreData/Shaders/HLSL/Unlit.hlsl

+ 2 - 2
Bin/CoreData/Shaders/HLSL/Unlit.hlsl

@@ -76,13 +76,13 @@ void PS(float2 iTexCoord : TEXCOORD0,
     #if defined(PREPASS)
         // Fill light pre-pass G-Buffer
         oColor = float4(0.5, 0.5, 0.5, 1.0);
-        oDepth = iDepth;
+        oDepth = iWorldPos.w;
     #elif defined(DEFERRED)
         // Fill deferred G-buffer
         oColor = float4(GetFog(diffColor.rgb, fogFactor), diffColor.a);
         oAlbedo = float4(0.0, 0.0, 0.0, 0.0);
         oNormal = float4(0.5, 0.5, 0.5, 1.0);
-        oDepth = iDepth;
+        oDepth = iWorldPos.w;
     #else
         oColor = float4(GetFog(diffColor.rgb, fogFactor), diffColor.a);
     #endif