Преглед изворни кода

GLSLNodeBuilder: Fix `CubeDepthTexture` sampler. (#32857)

Michael Herzog пре 3 месеци
родитељ
комит
f67c8e4c34
1 измењених фајлова са 11 додато и 1 уклоњено
  1. 11 1
      src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js

+ 11 - 1
src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js

@@ -752,7 +752,17 @@ ${ flowData.code }
 
 
 			} else if ( uniform.type === 'cubeDepthTexture' ) {
 			} else if ( uniform.type === 'cubeDepthTexture' ) {
 
 
-				snippet = `samplerCubeShadow ${ uniform.name };`;
+				const texture = uniform.node.value;
+
+				if ( texture.compareFunction ) {
+
+					snippet = `samplerCubeShadow ${ uniform.name };`;
+
+				} else {
+
+					snippet = `samplerCube ${ uniform.name };`;
+
+				}
 
 
 			} else if ( uniform.type === 'buffer' ) {
 			} else if ( uniform.type === 'buffer' ) {
 
 

粤ICP备19079148号