Skip to content

Commit 598cf6c

Browse files
authored
Revert "Use Fused-Multiply-Add (#232)" (#241)
This reverts commit bd2de37.
1 parent 4c6682e commit 598cf6c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/custom-shader/shaders/noise.wgsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn vs_main(
1010
[[location(0)]] position: vec2<f32>,
1111
) -> VertexOutput {
1212
var out: VertexOutput;
13-
out.tex_coord = fma(position, vec2<f32>(0.5, -0.5), vec2<f32>(0.5, 0.5));
13+
out.tex_coord = position * vec2<f32>(0.5, -0.5) + 0.5;
1414
out.position = vec4<f32>(position, 0.0, 1.0);
1515
return out;
1616
}

shaders/scale.wgsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn vs_main(
1515
[[location(0)]] position: vec2<f32>,
1616
) -> VertexOutput {
1717
var out: VertexOutput;
18-
out.tex_coord = fma(position, vec2<f32>(0.5, -0.5), vec2<f32>(0.5, 0.5));
18+
out.tex_coord = position * vec2<f32>(0.5, -0.5) + 0.5;
1919
out.position = r_locals.transform * vec4<f32>(position, 0.0, 1.0);
2020
return out;
2121
}

0 commit comments

Comments
 (0)