diff --git a/Cargo.toml b/Cargo.toml index 6f9bb52c..a72804c1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,6 @@ bevy = { version = "0.14.0", default-features = false, features = [ "bevy_sprite", ] } log = "0.4" -regex = "1.5.4" serde = { version = "1", features = ["derive"], optional = true } [dev-dependencies] diff --git a/src/render/include_shader.rs b/src/render/include_shader.rs deleted file mode 100644 index abac0f0f..00000000 --- a/src/render/include_shader.rs +++ /dev/null @@ -1,18 +0,0 @@ -use regex::Regex; - -pub fn include_shader(shader_includes: Vec<&'static str>, shader: &'static str) -> String { - let mut final_shader = String::new(); - - final_shader.push_str(shader); - - let re = Regex::new(r"#include \d").unwrap(); - - for capture in re.captures_iter(shader) { - let include_text: String = capture.get(0).unwrap().as_str().into(); - let include_id_text = include_text.replace("#include ", ""); - let include_id: usize = include_id_text.parse::().unwrap(); - final_shader = final_shader.replace(&include_text, shader_includes[include_id]); - } - - final_shader -} diff --git a/src/render/mod.rs b/src/render/mod.rs index 957ebfa5..905a1669 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -43,7 +43,6 @@ use self::{ mod chunk; mod draw; mod extract; -mod include_shader; pub mod material; mod pipeline; pub(crate) mod prepare;