diff --git a/assets/voxygen/shaders/clouds-frag.glsl b/assets/voxygen/shaders/clouds-frag.glsl index ef40883157..7d02bf0f1d 100644 --- a/assets/voxygen/shaders/clouds-frag.glsl +++ b/assets/voxygen/shaders/clouds-frag.glsl @@ -22,19 +22,19 @@ #include #include -layout(set = 2, binding = 0) +layout(set = 1, binding = 0) uniform texture2D t_src_color; -layout(set = 2, binding = 1) +layout(set = 1, binding = 1) uniform sampler s_src_color; -layout(set = 2, binding = 2) +layout(set = 1, binding = 2) uniform texture2D t_src_depth; -layout(set = 2, binding = 3) +layout(set = 1, binding = 3) uniform sampler s_src_depth; layout(location = 0) in vec2 uv; -layout (std140, set = 2, binding = 4) +layout (std140, set = 1, binding = 4) uniform u_locals { mat4 proj_mat_inv; mat4 view_mat_inv; diff --git a/voxygen/src/render/pipelines/clouds.rs b/voxygen/src/render/pipelines/clouds.rs index 87944f0298..613613e572 100644 --- a/voxygen/src/render/pipelines/clouds.rs +++ b/voxygen/src/render/pipelines/clouds.rs @@ -42,7 +42,7 @@ impl CloudsLayout { // Color source wgpu::BindGroupLayoutEntry { binding: 0, - visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, + visibility: wgpu::ShaderStage::FRAGMENT, ty: wgpu::BindingType::Texture { sample_type: wgpu::TextureSampleType::Float { filterable: true }, view_dimension: wgpu::TextureViewDimension::D2, @@ -52,7 +52,7 @@ impl CloudsLayout { }, wgpu::BindGroupLayoutEntry { binding: 1, - visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, + visibility: wgpu::ShaderStage::FRAGMENT, ty: wgpu::BindingType::Sampler { filtering: true, comparison: false, @@ -62,7 +62,7 @@ impl CloudsLayout { // Depth source wgpu::BindGroupLayoutEntry { binding: 2, - visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, + visibility: wgpu::ShaderStage::FRAGMENT, ty: wgpu::BindingType::Texture { sample_type: wgpu::TextureSampleType::Float { filterable: true }, view_dimension: wgpu::TextureViewDimension::D2, @@ -72,7 +72,7 @@ impl CloudsLayout { }, wgpu::BindGroupLayoutEntry { binding: 3, - visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, + visibility: wgpu::ShaderStage::FRAGMENT, ty: wgpu::BindingType::Sampler { filtering: true, comparison: false, @@ -82,7 +82,7 @@ impl CloudsLayout { // Locals wgpu::BindGroupLayoutEntry { binding: 4, - visibility: wgpu::ShaderStage::VERTEX | wgpu::ShaderStage::FRAGMENT, + visibility: wgpu::ShaderStage::FRAGMENT, ty: wgpu::BindingType::Buffer { ty: wgpu::BufferBindingType::Uniform, has_dynamic_offset: false, @@ -153,11 +153,7 @@ impl CloudsPipeline { device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Some("Clouds pipeline layout"), push_constant_ranges: &[], - bind_group_layouts: &[ - &global_layout.globals, - &global_layout.shadow_textures, - &layout.layout, - ], + bind_group_layouts: &[&global_layout.globals, &layout.layout], }); let samples = match aa_mode { diff --git a/voxygen/src/render/renderer/drawer.rs b/voxygen/src/render/renderer/drawer.rs index ab3795ebc8..f9e32b58b5 100644 --- a/voxygen/src/render/renderer/drawer.rs +++ b/voxygen/src/render/renderer/drawer.rs @@ -202,9 +202,6 @@ impl<'frame> Drawer<'frame> { /// Returns None if the clouds pipeline is not available pub fn second_pass(&mut self) -> Option { let pipeline = &self.borrow.pipelines.all()?.clouds; - // Note: this becomes Some once pipeline creation is complete even if shadows - // are not enabled - let shadow = self.borrow.shadow?; let encoder = self.encoder.as_mut().unwrap(); let device = self.borrow.device; @@ -223,8 +220,6 @@ impl<'frame> Drawer<'frame> { }); render_pass.set_bind_group(0, &self.globals.bind_group, &[]); - // TODO: what are shadows used for here???? - render_pass.set_bind_group(1, &shadow.bind.bind_group, &[]); Some(SecondPassDrawer { render_pass, @@ -743,7 +738,7 @@ impl<'pass> SecondPassDrawer<'pass> { pub fn draw_clouds(&mut self) { self.render_pass.set_pipeline(&self.pipeline.pipeline); self.render_pass - .set_bind_group(2, &self.borrow.locals.clouds_bind.bind_group, &[]); + .set_bind_group(1, &self.borrow.locals.clouds_bind.bind_group, &[]); self.render_pass.draw(0..3, 0..1); } }