]> git.rm.cloudns.org Git - xonotic/netradiant.git/commit
Fix ioq3 compatibility bug with lightgrid and only one light.
authorRudolf Polzer <divVerent@gmail.com>
Sat, 18 Apr 2020 00:10:39 +0000 (20:10 -0400)
committerRudolf Polzer <divVerent@gmail.com>
Sat, 18 Apr 2020 00:18:58 +0000 (20:18 -0400)
commit22b786a4801336c623865d4b3e072223152033b3
tree78549a1336d138d86bfe429c0ceb5ac6ff178bf2
parent8201f9b86bd32f5a4a76e30884f7b62634eef46b
Fix ioq3 compatibility bug with lightgrid and only one light.

Correct math requires the ambient component of the lightgrid to be zero
in that case. However, ioq3 ignores lightgrid cells with all zero ambient
value, EVEN if the directed value is nonzero.

This change sets the ambient value to #010101 if it'd be pitch black. This
should be a minimal change without affecting light hue that fixes
lightgrid rendering. In engines like DarkPlaces, almost no map should
look different from this.

Fixes #137.
tools/quake3/q3map2/light.c
tools/quake3/q3map2/light_ydnar.c
tools/quake3/q3map2/q3map2.h