Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sunag committed Oct 21, 2023
1 parent a1037b7 commit 144756a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/jsm/transpiler/ShaderToyDecoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );' );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgpu_shadertoy.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgpu_tsl_transpiler.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit 144756a

Please sign in to comment.