kitgit

tirbofish/dropbear · diff

98da270 · Thribhu K

Merge pull request #86 from tirbofish/slang-shaders feature: slang shaders jarvis, run github actions

Unverified

diff --git a/Cargo.toml b/Cargo.toml
index 9042336..8d56500 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -75,6 +75,8 @@ postcard = { version = "1.1"}
 pollster = "0.4"
 yakui = { git = "https://github.com/SecondHalfGames/yakui", rev = "ddf7614" }
 yakui-wgpu = { git = "https://github.com/SecondHalfGames/yakui", rev = "ddf7614" }
+thiserror = "2.0"
+tempfile = "3.24"
 
 [workspace.dependencies.image]
 version = "0.25"
diff --git a/crates/dropbear-engine/Cargo.toml b/crates/dropbear-engine/Cargo.toml
index 8897280..5a68677 100644
--- a/crates/dropbear-engine/Cargo.toml
+++ b/crates/dropbear-engine/Cargo.toml
@@ -12,6 +12,7 @@ readme.workspace = true
 dropbear_future-queue = { path = "../dropbear_future-queue" }
 dropbear-traits = { path = "../dropbear-traits" }
 dropbear-macro = { path = "../dropbear-macro" }
+slank = { path = "../slank", features = ["download-slang", "use-wgpu"] }
 
 anyhow.workspace = true
 app_dirs2.workspace = true
@@ -53,3 +54,6 @@ rfd.workspace = true
 version = "0.25"
 default-features = false
 features = ["png", "jpeg"]
+
+[build-dependencies]
+slank = { path = "../slank", features = ["download-slang"] }
\ No newline at end of file
diff --git a/crates/dropbear-engine/build.rs b/crates/dropbear-engine/build.rs
new file mode 100644
index 0000000..7f01aa4
--- /dev/null
+++ b/crates/dropbear-engine/build.rs
@@ -0,0 +1,19 @@
+use slank::{SlangShaderBuilder, SlangTarget};
+
+fn main() {
+    // to copy paste:         
+    // let shader = Shader::from_slang(graphics.clone(), &slank::compiled::CompiledSlangShader::from_bytes("light cube", include_slang!("light_cube")));
+
+    SlangShaderBuilder::new("light_cube")
+        .add_source_path("src/pipelines/shaders/light.slang").unwrap()
+        .compile_to_out_dir(SlangTarget::SpirV).unwrap();
+
+    SlangShaderBuilder::new("blit_shader")

Large diffs are not rendered by default. Showing the first 50 of 1483 lines. Show full diff