summaryrefslogtreecommitdiff
path: root/engine/src/rendering/main_pipeline.rs
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/rendering/main_pipeline.rs')
-rw-r--r--engine/src/rendering/main_pipeline.rs20
1 files changed, 11 insertions, 9 deletions
diff --git a/engine/src/rendering/main_pipeline.rs b/engine/src/rendering/main_pipeline.rs
index f8b3e00..a3fe928 100644
--- a/engine/src/rendering/main_pipeline.rs
+++ b/engine/src/rendering/main_pipeline.rs
@@ -309,8 +309,18 @@ pub fn add_passes(
));
}
}
+ }
+
+ if let Ok(Some(scene_sky_box_state)) = &scene_sky_box_state {
+ render_pass.commands.push(Command::UpdateDrawProperties(
+ DrawProperties {
+ depth_function: DepthFunction::LessOrEqual,
+ ..Default::default()
+ },
+ DrawPropertiesUpdateFlags::DEPTH_FUNCTION,
+ ));
- if let Ok(Some(scene_sky_box_state)) = &scene_sky_box_state {
+ for (window, window_surface) in &window_query {
add_sky_box_commands(
render_pass,
scene_sky_box_state,
@@ -856,14 +866,6 @@ fn add_sky_box_commands(
.push(Command::SetShaderBinding(sky_box_shader_obj_id, binding));
}
- render_pass.commands.push(Command::UpdateDrawProperties(
- DrawProperties {
- depth_function: DepthFunction::LessOrEqual,
- ..Default::default()
- },
- DrawPropertiesUpdateFlags::DEPTH_FUNCTION,
- ));
-
render_pass.commands.push(Command::DrawMesh(
sky_box_state.mesh_object_id,
DrawMeshOptions::default(),