From a9869569fa70e4fb069c9214fb7e83c6f55181cd Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Mon, 9 Jun 2025 23:24:39 -0500 Subject: [PATCH] Fix sprite variant recolor --- src/pipelines/glsl/spriteFragShader.frag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pipelines/glsl/spriteFragShader.frag b/src/pipelines/glsl/spriteFragShader.frag index 03f8c8c27bc..7ab3e4add00 100644 --- a/src/pipelines/glsl/spriteFragShader.frag +++ b/src/pipelines/glsl/spriteFragShader.frag @@ -154,7 +154,7 @@ void main() { for (int i = 0; i < 32; i++) { if (baseVariantColors[i].a == 0.0) break; - if (texture.a > 0.0 && all(lessThan(abs(texture.rgb - baseVariantColors[i].rgb), vec3(1.0/255.0)))) { + if (texture.a > 0.0 && all(lessThan(abs(texture.rgb - baseVariantColors[i].rgb), vec3(0.5/255.0)))) { texture.rgb = variantColors[i].rgb; break; } @@ -163,7 +163,7 @@ void main() { for (int i = 0; i < 32; i++) { if (spriteColors[i][3] == 0.0) break; - if (texture.a > 0.0 && all(lessThan(abs(texture.rgb - spriteColors[i].rgb), vec3(1.0/255.0)))) { + if (texture.a > 0.0 && all(lessThan(abs(texture.rgb - spriteColors[i].rgb), vec3(0.5/255.0)))) { vec3 fusionColor = vec3(fusionSpriteColors[i].rgb) / 255.0; vec3 bg = spriteColors[i].rgb; float gray = (bg.r + bg.g + bg.b) / 3.0;