-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - increase the maximum number of point lights with shadows to the max supported by the device #4435
[Merged by Bors] - increase the maximum number of point lights with shadows to the max supported by the device #4435
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some other references to MAX_POINT_LIGHT_SHADOW_MAPS in the codebase, in comments. Please double-check those.
Approved, but maybe update the PR title? :) |
.iter() | ||
.filter(|light| light.1.shadows_enabled) | ||
.count() | ||
.min((render_device.limits().max_texture_array_layers / 6) as usize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the 6 here and on line 662? I'm not sure what it's supposed to mean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. It is a ‘magic number’ I guess though it’s already been used elsewhere so I’d fix it in a separate PR. Point lights use cubemaps for shadow mapping. Cubemaps are array textures with 6 layers per cubemap, one for each cube face. That’s where the 6 comes from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, doesn't need to be fixed here, it was just for my own learning purposes, thanks!
Co-authored-by: Robert Swain <[email protected]>
9accd9a
to
d513335
Compare
bors r+ |
…upported by the device (#4435) # Objective - Being limited to 10 pointlights with shadow is very limiting ## Solution - Raise the limit
…upported by the device (bevyengine#4435) # Objective - Being limited to 10 pointlights with shadow is very limiting ## Solution - Raise the limit
…upported by the device (bevyengine#4435) # Objective - Being limited to 10 pointlights with shadow is very limiting ## Solution - Raise the limit
Objective
Solution