Browse Source

Update logdepthbuf_fragment.glsl.js

Garrett Johnson 5 years ago
parent
commit
d74740fcc6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.js

+ 1 - 1
src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.js

@@ -3,7 +3,7 @@ export default /* glsl */`
 
 	// Doing a strict comparison with == 1.0 can cause noise artifacts
 	// on some platforms. See issue #17623.
-	gl_FragDepthEXT = vIsPerspective > 0.5 ? log2( vFragDepth ) * logDepthBufFC * 0.5 : gl_FragCoord.z;
+	gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
 
 #endif
 `;