-
Notifications
You must be signed in to change notification settings - Fork 66
Description
This bug was uncovered in #180.
All our normal maps are compressed with crunch -dxn and our engine loads them with reverted blue channel (Z component). This was hidden by the bug in the normalmap code that was loading the Z component from alpha channel instead of blue one. Hopefully we did not ship any heightmap in alpha channel and since crunch -dxn drops the alpha channel in any way, it looks like the engine was just using an empty Z component). The normalmap loads correctly if loaded from another format (like webp).
With r_normalMapping disabled:
With r_normalMapping enabled and normal map compressed with crunch -dxn:
With r_normalMapping enabled and normal map compressed with crunch -dxn and Z component reverted in engine to workaround the bug:
With r_normalMapping enabled and normal map compressed with webp:
The source tree in #180 is meant to be correct. I created a test map with assets I created to be sure they are the way they must be, then fixed the engine to render the test map. The correct engine in this tree is able to render correctly xonotic maps and unvanquished maps if their normal maps were not compressed with crunch -dxn.
We need someone to fix the normalmap loading when they are compressed with dxn (use the branch in #180 branch as a base as master is not correct).
The symptom is a map being almost entirely dark. No need for special map to reproduce the bug, just load released chasm with this branch (or any other map):
It may be possible that the whole normalmap is reverted, reverted red (X) and reverted green (Y) leads to subtle changes while reverted blue (Z) just break everything.
I'll upload the test map soon but testing with released maps is enough to reproduce the bug. The test map will be useful to check that the bug is entirely fixed. While it's very easy to check for the correct loading of the blue channel with any released map, it may be very difficult and time-consuming to check for the correct loading of red and green channel without the test map.
Metadata
Metadata
Assignees
Type
Projects
Status




