working generating camera rays from view and proj matrices
This commit is contained in:
@@ -58,9 +58,14 @@ fn main() {
|
||||
let mut compiler = shaderc::Compiler::new().expect("Unable to create shader compiler");
|
||||
for shader in shaders {
|
||||
println!("cargo:rerun-if-changed={}", shader.src_path.as_os_str().to_str().unwrap());
|
||||
let compiled = compiler.compile_into_spirv(&shader.source, shader.kind, &shader.src_path.to_str().unwrap(), "main", Some(&options))
|
||||
.expect("Shader error:");
|
||||
write(shader.spv_path, compiled.as_binary_u8()).unwrap();
|
||||
|
||||
let result = compiler.compile_into_spirv(&shader.source, shader.kind, &shader.src_path.to_str().unwrap(), "main", Some(&options));
|
||||
match result {
|
||||
Err(err) => { panic!("Failed: {}", err); },
|
||||
Ok(data) => {
|
||||
write(shader.spv_path, data.as_binary_u8()).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Rebuild if any of the cginc change
|
||||
|
||||
Reference in New Issue
Block a user