From 4b835b1685c0e2805b792a6dfc4196b57730d910 Mon Sep 17 00:00:00 2001 From: sunag Date: Thu, 19 Oct 2023 05:33:15 -0300 Subject: [PATCH] cleanup --- examples/jsm/renderers/webgl/nodes/GLSLNodeBuilder.js | 10 +++++++--- examples/webgpu_shadertoy.html | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/jsm/renderers/webgl/nodes/GLSLNodeBuilder.js b/examples/jsm/renderers/webgl/nodes/GLSLNodeBuilder.js index 5df08330a021b4..019985bf9a3422 100644 --- a/examples/jsm/renderers/webgl/nodes/GLSLNodeBuilder.js +++ b/examples/jsm/renderers/webgl/nodes/GLSLNodeBuilder.js @@ -116,11 +116,15 @@ ${ flowData.code } const vars = this.vars[ shaderStage ]; - for ( const variable of vars ) { + if ( vars !== undefined ) { - if ( variable.isOutputStructVar ) continue; + for ( const variable of vars ) { - snippets.push( `${ this.getVar( variable.type, variable.name ) };` ); + if ( variable.isOutputStructVar ) continue; + + snippets.push( `${ this.getVar( variable.type, variable.name ) };` ); + + } } diff --git a/examples/webgpu_shadertoy.html b/examples/webgpu_shadertoy.html index 3041dea83df036..1397b3e0c21bfd 100644 --- a/examples/webgpu_shadertoy.html +++ b/examples/webgpu_shadertoy.html @@ -8,7 +8,7 @@
- three.js - ShaderToy Transpiler + three.js - ShaderToy
Shader created by jackdavenport.