fix(render): eliminate depth-write edge conflict at polyline arc joints

This commit is contained in:
Karim Jerbi committed 2026-09-09 13:02:03 +01:00
1 parent f0cc4ffba8
commit 2875d4ae61
3 files changed
+16 -4

No files matched your search

+1 -1
View File
@@ -145,7 +145,7 @@ pub fn create_pipelines(
},
depth_stencil: Some(wgpu::DepthStencilState {
format: wgpu::TextureFormat::Depth24PlusStencil8,
depth_write_enabled: Some(true),
depth_write_enabled: Some(false),
depth_compare: Some(wgpu::CompareFunction::LessEqual),
stencil: content_stencil.clone(),
bias: wgpu::DepthBiasState::default(),
+1 -1
View File
@@ -145,7 +145,7 @@ pub fn create_pipelines(
},
depth_stencil: Some(wgpu::DepthStencilState {
format: wgpu::TextureFormat::Depth24PlusStencil8,
depth_write_enabled: Some(true),
depth_write_enabled: Some(false),
depth_compare: Some(wgpu::CompareFunction::LessEqual),
stencil: content_stencil.clone(),
bias: wgpu::DepthBiasState::default(),
+14 -2
View File
@@ -2449,11 +2449,17 @@ impl Pipeline {
if instances.is_empty() {
vec![]
} else {
let mut sorted = instances.to_vec();
sorted.sort_by(|a, b| {
a.params[2]
.partial_cmp(&b.params[2])
.unwrap_or(std::cmp::Ordering::Equal)
});
vec![CircleGpu::from_instances(
device,
queue,
"viewer.circles",
instances,
&sorted,
)]
}
}
@@ -2489,11 +2495,17 @@ impl Pipeline {
if instances.is_empty() {
vec![]
} else {
let mut sorted = instances.to_vec();
sorted.sort_by(|a, b| {
a.params[2]
.partial_cmp(&b.params[2])
.unwrap_or(std::cmp::Ordering::Equal)
});
vec![EllipseGpu::from_instances(
device,
queue,
"viewer.ellipses",
instances,
&sorted,
)]
}
}