From 6a819a1884e8e15e8e43fbc86c5f57f94efc552b Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Mon, 23 Dec 2019 18:13:05 -0600 Subject: [PATCH] render resources refactor and normal forward rendering --- Cargo.toml | 5 +- examples/simple.rs | 4 +- src/application.rs | 74 +++--- src/render/forward/forward.frag | 20 +- src/render/forward/mod.rs | 72 +++--- src/render/forward_shadow/forward_shadow.frag | 62 +++++ src/render/forward_shadow/forward_shadow.vert | 22 ++ src/render/forward_shadow/mod.rs | 230 ++++++++++++++++++ src/render/mod.rs | 4 + src/render/pass.rs | 3 +- src/render/render_resources.rs | 74 ++++++ src/render/shadow/mod.rs | 65 +---- 12 files changed, 479 insertions(+), 156 deletions(-) create mode 100644 src/render/forward_shadow/forward_shadow.frag create mode 100644 src/render/forward_shadow/forward_shadow.vert create mode 100644 src/render/forward_shadow/mod.rs create mode 100644 src/render/render_resources.rs diff --git a/Cargo.toml b/Cargo.toml index f6ce8fa0c4..42b1c59916 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,4 +14,7 @@ glsl-to-spirv = "0.1" zerocopy = "0.2" log = "0.4" env_logger = "0.7" -rand = "0.7.2" \ No newline at end of file +rand = "0.7.2" + +[profile.release] +debug = true \ No newline at end of file diff --git a/examples/simple.rs b/examples/simple.rs index 5f3a4ed8b4..3beaaa5c07 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -109,9 +109,9 @@ fn build_spawner_system(world: &mut World) -> Box { mesh_storage.get_named("cube").unwrap() }; - let duration = 10000.0; + let duration = 0.5; let mut elapsed = duration; - let batch_size = 5; + let batch_size = 100; SystemBuilder::new("Spawner") .read_resource::