-
-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve calculation of light colors (#1967)
* maintain precision until all lights are calculated fixes lugia on the soul silver title screen * small optimization * small note * small cleanup/notes shouldn't need to check that every time, since the variable shouldn't be able to overflow * hw doesn't cap difflevel at 255 Should it cap at all? Can vtx colors overflow...? * diffuse level appears to be shifted right by 9 fixes some minor inaccuracies * improve specular lighting a little * small improvement to diffuse lighting fixes a few off by ones - finding by azusa * small tweaks * handle overflows of diffuse lighting properly -credits to azusa once more * attempt at improving specular lighting calcs still far from correct, but its a start. fixes: #1545 * meh * improve specular lighting further * add notes * theory: add half vec instead of subt 1 * implement azusa's specular lighting algorithm * fix minor edge case with spec lighting * give proper credit in comments * fix some bugs/misc tweaks * more quirky overflow/underflow handling * fix a spec lighting edgecase remove some redundant parentheses * fix an edge case with light vector calcs * spec recip uses a different calc for light dir? also remove a check that shouldn't be mathematically possible to trigger * nvm that thing i thought couldn't trigger was required also move reciprocal calc into the light vector calc function since i might as well now ig * replace a bunch of stuff with much *much* simpler algorithms * misc cleanup PARENTHESES WOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO * leave a note abt shininess table's default value being incorrect
- Loading branch information
Showing
2 changed files
with
75 additions
and
47 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