We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edad907 commit f279b7fCopy full SHA for f279b7f
pipelined/bevy_pbr2/src/render/light.rs
@@ -432,8 +432,8 @@ pub fn check_light_visibility(
432
// If we have an aabb and transform, do frustum culling
433
if let (Some(aabb), Some(transform)) = (maybe_aabb, maybe_transform) {
434
let model_to_world = transform.compute_matrix();
435
- // Do a cheap sphere vs obb test to prune out most meshes
436
- if light_sphere.intersects_obb(aabb, &model_to_world) {
+ // Do a cheap sphere vs obb test to prune out most meshes outside the sphere of the light
+ if !light_sphere.intersects_obb(aabb, &model_to_world) {
437
continue;
438
}
439
for (frustum, visible_entities) in cubemap_frusta
0 commit comments