Removed redundant visibility check (#2311)
Since `visible_entities_system` already checks `Visiblie::is_visible` for each entity and requires it to be `true`, there's no reason to verify visibility in `PassNode::prepare` which consumes entities produced by the system.
This commit is contained in:
parent
27d809fd23
commit
a404eb2acf
@ -3,7 +3,6 @@ use crate::{
|
|||||||
draw::{Draw, RenderCommand},
|
draw::{Draw, RenderCommand},
|
||||||
pass::{ClearColor, LoadOp, PassDescriptor, TextureAttachment},
|
pass::{ClearColor, LoadOp, PassDescriptor, TextureAttachment},
|
||||||
pipeline::{IndexFormat, PipelineDescriptor},
|
pipeline::{IndexFormat, PipelineDescriptor},
|
||||||
prelude::Visible,
|
|
||||||
render_graph::{Node, ResourceSlotInfo, ResourceSlots},
|
render_graph::{Node, ResourceSlotInfo, ResourceSlots},
|
||||||
renderer::{
|
renderer::{
|
||||||
BindGroupId, BufferId, RenderContext, RenderResourceBindings, RenderResourceContext,
|
BindGroupId, BufferId, RenderContext, RenderResourceBindings, RenderResourceContext,
|
||||||
@ -160,11 +159,6 @@ where
|
|||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(visible) = world.get::<Visible>(visible_entity.entity) {
|
|
||||||
if !visible.is_visible {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for render_command in draw.render_commands.iter() {
|
for render_command in draw.render_commands.iter() {
|
||||||
commands.push(render_command.clone());
|
commands.push(render_command.clone());
|
||||||
// whenever a new pipeline is set, ensure the relevant camera bind groups
|
// whenever a new pipeline is set, ensure the relevant camera bind groups
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user