Fix incorrect lightmap colors
This commit is contained in:
parent
6f62d2ca00
commit
a8b9ce8a54
|
@ -134,7 +134,8 @@ public class WorldRep : IChunk
|
||||||
var raw2 = Pixels[layer, y, x, 0] + (Pixels[layer, y, x, 1] << 8);
|
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;
|
return new Vector4(raw2 & 31, (raw2 >> 5) & 31, (raw2 >> 10) & 31, 31) / 31.0f;
|
||||||
case 4:
|
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:
|
default:
|
||||||
return Vector4.Zero;
|
return Vector4.Zero;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue