mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-15 17:45:26 +00:00
f08a280ade
* Use shader subgroup extensions if shader ballot is not supported * Shader cache version bump + cleanup * The type is still required on the table
7 lines
251 B
GLSL
7 lines
251 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;
|
|
return x * xLut[lutIdx] + y * yLut[lutIdx];
|
|
} |