-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve lighting #531
Merged
wheremyfoodat
merged 10 commits into
wheremyfoodat:specialized-shaders-2
from
OFFTKP:pandra
Jul 18, 2024
Merged
Improve lighting #531
wheremyfoodat
merged 10 commits into
wheremyfoodat:specialized-shaders-2
from
OFFTKP:pandra
Jul 18, 2024
Conversation
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
cc @skylersaleh |
fragment_light.elf: works toon_shading.elf: works Cave story 3d: no longer too dark, but the intro has a bug Rabbids: positional lighting fixes, looks better Mario 3d land: ground is not too bright, mario is not yellow Kirby triple deluxe: Kirby is not shining like before Luigis mansion: better but luigi lighting is way off and spotlight sometimes turns off Captain Toad: bit better, still too bright Omega ruby: looks fine to me Pokemon Super Mystery Dungeon: looks fine to me Lego batman: didn't try but should work?
Closed this accidentally deleting the other branch |
Needs vertex shader to be changed in specialized shader PR |
TODO: bitfieldExtractCompat needs to sign extend for spotdir, or do something else |
wheremyfoodat
merged commit Jul 18, 2024
cab3049
into
wheremyfoodat:specialized-shaders-2
14 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uncomment lighting on Android
Internal format and format types need to match according to the spec:
My guess is the conversion to float was happening implicitly in desktop GL at some point, because
lutLookup
returns a float. The typeGL_R16
was probably interpreted asGL_R16F
?The alternative to this could be using GL_R16UI, but then we'd need to convert to float on the GPU
texelFetch
instead oftexture
in the shader, since this texture is really treated as an array and we don't need filtering or interpolationImprove lighting implementation
Known bugs
Luigi's mansion:
LuigiLuigi's lighting is mostly fixed except when he opens the door he looks like he's seen a ghost:Spotlight just decides to stop working sometimes. It continues working when thunder strikes for a short while, then it stops working and the whole room goes brighterFixed, GPUREG_LIGHTING_LIGHT_PERMUTATION was being accessed incorrectlyIn the intro when thunder strikes twice the road isn't illuminatedFixedCave Story 3D:
The evil doctor (and the rest of the scene) in the boot up of the game is wrongly lit. Game is better lit than before overall, was almost completely darkThis should be fixed now post the Luigi spotlight fixRabbids:
Positional lighting seems to work now, however there's some light flickering in the level selector near the castleSeems fixed after the Luigi spotlight fix, can't see any flickeringCaptain Toad Treasure Tracker:
Pokedex 3D:
Pushmo/Crashmo:
Lego Batman:
Improvements
This patch makes it so that the shader editor shows the LUTs, useful for debugging
luts.txt