Skip to content

Commit

Permalink
fix .repeatWrapping() (#24922)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunag authored Nov 7, 2022
1 parent 6671e7c commit 2f77862
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/jsm/renderers/webgpu/nodes/WebGPUNodeBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ fn threejs_mod( x : f32, y : f32 ) -> f32 {
}
` ),
repeatWrapping: new CodeNode( `
fn threejs_repeatWrapping( uv : vec2<f32>, dimension : vec2<i32> ) -> vec2<i32> {
fn threejs_repeatWrapping( uv : vec2<f32>, dimension : vec2<u32> ) -> vec2<u32> {
let uvScaled = vec2<i32>( uv * vec2<f32>( dimension ) );
let uvScaled = vec2<u32>( uv * vec2<f32>( dimension ) );
return ( ( uvScaled % dimension ) + dimension ) % dimension;
Expand Down

0 comments on commit 2f77862

Please sign in to comment.