Fix depth

This commit is contained in:
Maximilian Ammann 2021-12-05 12:46:42 +01:00
parent 5efe51ad5b
commit daeabb4d77
2 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ pub fn create_map_render_pipeline_description<'a>(
depth_stencil: Some(wgpu::DepthStencilState {
format: DEPTH_TEXTURE_FORMAT,
depth_write_enabled: true,
depth_compare: wgpu::CompareFunction::Less,
depth_compare: wgpu::CompareFunction::LessEqual,
stencil: wgpu::StencilState {
front: stencil_state,
back: stencil_state,

View File

@ -99,10 +99,10 @@ impl SceneParams {
// Stroke primitive
cpu_primitives[STROKE_PRIM_ID as usize] =
Primitive::new([0.0, 0.0, 0.0, 1.0], [0.0, 0.0], 3, 1.0, 0.0, 1.0);
Primitive::new([0.0, 0.0, 0.0, 1.0], [0.0, 0.0], 0, 1.0, 0.0, 1.0);
// Main fill primitive
cpu_primitives[FILL_PRIM_ID as usize] =
Primitive::new([0.0, 0.0, 0.0, 1.0], [0.0, 0.0], 1, 0.0, 0.0, 1.0);
Primitive::new([0.0, 0.0, 0.0, 1.0], [0.0, 0.0], 0, 0.0, 0.0, 1.0);
Self {
cpu_primitives,