1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-16 11:53:45 +00:00

Merge pull request #2357 from FunkinCrew/bugfix/shader-crash-freeplay

Fix an AMD shader crash on Freeplay.
This commit is contained in:
Cameron Taylor 2024-05-14 22:14:22 -04:00 committed by GitHub
commit 37fc84946d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,8 +40,8 @@ class StrokeShader extends FlxShader
void main()
{
vec4 sample = flixel_texture2D(bitmap, openfl_TextureCoordv);
if (sample.a == 0.) {
vec4 gay = flixel_texture2D(bitmap, openfl_TextureCoordv);
if (gay.a == 0.) {
float w = size.x / openfl_TextureSize.x;
float h = size.y / openfl_TextureSize.y;
@ -49,9 +49,9 @@ class StrokeShader extends FlxShader
|| flixel_texture2D(bitmap, vec2(openfl_TextureCoordv.x - w, openfl_TextureCoordv.y)).a != 0.
|| flixel_texture2D(bitmap, vec2(openfl_TextureCoordv.x, openfl_TextureCoordv.y + h)).a != 0.
|| flixel_texture2D(bitmap, vec2(openfl_TextureCoordv.x, openfl_TextureCoordv.y - h)).a != 0.)
sample = color;
gay = color;
}
gl_FragColor = sample;
gl_FragColor = gay;
}
')
public function new(color:FlxColor = 0xFFFFFFFF, width:Float = 1, height:Float = 1)