tirbofish/dropbear · diff
Merge pull request #86 from tirbofish/slang-shaders
feature: slang shaders
jarvis, run github actions
Signature present but could not be verified.
Unverified
@@ -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" @@ -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"] } @@ -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