Browse Source

Swap offsets in distance formula for light cones

pull/7820/head
staphen 1 year ago committed by Anders Jenbo
parent
commit
fec72f87aa
  1. 4
      Source/lighting.cpp

4
Source/lighting.cpp

@ -361,8 +361,8 @@ void MakeLightTable()
for (int offsetX = 0; offsetX < 8; offsetX++) {
for (int y = 0; y < 16; y++) {
for (int x = 0; x < 16; x++) {
int a = (8 * x - offsetY);
int b = (8 * y - offsetX);
int a = (8 * x - offsetX);
int b = (8 * y - offsetY);
LightConeInterpolations[offsetX][offsetY][x][y] = static_cast<uint8_t>(sqrt(a * a + b * b));
}
}

Loading…
Cancel
Save