mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Remove the depth buffer from the Third drawer
This commit is contained in:
parent
c159346489
commit
b7d22c7971
@ -27,16 +27,10 @@ uniform texture2D t_src_color;
|
||||
layout(set = 1, binding = 1)
|
||||
uniform sampler s_src_color;
|
||||
|
||||
// TODO: unused
|
||||
layout(set = 1, binding = 2)
|
||||
uniform texture2D t_src_depth;
|
||||
layout(set = 1, binding = 3)
|
||||
uniform sampler s_src_depth;
|
||||
|
||||
|
||||
layout(location = 0) in vec2 f_pos;
|
||||
|
||||
layout (std140, set = 1, binding = 4)
|
||||
layout (std140, set = 1, binding = 2)
|
||||
uniform u_locals {
|
||||
mat4 proj_mat_inv;
|
||||
mat4 view_mat_inv;
|
||||
|
@ -92,27 +92,9 @@ impl PostProcessLayout {
|
||||
ty: wgpu::BindingType::Sampler { filtering: true, comparison: false },
|
||||
count: None,
|
||||
},
|
||||
// src depth
|
||||
// TODO: THIS IS UNUSED IN THE SHADER
|
||||
wgpu::BindGroupLayoutEntry {
|
||||
binding: 2,
|
||||
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
|
||||
ty: wgpu::BindingType::Texture {
|
||||
sample_type: wgpu::TextureSampleType::Float { filterable: true },
|
||||
view_dimension: wgpu::TextureViewDimension::D2,
|
||||
multisampled: false,
|
||||
},
|
||||
count: None,
|
||||
},
|
||||
wgpu::BindGroupLayoutEntry {
|
||||
binding: 3,
|
||||
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
|
||||
ty: wgpu::BindingType::Sampler { filtering: true, comparison: false },
|
||||
count: None,
|
||||
},
|
||||
// Locals
|
||||
wgpu::BindGroupLayoutEntry {
|
||||
binding: 4,
|
||||
binding: 2,
|
||||
visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT,
|
||||
ty: wgpu::BindingType::Buffer {
|
||||
ty: wgpu::BufferBindingType::Uniform,
|
||||
@ -130,7 +112,6 @@ impl PostProcessLayout {
|
||||
&self,
|
||||
device: &wgpu::Device,
|
||||
src_color: &wgpu::TextureView,
|
||||
src_depth: &wgpu::TextureView,
|
||||
sampler: &wgpu::Sampler,
|
||||
locals: &Consts<Locals>,
|
||||
) -> BindGroup {
|
||||
@ -148,14 +129,6 @@ impl PostProcessLayout {
|
||||
},
|
||||
wgpu::BindGroupEntry {
|
||||
binding: 2,
|
||||
resource: wgpu::BindingResource::TextureView(src_depth),
|
||||
},
|
||||
wgpu::BindGroupEntry {
|
||||
binding: 3,
|
||||
resource: wgpu::BindingResource::Sampler(sampler),
|
||||
},
|
||||
wgpu::BindGroupEntry {
|
||||
binding: 4,
|
||||
resource: locals.buf().as_entire_binding(),
|
||||
},
|
||||
],
|
||||
@ -222,17 +195,7 @@ impl PostProcessPipeline {
|
||||
alpha_blend: wgpu::BlendDescriptor::REPLACE,
|
||||
write_mask: wgpu::ColorWrite::ALL,
|
||||
}],
|
||||
depth_stencil_state: Some(wgpu::DepthStencilStateDescriptor {
|
||||
format: wgpu::TextureFormat::Depth24Plus,
|
||||
depth_write_enabled: false,
|
||||
depth_compare: wgpu::CompareFunction::Always,
|
||||
stencil: wgpu::StencilStateDescriptor {
|
||||
front: wgpu::StencilStateFaceDescriptor::IGNORE,
|
||||
back: wgpu::StencilStateFaceDescriptor::IGNORE,
|
||||
read_mask: !0,
|
||||
write_mask: !0,
|
||||
},
|
||||
}),
|
||||
depth_stencil_state: None,
|
||||
vertex_state: wgpu::VertexStateDescriptor {
|
||||
index_format: None,
|
||||
vertex_buffers: &[/*Vertex::desc()*/],
|
||||
|
@ -238,17 +238,7 @@ impl UiPipeline {
|
||||
},
|
||||
write_mask: wgpu::ColorWrite::ALL,
|
||||
}],
|
||||
depth_stencil_state: Some(wgpu::DepthStencilStateDescriptor {
|
||||
format: wgpu::TextureFormat::Depth24Plus,
|
||||
depth_write_enabled: false,
|
||||
depth_compare: wgpu::CompareFunction::LessEqual,
|
||||
stencil: wgpu::StencilStateDescriptor {
|
||||
front: wgpu::StencilStateFaceDescriptor::IGNORE,
|
||||
back: wgpu::StencilStateFaceDescriptor::IGNORE,
|
||||
read_mask: !0,
|
||||
write_mask: !0,
|
||||
},
|
||||
}),
|
||||
depth_stencil_state: None,
|
||||
vertex_state: wgpu::VertexStateDescriptor {
|
||||
index_format: None,
|
||||
vertex_buffers: &[Vertex::desc()],
|
||||
|
@ -175,7 +175,6 @@ impl Locals {
|
||||
let postprocess_bind = layouts.postprocess.bind(
|
||||
device,
|
||||
tgt_color_pp_view,
|
||||
tgt_depth_view,
|
||||
sampler,
|
||||
&postprocess_locals,
|
||||
);
|
||||
@ -207,7 +206,6 @@ impl Locals {
|
||||
self.postprocess_bind = layouts.postprocess.bind(
|
||||
device,
|
||||
tgt_color_pp_view,
|
||||
tgt_depth_view,
|
||||
sampler,
|
||||
&self.postprocess,
|
||||
);
|
||||
|
@ -111,16 +111,7 @@ impl<'a> Drawer<'a> {
|
||||
},
|
||||
}],
|
||||
// TODO: do we need this?
|
||||
depth_stencil_attachment: Some(
|
||||
wgpu::RenderPassDepthStencilAttachmentDescriptor {
|
||||
attachment: &self.renderer.win_depth_view,
|
||||
depth_ops: Some(wgpu::Operations {
|
||||
load: wgpu::LoadOp::Clear(1.0),
|
||||
store: true,
|
||||
}),
|
||||
stencil_ops: None,
|
||||
},
|
||||
),
|
||||
depth_stencil_attachment: None
|
||||
});
|
||||
|
||||
render_pass.set_bind_group(0, &self.globals.bind_group, &[]);
|
||||
|
Loading…
Reference in New Issue
Block a user