We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent feda67a commit db0f368Copy full SHA for db0f368
pipelined/bevy_pbr2/src/render/light.rs
@@ -388,8 +388,8 @@ pub fn check_light_visibility(
388
// If we have an aabb and transform, do frustum culling
389
if let (Some(aabb), Some(transform)) = (maybe_aabb, maybe_transform) {
390
let model_to_world = transform.compute_matrix();
391
- // Do a cheap sphere vs obb test to prune out most meshes
392
- 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) {
393
continue;
394
}
395
for (frustum, visible_entities) in cubemap_frusta
0 commit comments