Skip to content
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

Refactored shadow casting directional lights collection #5593

Merged
merged 3 commits into from Aug 25, 2023

Conversation

mvaligursky
Copy link
Contributor

Those lights used to be collected during composition update, but now are obtained from layers at runtime, to avoid composition update when any lights / light properties change

@mvaligursky mvaligursky self-assigned this Aug 25, 2023
@mvaligursky mvaligursky added the area: graphics Graphics related issue label Aug 25, 2023
const lights = this._lights;
for (let i = 0; i < lights.length; i++) {
const light = lights[i];
if (light.enabled) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is splitLights updated when lights are enabled and disabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, as light is removed from the layer at that point which sets markLightsDirty to true

@mvaligursky mvaligursky merged commit 128b0df into main Aug 25, 2023
7 checks passed
@mvaligursky mvaligursky deleted the mv-dir-shadow-lights branch August 25, 2023 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants