Skip to content

Commit

Permalink
Debug time
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald committed Sep 4, 2023
1 parent 4ac1e9d commit 9bb69be
Show file tree
Hide file tree
Showing 11 changed files with 226 additions and 173 deletions.
9 changes: 7 additions & 2 deletions examples/cube-no-framework/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,13 @@ fn main() {
let base_rendergraph = rend3_routine::base::BaseRenderGraph::new(&renderer, &spp);

let mut data_core = renderer.data_core.lock();
let pbr_routine =
rend3_routine::pbr::PbrRoutine::new(&renderer, &mut data_core, &spp, &base_rendergraph.interfaces);
let pbr_routine = rend3_routine::pbr::PbrRoutine::new(
&renderer,
&mut data_core,
&spp,
&base_rendergraph.interfaces,
&base_rendergraph.gpu_culler.culling_buffer_map_handle,
);
drop(data_core);
let tonemapping_routine = rend3_routine::tonemapping::TonemappingRoutine::new(
&renderer,
Expand Down
1 change: 1 addition & 0 deletions rend3-framework/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ pub async fn async_start<A: App<T> + 'static, T: 'static>(mut app: A, window_bui
&mut data_core,
&spp,
&base_rendergraph.interfaces,
&base_rendergraph.gpu_culler.culling_buffer_map_handle
)),
skybox: Mutex::new(rend3_routine::skybox::SkyboxRoutine::new(
&renderer,
Expand Down
12 changes: 6 additions & 6 deletions rend3-routine/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ impl BaseRenderGraph {
/// so desire.
pub struct BaseRenderGraphIntermediateState {
pub pre_cull: DataHandle<Buffer>,
pub shadow_cull: Vec<DataHandle<culling::DrawCallSet>>,
pub cull: DataHandle<culling::DrawCallSet>,
pub shadow_cull: Vec<DataHandle<Arc<culling::DrawCallSet>>>,
pub cull: DataHandle<Arc<culling::DrawCallSet>>,

pub shadow_uniform_bg: DataHandle<BindGroup>,
pub forward_uniform_bg: DataHandle<BindGroup>,
Expand Down Expand Up @@ -355,7 +355,7 @@ impl BaseRenderGraphIntermediateState {
routine.add_forward_to_graph(RoutineAddToGraphArgs {
graph,
whole_frame_uniform_bg: self.shadow_uniform_bg,
culled: Some(*shadow_cull),
culling_output_handle: Some(*shadow_cull),
per_material: &pbr.per_material,
extra_bgs: None,
label: &format!("pbr shadow renderering S{shadow_index}"),
Expand Down Expand Up @@ -402,7 +402,7 @@ impl BaseRenderGraphIntermediateState {
routine.add_forward_to_graph(RoutineAddToGraphArgs {
graph,
whole_frame_uniform_bg: self.forward_uniform_bg,
culled: None,
culling_output_handle: None,
per_material: &pbr.per_material,
extra_bgs: None,
label: "PBR Forward Pass 1",
Expand All @@ -427,7 +427,7 @@ impl BaseRenderGraphIntermediateState {
routine.add_forward_to_graph(RoutineAddToGraphArgs {
graph,
whole_frame_uniform_bg: self.forward_uniform_bg,
culled: Some(self.cull),
culling_output_handle: Some(self.cull),
per_material: &pbr.per_material,
extra_bgs: None,
label: "PBR Forward Pass 2",
Expand All @@ -450,7 +450,7 @@ impl BaseRenderGraphIntermediateState {
pbr.blend_routine.add_forward_to_graph(RoutineAddToGraphArgs {
graph,
whole_frame_uniform_bg: self.forward_uniform_bg,
culled: Some(self.cull),
culling_output_handle: Some(self.cull),
per_material: &pbr.per_material,
extra_bgs: None,
label: "PBR Forward",
Expand Down
Loading

0 comments on commit 9bb69be

Please sign in to comment.