From 598cf6c1ba1059388370e1b7d36af2048b1b2cd2 Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Tue, 7 Dec 2021 17:43:30 -0800 Subject: [PATCH] Revert "Use Fused-Multiply-Add (#232)" (#241) 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 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; }