Skip to content

Commit f67c8e4

Browse files
authored
GLSLNodeBuilder: Fix CubeDepthTexture sampler. (#32857)
1 parent cd9bc6f commit f67c8e4

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,17 @@ ${ flowData.code }
752752

753753
} else if ( uniform.type === 'cubeDepthTexture' ) {
754754

755-
snippet = `samplerCubeShadow ${ uniform.name };`;
755+
const texture = uniform.node.value;
756+
757+
if ( texture.compareFunction ) {
758+
759+
snippet = `samplerCubeShadow ${ uniform.name };`;
760+
761+
} else {
762+
763+
snippet = `samplerCube ${ uniform.name };`;
764+
765+
}
756766

757767
} else if ( uniform.type === 'buffer' ) {
758768

0 commit comments

Comments
 (0)