Remove params
It’s easier to just edit the shader
This commit is contained in:
parent
5d8a7e7a62
commit
001d7051ad
|
|
@ -22,7 +22,6 @@ pub struct Vertex {
|
||||||
pub struct Pipeline {
|
pub struct Pipeline {
|
||||||
view_buf: wgpu::Buffer,
|
view_buf: wgpu::Buffer,
|
||||||
params_buf: wgpu::Buffer,
|
params_buf: wgpu::Buffer,
|
||||||
bindings: wgpu::BindGroup,
|
|
||||||
pipeline: wgpu::RenderPipeline,
|
pipeline: wgpu::RenderPipeline,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -93,18 +92,9 @@ impl Pipeline {
|
||||||
multiview: None,
|
multiview: None,
|
||||||
cache: None,
|
cache: None,
|
||||||
});
|
});
|
||||||
let bindings = device.create_bind_group(&wgpu::BindGroupDescriptor {
|
|
||||||
label: None,
|
|
||||||
layout: &pipeline.get_bind_group_layout(0),
|
|
||||||
entries: &[wgpu::BindGroupEntry {
|
|
||||||
binding: 0,
|
|
||||||
resource: params_buf.as_entire_binding(),
|
|
||||||
}],
|
|
||||||
});
|
|
||||||
Self {
|
Self {
|
||||||
view_buf,
|
view_buf,
|
||||||
params_buf,
|
params_buf,
|
||||||
bindings,
|
|
||||||
pipeline,
|
pipeline,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -120,7 +110,6 @@ impl Pipeline {
|
||||||
pub fn render(&self, pass: &mut wgpu::RenderPass) {
|
pub fn render(&self, pass: &mut wgpu::RenderPass) {
|
||||||
pass.set_pipeline(&self.pipeline);
|
pass.set_pipeline(&self.pipeline);
|
||||||
pass.set_vertex_buffer(0, self.view_buf.slice(..));
|
pass.set_vertex_buffer(0, self.view_buf.slice(..));
|
||||||
pass.set_bind_group(0, &self.bindings, &[]);
|
|
||||||
pass.draw(0..4, 0..1);
|
pass.draw(0..4, 0..1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,6 @@ struct Varying {
|
||||||
@builtin(position) screen: vec4f,
|
@builtin(position) screen: vec4f,
|
||||||
}
|
}
|
||||||
|
|
||||||
@group(0) @binding(0) var<uniform> params: Params;
|
|
||||||
|
|
||||||
@vertex
|
@vertex
|
||||||
fn on_vertex(in: Vertex) -> Varying {
|
fn on_vertex(in: Vertex) -> Varying {
|
||||||
return Varying(in.world, vec4(in.screen, 0.0, 1.0));
|
return Varying(in.world, vec4(in.screen, 0.0, 1.0));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user