diff --git a/assets/voxygen/shaders/postprocess-frag.glsl b/assets/voxygen/shaders/postprocess-frag.glsl index 23f45fb4f2..cd14c0711d 100644 --- a/assets/voxygen/shaders/postprocess-frag.glsl +++ b/assets/voxygen/shaders/postprocess-frag.glsl @@ -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; diff --git a/voxygen/src/render/pipelines/postprocess.rs b/voxygen/src/render/pipelines/postprocess.rs index 6525ee0190..16d8e6f7de 100644 --- a/voxygen/src/render/pipelines/postprocess.rs +++ b/voxygen/src/render/pipelines/postprocess.rs @@ -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, ) -> 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()*/], diff --git a/voxygen/src/render/pipelines/ui.rs b/voxygen/src/render/pipelines/ui.rs index 2498612c4f..9a3dbdc4ee 100644 --- a/voxygen/src/render/pipelines/ui.rs +++ b/voxygen/src/render/pipelines/ui.rs @@ -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()], diff --git a/voxygen/src/render/renderer.rs b/voxygen/src/render/renderer.rs index c20f24e0b9..267e9d0624 100644 --- a/voxygen/src/render/renderer.rs +++ b/voxygen/src/render/renderer.rs @@ -176,7 +176,6 @@ impl Locals { let postprocess_bind = layouts.postprocess.bind( device, tgt_color_pp_view, - tgt_depth_view, sampler, &postprocess_locals, ); @@ -208,7 +207,6 @@ impl Locals { self.postprocess_bind = layouts.postprocess.bind( device, tgt_color_pp_view, - tgt_depth_view, sampler, &self.postprocess, ); diff --git a/voxygen/src/render/renderer/drawer.rs b/voxygen/src/render/renderer/drawer.rs index 3eaf9bce59..0847f28f26 100644 --- a/voxygen/src/render/renderer/drawer.rs +++ b/voxygen/src/render/renderer/drawer.rs @@ -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, &[]);