Browse Source

GLSLNodeBuilder: Fix varying `color` type (#29950)

sunag 1 year ago
parent
commit
05cfdd9da8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js

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

@@ -570,7 +570,7 @@ ${ flowData.code }
 			for ( const varying of varyings ) {
 
 				if ( shaderStage === 'compute' ) varying.needsInterpolation = true;
-				const type = varying.type;
+				const type = this.getType( varying.type );
 				const flat = type.includes( 'int' ) || type.includes( 'uv' ) || type.includes( 'iv' ) ? 'flat ' : '';
 
 				snippet += `${flat}${varying.needsInterpolation ? 'out' : '/*out*/'} ${type} ${varying.name};\n`;
@@ -583,7 +583,7 @@ ${ flowData.code }
 
 				if ( varying.needsInterpolation ) {
 
-					const type = varying.type;
+					const type = this.getType( varying.type );
 					const flat = type.includes( 'int' ) || type.includes( 'uv' ) || type.includes( 'iv' ) ? 'flat ' : '';
 
 					snippet += `${flat}in ${type} ${varying.name};\n`;

粤ICP备19079148号