@binding(1) @group(0) var mySampler: sampler; @binding(2) @group(0) var myTexture: texture_2d; @stage(fragment) fn main( @location(0) fragUV: vec2, @location(1) fragPosition: vec4 ) -> @location(0) vec4 { let texColor = textureSample(myTexture, mySampler, fragUV * 0.8 + vec2(0.1, 0.1)); let f = f32(length(texColor.rgb - vec3(0.5, 0.5, 0.5)) < 0.01); return (1.0 - f) * texColor + f * fragPosition; // return vec4(texColor.rgb,1.0); }