diff --git a/examples/custom-shader/shaders/noise.wgsl b/examples/custom-shader/shaders/noise.wgsl index e2a7d7a..4ede4b4 100644 --- a/examples/custom-shader/shaders/noise.wgsl +++ b/examples/custom-shader/shaders/noise.wgsl @@ -10,7 +10,7 @@ fn vs_main( [[location(0)]] position: vec2, ) -> VertexOutput { var out: VertexOutput; - out.tex_coord = fma(position, vec2(0.5, -0.5), vec2(0.5, 0.5)); + out.tex_coord = position * vec2(0.5, -0.5) + 0.5; out.position = vec4(position, 0.0, 1.0); return out; } diff --git a/shaders/scale.wgsl b/shaders/scale.wgsl index 48004eb..dc7bfce 100644 --- a/shaders/scale.wgsl +++ b/shaders/scale.wgsl @@ -15,7 +15,7 @@ fn vs_main( [[location(0)]] position: vec2, ) -> VertexOutput { var out: VertexOutput; - out.tex_coord = fma(position, vec2(0.5, -0.5), vec2(0.5, 0.5)); + out.tex_coord = position * vec2(0.5, -0.5) + 0.5; out.position = r_locals.transform * vec4(position, 0.0, 1.0); return out; }