Load shader from disk
This commit is contained in:
parent
36fa7a9dea
commit
e18a434581
|
@ -140,7 +140,12 @@ impl Renderer {
|
||||||
push_constant_ranges: &[],
|
push_constant_ranges: &[],
|
||||||
});
|
});
|
||||||
|
|
||||||
let shader = device.create_shader_module(&wgpu::include_wgsl!("shader.wgsl"));
|
let shader = device.create_shader_module(&wgpu::ShaderModuleDescriptor {
|
||||||
|
label: Some("shader.wgsl"),
|
||||||
|
source: wgpu::ShaderSource::Wgsl(
|
||||||
|
std::fs::read_to_string("src/shader.wgsl").unwrap().into(),
|
||||||
|
),
|
||||||
|
});
|
||||||
|
|
||||||
let render_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
|
let render_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
|
||||||
label: Some("Render Pipeline"),
|
label: Some("Render Pipeline"),
|
||||||
|
|
Loading…
Reference in New Issue