Fix incorrect lightmap colors

This commit is contained in:
Jarrod Doyle 2024-08-13 19:19:15 +01:00
parent 6f62d2ca00
commit a8b9ce8a54
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 2 additions and 1 deletions

View File

@ -134,7 +134,8 @@ public class WorldRep : IChunk
var raw2 = Pixels[layer, y, x, 0] + (Pixels[layer, y, x, 1] << 8);
return new Vector4(raw2 & 31, (raw2 >> 5) & 31, (raw2 >> 10) & 31, 31) / 31.0f;
case 4:
return new Vector4(Pixels[layer, y, x, 0], Pixels[layer, y, x, 1], Pixels[layer, y, x, 2], Pixels[layer, y, x, 3]) / 255.0f;
// 4bpp stored as BGRA
return new Vector4(Pixels[layer, y, x, 2], Pixels[layer, y, x, 1], Pixels[layer, y, x, 0], Pixels[layer, y, x, 3]) / 255.0f;
default:
return Vector4.Zero;
}