Skip to content

Commit

Permalink
webgpu: add wgsl comment tag
Browse files Browse the repository at this point in the history
  • Loading branch information
linbingquan committed Oct 21, 2024
1 parent 48e6e2e commit 4f2b50f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderers/webgpu/nodes/WGSLNodeBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const wgslPolyfill = {
equals_bvec2: new CodeNode( 'fn tsl_equals_bvec2( a : vec2f, b : vec2f ) -> vec2<bool> { return vec2<bool>( a.x == b.x, a.y == b.y ); }' ),
equals_bvec3: new CodeNode( 'fn tsl_equals_bvec3( a : vec3f, b : vec3f ) -> vec3<bool> { return vec3<bool>( a.x == b.x, a.y == b.y, a.z == b.z ); }' ),
equals_bvec4: new CodeNode( 'fn tsl_equals_bvec4( a : vec4f, b : vec4f ) -> vec4<bool> { return vec4<bool>( a.x == b.x, a.y == b.y, a.z == b.z, a.w == b.w ); }' ),
repeatWrapping: new CodeNode( `
repeatWrapping: new CodeNode( /* wgsl */`
fn tsl_repeatWrapping( uv : vec2<f32>, dimension : vec2<u32> ) -> vec2<u32> {
let uvScaled = vec2<u32>( uv * vec2<f32>( dimension ) );
Expand All @@ -80,7 +80,7 @@ fn tsl_repeatWrapping( uv : vec2<f32>, dimension : vec2<u32> ) -> vec2<u32> {
}
` ),
biquadraticTexture: new CodeNode( `
biquadraticTexture: new CodeNode( /* wgsl */`
fn tsl_biquadraticTexture( map : texture_2d<f32>, coord : vec2f, level : i32 ) -> vec4f {
let iRes = vec2i( textureDimensions( map, level ) );
Expand Down

0 comments on commit 4f2b50f

Please sign in to comment.