You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Awesome crate, exactly what I was looking for. Is it still maintained? If not, is there a different way I can compile shaders at Rust compilation time?
Anyway, in wgpu_rs I use this code:
let vs = include_glsl_vs!("src/shader.vert");let vs_module =
device.create_shader_module(&wgpu::read_spirv(std::io::Cursor::new(&vs[..])).unwrap());let fs = include_glsl_fs!("src/shader.frag");let fs_module =
device.create_shader_module(&wgpu::read_spirv(std::io::Cursor::new(&fs[..])).unwrap());
But when I make changes to e.g. shader.frag I have to change the name of the imported file for it to throw an error and then change it back to the correct name for it to recompile the spir-v data. If I don't do this the Rust compilation is almost instant and is using the previous (before the change) data.
The text was updated successfully, but these errors were encountered:
Awesome crate, exactly what I was looking for. Is it still maintained? If not, is there a different way I can compile shaders at Rust compilation time?
Anyway, in wgpu_rs I use this code:
But when I make changes to e.g.
shader.frag
I have to change the name of the imported file for it to throw an error and then change it back to the correct name for it to recompile the spir-v data. If I don't do this the Rust compilation is almost instant and is using the previous (before the change) data.The text was updated successfully, but these errors were encountered: