From 367460d4ebb722ef9674f2ca7b26fcf4a7fc5de6 Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Tue, 7 Dec 2021 10:30:32 -0800 Subject: [PATCH] Revert "Use Fused-Multiply-Add (#232)" This reverts commit bd2de37b84f0efba95468643d78a35a255040dc4. --- examples/custom-shader/shaders/noise.wgsl | 2 +- shaders/scale.wgsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/custom-shader/shaders/noise.wgsl b/examples/custom-shader/shaders/noise.wgsl index e2a7d7a7..4ede4b41 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 48004eb6..dc7bfce1 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; }