فهرست منبع

WebGPURenderer: Make structs work in vertex shader with WebGL. (#33509)

Michael Herzog 1 ماه پیش
والد
کامیت
e54e8cf5d8
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js

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

@@ -946,7 +946,7 @@ ${ flowData.code }
 
 		}
 
-		if ( outputSnippet.length === 0 ) {
+		if ( shaderStage === 'fragment' && outputSnippet.length === 0 ) {
 
 			outputSnippet.push( 'layout( location = 0 ) out vec4 fragColor;' );
 
@@ -1390,6 +1390,9 @@ ${shaderData.extensions}
 // precision
 ${ defaultPrecisions }
 
+// structs
+${shaderData.structs}
+
 // uniforms
 ${shaderData.uniforms}
 

粤ICP备19079148号