-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add light occlusion #20
Merged
Merged
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
Dynamic arrays aren't supported in WebGL2, so we have to fall back to a fixed size array in a uniform binding. Co-Authored-By: Miguel Albernaz <[email protected]>
Co-Authored-By: Miguel Albernaz <[email protected]>
PBR is for 3D stuff. It's nice to not need it. We'll want to clean up our view conversion definitions in the future. Co-Authored-By: Miguel Albernaz <[email protected]>
The resulting texture isn't used yet, but it's being written to. Co-Authored-By: Miguel Albernaz <[email protected]>
Now we're using our light map, blended with our main texture. Co-Authored-By: Miguel Albernaz <[email protected]>
Co-Authored-By: Miguel Albernaz <[email protected]>
Co-Authored-By: Miguel Albernaz <[email protected]>
Not strictly necessary, but I do like having an explicit render graph, especially if it's something someone else ever wanted to tweak. Co-Authored-By: Miguel Albernaz <[email protected]>
This will allow us to sanely expand our API as we introduce more occluder shapes. Co-Authored-By: Miguel Albernaz <[email protected]>
A refactor, again getting us to a world of a proper render graph. Co-Authored-By: Miguel Albernaz <[email protected]>
Co-Authored-By: Miguel Albernaz <[email protected]>
Nice to split this one up, rather than all the textures living on one component. Co-Authored-By: Miguel Albernaz <[email protected]>
Now we can completely isolate our light map and sdf textures. Co-Authored-By: Miguel Albernaz <[email protected]>
This shader isn't specific to any one pipeline, so let's pull it up. Co-Authored-By: Miguel Albernaz <[email protected]>
Co-Authored-By: Miguel Albernaz <[email protected]>
No blur yet. Will add this back later. Co-Authored-By: Miguel Albernaz <[email protected]>
Co-Authored-By: Miguel Albernaz <[email protected]>
Co-Authored-By: Miguel Albernaz <[email protected]>
Co-Authored-By: Miguel Albernaz <[email protected]>
Co-Authored-By: Miguel Albernaz <[email protected]>
These were wrong!
Missed this when porting things over.
This will allow us to encode more information into an occluder, such as information on how shadows should be cast.
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.
Summary
Sets us up with some basic light occlusion with hard shadows.
The bulk of this work was under a collaboration with @malbernaz, lifting some of the SDF work from
bevy_lit
intobevy_light_2d
.Closes #2
Screencast.from.2024-08-02.15-14-33.mp4