Skip to content

Commit 4709529

Browse files
authored
Remove Indirect Draws Occlusion Culling (#593)
1 parent 87f9ac4 commit 4709529

29 files changed

+99
-2323
lines changed

build.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ case $1 in
2121
;;
2222
serve)
2323
shift
24-
simple-http-server target/generated -c wasm,html,js -i
24+
simple-http-server target/generated -c wasm,html,js -i --nocache
2525
;;
2626
ci)
2727
cargo fmt

examples/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ wgpu-profiler = "0.16.0"
7474
console_log = "1"
7575
console_error_panic_hook = "0.1"
7676
js-sys = "0.3"
77+
gloo-console = "0.3"
7778
web-sys = "0.3.67"
7879
wasm-bindgen = "0.2.83"
7980
wasm-bindgen-futures = "0.4"

examples/src/cube_no_framework/mod.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,8 @@ pub fn main() {
109109
let base_rendergraph = rend3_routine::base::BaseRenderGraph::new(&renderer, &spp);
110110

111111
let mut data_core = renderer.data_core.lock();
112-
let pbr_routine = rend3_routine::pbr::PbrRoutine::new(
113-
&renderer,
114-
&mut data_core,
115-
&spp,
116-
&base_rendergraph.interfaces,
117-
&base_rendergraph.gpu_culler.culling_buffer_map_handle,
118-
);
112+
let pbr_routine =
113+
rend3_routine::pbr::PbrRoutine::new(&renderer, &mut data_core, &spp, &base_rendergraph.interfaces);
119114
drop(data_core);
120115
let tonemapping_routine = rend3_routine::tonemapping::TonemappingRoutine::new(
121116
&renderer,

examples/src/lib.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ mod static_gltf;
1313
mod textured_quad;
1414

1515
#[cfg(target_arch = "wasm32")]
16-
use log::info as println;
16+
use gloo_console::info as output;
17+
#[cfg(not(target_arch = "wasm32"))]
18+
use std::println as output;
1719

1820
#[cfg(test)]
1921
mod tests;
@@ -35,10 +37,10 @@ const EXAMPLES: &[ExampleDesc] = &[
3537
];
3638

3739
fn print_examples() {
38-
println!("Usage: cargo run <example_name>\n");
39-
println!("Available examples:");
40+
output!("Usage: cargo run <example_name>\n");
41+
output!("Available examples:");
4042
for example in EXAMPLES {
41-
println!(" {}", example.name);
43+
output!(" {}", example.name);
4244
}
4345
}
4446

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

5254
let Some(example) = EXAMPLES.iter().find(|example| example.name == example_name) else {
53-
println!("Unknown example: {}\n", example_name);
55+
output!("Unknown example: {}\n", example_name);
5456
print_examples();
5557
return;
5658
};

examples/src/scene_viewer/bistro.png

-11.3 KB
Loading

examples/src/tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ pub async fn test_app<A: App<T>, T: 'static>(mut config: TestConfiguration<A>) -
3434
&mut data_core,
3535
&spp,
3636
&base_rendergraph.interfaces,
37-
&base_rendergraph.gpu_culler.culling_buffer_map_handle,
3837
)),
3938
skybox: Mutex::new(rend3_routine::skybox::SkyboxRoutine::new(&renderer, &spp, &base_rendergraph.interfaces)),
4039
tonemapping: Mutex::new(rend3_routine::tonemapping::TonemappingRoutine::new(

rend3-framework/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ pub async fn async_start<A: App<T> + 'static, T: 'static>(mut app: A, window_bui
231231
&mut data_core,
232232
&spp,
233233
&base_rendergraph.interfaces,
234-
&base_rendergraph.gpu_culler.culling_buffer_map_handle,
235234
)),
236235
skybox: Mutex::new(rend3_routine::skybox::SkyboxRoutine::new(&renderer, &spp, &base_rendergraph.interfaces)),
237236
tonemapping: Mutex::new(rend3_routine::tonemapping::TonemappingRoutine::new(

0 commit comments

Comments
 (0)