diff --git a/examples/jsm/transpiler/ShaderToyDecoder.js b/examples/jsm/transpiler/ShaderToyDecoder.js index 67f7d59c367239..dcbff919ea5dc5 100644 --- a/examples/jsm/transpiler/ShaderToyDecoder.js +++ b/examples/jsm/transpiler/ShaderToyDecoder.js @@ -7,7 +7,7 @@ class ShaderToyDecoder extends GLSLDecoder { super(); - this.addKeyword( 'iTime', 'float iTime = timerLocal();' ); + this.addKeyword( 'iTime', 'float iTime = timerGlobal();' ); this.addKeyword( 'iResolution', 'vec2 iResolution = viewportResolution;' ); this.addKeyword( 'fragCoord', 'vec2 fragCoord = vec2( viewportCoordinate.x, viewportResolution.y - viewportCoordinate.y );' ); diff --git a/examples/webgpu_shadertoy.html b/examples/webgpu_shadertoy.html index 545bbcfcae634d..192fd4804d1d45 100644 --- a/examples/webgpu_shadertoy.html +++ b/examples/webgpu_shadertoy.html @@ -271,7 +271,7 @@ const geometry = new THREE.PlaneGeometry( 2, 2 ); const material = new Nodes.MeshBasicNodeMaterial(); - material.colorNode = Nodes.oscSine( Nodes.timerLocal( .3 ) ).mix( shaderToy1Node, shaderToy2Node ); + material.colorNode = Nodes.oscSine( Nodes.timerGlobal( .3 ) ).mix( shaderToy1Node, shaderToy2Node ); const quad = new THREE.Mesh( geometry, material ); scene.add( quad ); diff --git a/examples/webgpu_tsl_transpiler.html b/examples/webgpu_tsl_transpiler.html index 2fe5cc9576c817..74b495e7c6aae7 100644 --- a/examples/webgpu_tsl_transpiler.html +++ b/examples/webgpu_tsl_transpiler.html @@ -59,7 +59,7 @@ const editorDOM = document.getElementById( 'source' ); const resultDOM = document.getElementById( 'result' ); - const glslCode = `// Write your GLSL here, example: + const glslCode = `// Put here your GLSL code to transpile to TSL: float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {