Fix incorrect 16bit lightmaps
This commit is contained in:
parent
64dde9509d
commit
1539d1910d
|
@ -132,7 +132,7 @@ public class WorldRep : IChunk
|
|||
return new Vector4(raw1, raw1, raw1, 255) / 255.0f;
|
||||
case 2:
|
||||
var raw2 = Pixels[layer, y, x, 0] + (Pixels[layer, y, x, 1] << 8);
|
||||
return new Vector4(raw2 & 31, (raw2 >> 5) & 31, (raw2 >> 10) & 31, 32) / 32.0f;
|
||||
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;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue