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

[Merged by Bors] - Frustum culling #2861

Closed
wants to merge 23 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
563e396
Add primitives to support frustum culling
superdump Sep 14, 2021
0371410
Copy over RenderLayers from the old renderer
superdump Sep 14, 2021
bc9faf3
Add functionality to Mesh to compute an AABB
superdump Sep 14, 2021
b44698b
Load AABBs from glTF models
superdump Sep 14, 2021
dd47c76
Add far() method to CameraProjection trait
superdump Sep 14, 2021
087fd7b
Add visibility types and systems
superdump Sep 14, 2021
ea546a9
Add VisibleEntities and Frustum to camera and light bundles as approp…
superdump Sep 14, 2021
b4fd252
Add Visibility and ComputedVisibility to entities to be drawn
superdump Sep 14, 2021
34f785c
Extract mesh/sprite entities based on ComputedVisibility
superdump Sep 14, 2021
c1954bc
Extract VisibleEntities for cameras
superdump Sep 14, 2021
2cb2490
Enable VisibilityPlugin within the ViewPlugin
superdump Sep 14, 2021
2a4cf48
Remove unnecessary Camera.far member
superdump Sep 14, 2021
27287cd
Pass the plane normal to Aabb::relative_radius()
superdump Sep 14, 2021
273d8fa
Add sphere - obb intsersection test
superdump Sep 14, 2021
69d2440
Add a CubeFrusta type containing 6 frusta for cube maps
superdump Sep 14, 2021
e25b1da
Add CubeFrustaVisibleEntities for use with cube maps
superdump Sep 14, 2021
69d824d
Add culling for lights
superdump Sep 14, 2021
7c03a3d
Minor renaming
superdump Sep 15, 2021
69845d2
Unify bounded entity query into visible entity query for performance
superdump Sep 15, 2021
e0c88f4
Register types to support loading from glTF models
superdump Sep 16, 2021
d5c2c2c
Fix the logic of the point light sphere vs mesh obb test
superdump Sep 16, 2021
1fe1df6
Remove unnecessary With<PointLight> in check_light_visibility query
superdump Sep 23, 2021
5727a9d
Address review comments
superdump Nov 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unnecessary With<PointLight> in check_light_visibility query
  • Loading branch information
superdump committed Nov 4, 2021
commit 1fe1df67e1a1d1b5134aebe4025ff4f7e6c7e71e
17 changes: 7 additions & 10 deletions pipelined/bevy_pbr2/src/render/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,16 +334,13 @@ pub fn update_point_light_frusta(
}

pub fn check_light_visibility(
superdump marked this conversation as resolved.
Show resolved Hide resolved
mut point_lights: Query<
(
&PointLight,
&GlobalTransform,
&CubemapFrusta,
&mut CubemapVisibleEntities,
Option<&RenderLayers>,
),
With<PointLight>,
>,
mut point_lights: Query<(
&PointLight,
&GlobalTransform,
&CubemapFrusta,
&mut CubemapVisibleEntities,
Option<&RenderLayers>,
)>,
mut directional_lights: Query<
(&Frustum, &mut VisibleEntities, Option<&RenderLayers>),
With<DirectionalLight>,
Expand Down