e47a30e807
We'll need to force a temporary and mark it as precise. MSL is a little weird here, but we can piggyback on top of the invariant float math option here to force fma() operations everywhere.
16 lines
320 B
GLSL
16 lines
320 B
GLSL
#version 450
|
|
|
|
layout(location = 0) in vec4 vA;
|
|
layout(location = 1) in vec4 vB;
|
|
layout(location = 2) in vec4 vC;
|
|
|
|
void main()
|
|
{
|
|
precise vec4 mul = vA * vB;
|
|
precise vec4 add = vA + vB;
|
|
precise vec4 sub = vA - vB;
|
|
precise vec4 mad = vA * vB + vC;
|
|
precise vec4 summed = mul + add + sub + mad;
|
|
gl_Position = summed;
|
|
}
|