File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,6 @@ export class Model {
252252 // TODO - this is wrong, compile a single shader
253253 if ( isWebGPU && this . props . source ) {
254254 // WGSL
255- this . props . shaderLayout ||= getShaderLayoutFromWGSL ( this . props . source ) ;
256255 const { source, getUniforms} = this . props . shaderAssembler . assembleWGSLShader ( {
257256 platformInfo,
258257 ...this . props ,
@@ -261,6 +260,8 @@ export class Model {
261260 this . source = source ;
262261 // @ts -expect-error
263262 this . _getModuleUniforms = getUniforms ;
263+ // Extract shader layout after modules have been added to WGSL source, to include any bindings added by modules
264+ this . props . shaderLayout ||= getShaderLayoutFromWGSL ( this . source ) ;
264265 } else {
265266 // GLSL
266267 const { vs, fs, getUniforms} = this . props . shaderAssembler . assembleGLSLShaderPair ( {
You can’t perform that action at this time.
0 commit comments