Skip to content

Commit

Permalink
Rendering: Move the terrain routine to be second, because terrain is …
Browse files Browse the repository at this point in the history
…usually occluded by Doodads/WMOs (never otherwise)
  • Loading branch information
MeFisto94 committed Feb 9, 2025
1 parent b2156ec commit 6add17f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/rendering/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,30 +952,31 @@ fn base_rendergraph_add_to_graph<'node>(
// Render all the shadows to the shadow map.
state.pbr_shadow_rendering();

terrain_routine
units_routine
.opaque_routine
.add_forward_to_graph(ForwardRoutineArgs {
graph: state.graph,
label: "Terrain Forward Pass",
label: "Units Forward Pass",
camera: CameraSpecifier::Viewport,
binding_data: forward::ForwardRoutineBindingData {
whole_frame_uniform_bg: state.forward_uniform_bg,
per_material_bgl: &terrain_routine.per_material,
per_material_bgl: &units_routine.per_material,
extra_bgs: None,
},
samples: state.inputs.target.samples,
renderpass: state.primary_renderpass.clone(),
});

units_routine
// Render after units, for less overdraw.
terrain_routine
.opaque_routine
.add_forward_to_graph(ForwardRoutineArgs {
graph: state.graph,
label: "Units Forward Pass",
label: "Terrain Forward Pass",
camera: CameraSpecifier::Viewport,
binding_data: forward::ForwardRoutineBindingData {
whole_frame_uniform_bg: state.forward_uniform_bg,
per_material_bgl: &units_routine.per_material,
per_material_bgl: &terrain_routine.per_material,
extra_bgs: None,
},
samples: state.inputs.target.samples,
Expand Down

0 comments on commit 6add17f

Please sign in to comment.