Skip to content

Added 2 more draw.is_visible checks to render crate #196

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
merged 1 commit into from
Aug 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions crates/bevy_render/src/pipeline/render_pipelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ pub fn draw_render_pipelines_system(
mut query: Query<(&mut Draw, &mut RenderPipelines)>,
) {
for (mut draw, mut render_pipelines) in &mut query.iter() {
if !draw.is_visible {
continue;
}
let render_pipelines = &mut *render_pipelines;
for pipeline in render_pipelines.pipelines.iter_mut() {
pipeline.specialization.sample_count = msaa.samples;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,10 @@ fn asset_render_resources_node_system<T: RenderResources>(
}
}

for (asset_handle, _draw, mut render_pipelines) in &mut query.iter() {
for (asset_handle, draw, mut render_pipelines) in &mut query.iter() {
if !draw.is_visible {
continue
}
if let Some(asset_bindings) = asset_render_resource_bindings.get(*asset_handle) {
render_pipelines.bindings.extend(asset_bindings);
}
Expand Down