mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-12-25 15:05:45 +00:00
8428bb6541
* Fix shader FSWZADD instruction * Shader cache version bump
7 lines
No EOL
259 B
GLSL
7 lines
No EOL
259 B
GLSL
float Helper_SwizzleAdd(float x, float y, int mask)
|
|
{
|
|
vec4 xLut = vec4(1.0, -1.0, 1.0, 0.0);
|
|
vec4 yLut = vec4(1.0, 1.0, -1.0, 1.0);
|
|
int lutIdx = (mask >> (int($SUBGROUP_INVOCATION$ & 3u) * 2)) & 3;
|
|
return x * xLut[lutIdx] + y * yLut[lutIdx];
|
|
} |