summaryrefslogtreecommitdiff
path: root/engine/src/rendering
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-12-04 21:38:41 +0100
committerHampusM <hampus@hampusmat.com>2026-12-04 21:38:41 +0100
commit2b80d52b30fc64721bd735dcd409035ca1cc77e9 (patch)
tree15300d437c319378f86be1fc69245a1ea7c487c1 /engine/src/rendering
parent8936491b847513f74dad5642187fd8778c556afd (diff)
fix(engine): make draw props for skybox not leak into draws of renderablesHEADmaster
Diffstat (limited to 'engine/src/rendering')
-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(),