Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Indirect Draws Occlusion Culling #593

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading