From 86e152112829ac79c6174588bcfef4052eef9524 Mon Sep 17 00:00:00 2001 From: nullprop Date: Sat, 15 Apr 2023 23:05:53 +0300 Subject: [PATCH] Less -> LessEqual --- src/core/pass.rs | 2 +- src/core/state.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/pass.rs b/src/core/pass.rs index 7bdba74..1aa0ca1 100644 --- a/src/core/pass.rs +++ b/src/core/pass.rs @@ -93,7 +93,7 @@ impl RenderPass { depth_stencil: depth_format.map(|format| wgpu::DepthStencilState { format, depth_write_enabled: true, - depth_compare: wgpu::CompareFunction::Less, + depth_compare: wgpu::CompareFunction::LessEqual, stencil: wgpu::StencilState::default(), bias: wgpu::DepthBiasState::default(), }), diff --git a/src/core/state.rs b/src/core/state.rs index c16d696..952a565 100644 --- a/src/core/state.rs +++ b/src/core/state.rs @@ -138,7 +138,7 @@ impl State { &device, &config, "depth_texture", - Some(wgpu::CompareFunction::Less), + Some(wgpu::CompareFunction::LessEqual), 1, wgpu::TextureUsages::RENDER_ATTACHMENT, ); @@ -147,7 +147,7 @@ impl State { &device, &config, "light_depth_texture", - Some(wgpu::CompareFunction::Less), + Some(wgpu::CompareFunction::LessEqual), 6, wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::TEXTURE_BINDING, ); @@ -446,7 +446,7 @@ impl State { &self.device, &self.config, "depth_texture", - Some(wgpu::CompareFunction::Less), + Some(wgpu::CompareFunction::LessEqual), 1, wgpu::TextureUsages::RENDER_ATTACHMENT, ); @@ -456,7 +456,7 @@ impl State { &self.device, &self.config, "light_depth_texture", - Some(wgpu::CompareFunction::Less), + Some(wgpu::CompareFunction::LessEqual), 6, wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::TEXTURE_BINDING, );