Fix bugged lightmaps
This commit is contained in:
parent
e7e9c300fd
commit
0b347f7745
|
@ -154,10 +154,10 @@ public class WorldRep : IChunk
|
|||
ArgumentOutOfRangeException.ThrowIfLessThan(layer, 0, nameof(layer));
|
||||
ArgumentOutOfRangeException.ThrowIfGreaterThan(layer, Layers, nameof(layer));
|
||||
|
||||
var pixelCount = Width * Height;
|
||||
var pIdx = layer * Bpp * pixelCount;
|
||||
var bytes = new byte[pixelCount * 4];
|
||||
for (var i = 0; i < pixelCount; i += 4, pIdx += Bpp)
|
||||
var pIdx = layer * Bpp * Width * Height;
|
||||
var length = 4 * Width * Height;
|
||||
var bytes = new byte[length];
|
||||
for (var i = 0; i < length; i += 4, pIdx += Bpp)
|
||||
{
|
||||
switch (Bpp)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue