Skip to content

Commit

Permalink
Remove Indirect Draws Occlusion Culling (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald authored Apr 23, 2024
1 parent 87f9ac4 commit 4709529
Show file tree
Hide file tree
Showing 29 changed files with 99 additions and 2,323 deletions.
2 changes: 1 addition & 1 deletion build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ case $1 in
;;
serve)
shift
simple-http-server target/generated -c wasm,html,js -i
simple-http-server target/generated -c wasm,html,js -i --nocache
;;
ci)
cargo fmt
Expand Down
1 change: 1 addition & 0 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ wgpu-profiler = "0.16.0"
console_log = "1"
console_error_panic_hook = "0.1"
js-sys = "0.3"
gloo-console = "0.3"
web-sys = "0.3.67"
wasm-bindgen = "0.2.83"
wasm-bindgen-futures = "0.4"
Expand Down
9 changes: 2 additions & 7 deletions examples/src/cube_no_framework/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,8 @@ pub 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,
&base_rendergraph.gpu_culler.culling_buffer_map_handle,
);
let pbr_routine =
rend3_routine::pbr::PbrRoutine::new(&renderer, &mut data_core, &spp, &base_rendergraph.interfaces);
drop(data_core);
let tonemapping_routine = rend3_routine::tonemapping::TonemappingRoutine::new(
&renderer,
Expand Down
12 changes: 7 additions & 5 deletions examples/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ mod static_gltf;
mod textured_quad;

#[cfg(target_arch = "wasm32")]
use log::info as println;
use gloo_console::info as output;
#[cfg(not(target_arch = "wasm32"))]
use std::println as output;

#[cfg(test)]
mod tests;
Expand All @@ -35,10 +37,10 @@ const EXAMPLES: &[ExampleDesc] = &[
];

fn print_examples() {
println!("Usage: cargo run <example_name>\n");
println!("Available examples:");
output!("Usage: cargo run <example_name>\n");
output!("Available examples:");
for example in EXAMPLES {
println!(" {}", example.name);
output!(" {}", example.name);
}
}

Expand All @@ -50,7 +52,7 @@ pub fn main_with_name(example_name: Option<String>) {
};

let Some(example) = EXAMPLES.iter().find(|example| example.name == example_name) else {
println!("Unknown example: {}\n", example_name);
output!("Unknown example: {}\n", example_name);
print_examples();
return;
};
Expand Down
Binary file modified examples/src/scene_viewer/bistro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion examples/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ pub async fn test_app<A: App<T>, T: 'static>(mut config: TestConfiguration<A>) -
&mut data_core,
&spp,
&base_rendergraph.interfaces,
&base_rendergraph.gpu_culler.culling_buffer_map_handle,
)),
skybox: Mutex::new(rend3_routine::skybox::SkyboxRoutine::new(&renderer, &spp, &base_rendergraph.interfaces)),
tonemapping: Mutex::new(rend3_routine::tonemapping::TonemappingRoutine::new(
Expand Down
1 change: 0 additions & 1 deletion rend3-framework/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ 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, &spp, &base_rendergraph.interfaces)),
tonemapping: Mutex::new(rend3_routine::tonemapping::TonemappingRoutine::new(
Expand Down
Loading

0 comments on commit 4709529

Please sign in to comment.