DarkRadiant: master 9e791ff8

Author Committer Branch Timestamp Parent
orbweaver orbweaver master 21.05.2024 18:51 master 00f1140a
Changeset Fix RGTC normal maps showing as black in lighting preview mode

Although we were correctly loading RGTC normal maps into the appropriate
destination format, there was no code in the shader to actually handle
the missing Z value, resulting in RGTC normal maps showing as entirely
black.

The Z value is now recovered for all normal maps (because it's much
easier than having to implement format-specific shader behaviour, and
should be fairly quick), using a simple application of Pythagoras. I
can't prove that this is 100% mathematically correct but it seems to
give realistic results, and is a lot better than black.
mod - install/gl/interaction_fp.glsl Diff File
mod - radiantcore/rendersystem/backend/GLProgramFactory.cpp Diff File