Browse Source

Fix a bug

Panagiotis Christopoulos Charitos 7 years ago
parent
commit
3c249707fb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      shaders/VolumetricLightingAccumulation.glslp

+ 1 - 1
shaders/VolumetricLightingAccumulation.glslp

@@ -159,7 +159,7 @@ void main()
 		Vec3 midWPos = worldPosInsideCluster(Vec3(0.5));
 		Vec3 midWPos = worldPosInsideCluster(Vec3(0.5));
 
 
 		// Compute UV
 		// Compute UV
-		Vec4 prevClipPos4 = u_prevViewProjMat * Vec4(worldPos, 1.0);
+		Vec4 prevClipPos4 = u_prevViewProjMat * Vec4(midWPos, 1.0);
 		Vec2 prevUv = NDC_TO_UV(prevClipPos4.xy / prevClipPos4.w);
 		Vec2 prevUv = NDC_TO_UV(prevClipPos4.xy / prevClipPos4.w);
 
 
 		// Compute new Z tex coord
 		// Compute new Z tex coord