From 4f2b50f68dce5039cf50585c620d05874d1d8fbf Mon Sep 17 00:00:00 2001 From: linbingquan <695601626@qq.com> Date: Mon, 21 Oct 2024 13:12:48 +0800 Subject: [PATCH] webgpu: add `wgsl` comment tag --- src/renderers/webgpu/nodes/WGSLNodeBuilder.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderers/webgpu/nodes/WGSLNodeBuilder.js b/src/renderers/webgpu/nodes/WGSLNodeBuilder.js index fa45ffbb663e64..aec75e74d231ec 100644 --- a/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +++ b/src/renderers/webgpu/nodes/WGSLNodeBuilder.js @@ -71,7 +71,7 @@ const wgslPolyfill = { equals_bvec2: new CodeNode( 'fn tsl_equals_bvec2( a : vec2f, b : vec2f ) -> vec2 { return vec2( a.x == b.x, a.y == b.y ); }' ), equals_bvec3: new CodeNode( 'fn tsl_equals_bvec3( a : vec3f, b : vec3f ) -> vec3 { return vec3( 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 { return vec4( 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, dimension : vec2 ) -> vec2 { let uvScaled = vec2( uv * vec2( dimension ) ); @@ -80,7 +80,7 @@ fn tsl_repeatWrapping( uv : vec2, dimension : vec2 ) -> vec2 { } ` ), - biquadraticTexture: new CodeNode( ` + biquadraticTexture: new CodeNode( /* wgsl */` fn tsl_biquadraticTexture( map : texture_2d, coord : vec2f, level : i32 ) -> vec4f { let iRes = vec2i( textureDimensions( map, level ) );