diff options
| author | HampusM <hampus@hampusmat.com> | 2026-12-04 21:38:41 +0100 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-12-04 21:38:41 +0100 |
| commit | 2b80d52b30fc64721bd735dcd409035ca1cc77e9 (patch) | |
| tree | 15300d437c319378f86be1fc69245a1ea7c487c1 | |
| parent | 8936491b847513f74dad5642187fd8778c556afd (diff) | |
| -rw-r--r-- | engine/src/rendering/main_pipeline.rs | 20 |
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(), |
