forked from codereader/DarkRadiant
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Matthew Mott
committed
May 21, 2024
1 parent
00f1140
commit 9e791ff
Showing
2 changed files
with
30 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters