Compare commits

..

3 Commits

Author SHA1 Message Date
Dean Herbert
3e52067dcc Merge pull request #262 from frenzibyte/fix-metal-flashlight
Fix flashlight mod not working on Metal
2023-06-05 14:30:51 +09:00
Salman Ahmed
50e7e1a816 Use a better decoy 2023-06-05 04:08:15 +03:00
Salman Ahmed
c0efb56ae6 Fix flashlight mod not working on Metal 2023-06-05 02:03:23 +03:00

View File

@@ -15,5 +15,8 @@ lowp vec4 getColourAt(highp vec2, highp vec2, lowp vec4);
void main(void)
{
o_Colour = mix(getColourAt(flashlightPos - v_Position, flashlightSize, v_Colour), vec4(0.0, 0.0, 0.0, 1.0), flashlightDim);
}
// todo: workaround for a SPIR-V bug (https://github.com/ppy/osu-framework/issues/5719)
float one = g_WrapModeS >= 0 ? 1 : 0;
o_Colour = mix(getColourAt(flashlightPos - v_Position, flashlightSize, v_Colour), vec4(0.0, 0.0, 0.0, 1.0), flashlightDim) * one;
}