Skip to content

Commit 41b0262

Browse files
authored
Fix obsolete api usage (#925)
WGSL does not allow to use textureSampleBaseClampToEdge to replace textureSampleLevel to sample texture_external.
1 parent d048c53 commit 41b0262

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gpu-pipeline/webgpu/gpu-shaders.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ struct SizeParams {
6464
fn main(@location(0) fragUV : vec2<f32>) -> @location(0) vec4<f32> {
6565
// The user-facing camera is mirrored, flip horizontally.
6666
let coord = vec2(1.0 - fragUV.x, fragUV.y);
67-
let src_color = textureSampleLevel(myTexture, mySampler, coord);
67+
let src_color = textureSampleBaseClampToEdge(myTexture, mySampler, coord);
6868
6969
let rowCol = vec2<i32>(i32(coord.y * f32(size.height)), i32(coord.x * f32(size.width)));
7070
let probability = (buf[rowCol.x * size.width + rowCol.y]).a;

0 commit comments

Comments
 (0)