DaemonEngine / Daemon

The Dæmon game engine. With some bits of ioq3 and XreaL.
https://unvanquished.net
BSD 3-Clause "New" or "Revised" License
306 stars 60 forks source link

Spilling out shifted internal lightmap when part of a fatLightmap #327

Closed illwieckz closed 2 years ago

illwieckz commented 4 years ago

Initially reported there: https://github.com/Unvanquished/Unvanquished/issues/782 But the thread reported two issues, this one if for the spilling out lightmap issue.

internal:

lightmap

external:

lightmap

The depicted map is the Terminus map, repackaged from Urban Terror metro map.

Released maps usually don't reproduce the bug since we usually use external lightmaps as they compress better. This issue may still bite us in the back later, and we can't assume any Dæmon-based game will repackage every legacy map available on this world, and maybe some may not have the right to.

illwieckz commented 2 years ago

This is another bug related to fatLightmap.

By dropping fatLightmap code and loading and using internal lightmap the exact same way we load external lightmaps the bug is expected to disappear in the process.

This is not a regression, it never worked.

illwieckz commented 2 years ago

What we get (see the floor, repackaged UTCS Tremulous map):

broken fatlightmap

What we expect:

broken fatlightmap

illwieckz commented 2 years ago

The lightmap spills out because it is shifted:

What we get (see the shadows around the billboard, repackaged Terminus map from Urban Terror):

broken fatlightmap

What we expect:

broken fatlightmap

It is better seen with a slider: https://imgsli.com/MTIxNTE0

Some other pixel-to-pixel comparisons:

What we get/What we expect:

broken fatlightmap

broken fatlightmap

What we get/What we expect:

broken fatlightmap

broken fatlightmap