From c4921dd90dbe7a5963c94d094769414214151308 Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Sun, 24 Jan 2021 16:51:06 -0800 Subject: [PATCH] Workaround for #139 --- assets/shaders/indexpalette3.frag | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/shaders/indexpalette3.frag b/assets/shaders/indexpalette3.frag index 2a6b1fc5..da857319 100644 --- a/assets/shaders/indexpalette3.frag +++ b/assets/shaders/indexpalette3.frag @@ -23,6 +23,11 @@ void main() { color = texture2D(ColorMap, color.ar); } + // workaround for https://github.com/collinsmith/riiablo/issues/139 + else if (color.a == 0.99609375) { // index 255 == float(255 / 256) + color.a = color.a - 0.00390625; // index 255 -> 254 by subtracting float(1 / 256) + } + color = texture2D(ColorTable, color.ar); // Set alpha to tint alpha, including palette id 0