Repository navigation
Improve lights - #265
Open
tychedelia wants to merge 1 commit into
Open
Improve lights#265tychedelia wants to merge 1 commit into
tychedelia wants to merge 1 commit into
Conversation
|
Visual regression: 2 changed of 43 cases
If these changes are intentional, add the baseline |
This branch has not been deployed
This file contains hidden or 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
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.
There were some weirdness with how lights previously worked:
spotLightand friends for example).The solution is to add the immediate mode methods as well as a
lightdraw method that uses the light for a given frame. We keep track of these "frame lights" and create them as needed for a given flush. This is important because we need to be aware of when the transform changes, or when there are multiple flushes in a single frame. In other words, the light the user creates is more like a light descriptor and they can create as many light instances they want by callinglight, weaving transform changes in between if they so choose.Also cleans up some life cycles. We now have
DrawTransientandFlushTransientwhich exist at different boundaries. So geometries get cleaned up inside a flush boundary but lights stick around for the entire draw frame.Most of the changes in this diff are in the examples and can be ignored.