fix(wipeout): bias the mask toward the camera so it wins coincident depth
Even collected at the right place, a block-internal wipeout still let geometry show through: the wipeout pipeline's depth bias was positive, pushing the mask behind geometry at the same depth (a block's wipeout and its shapes are coincident at Z=0), so LessEqual rejected it. Bias toward the camera (constant -8, slope -1) so the mask wins against coincident 2-D geometry, small enough that genuinely nearer geometry still occludes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
de5c35d44a
commit
346f4ce27d
1 changed files with 7 additions and 2 deletions
|
|
@ -633,9 +633,14 @@ impl Pipeline {
|
|||
depth_write_enabled: true,
|
||||
depth_compare: wgpu::CompareFunction::LessEqual,
|
||||
stencil: content_stencil.clone(),
|
||||
// Bias TOWARD the camera: a wipeout must win against geometry at
|
||||
// its own depth (a block's wipeout + shapes are coincident at
|
||||
// Z=0). A positive bias pushed the mask behind, so LessEqual
|
||||
// rejected it and the geometry showed through. Tiny enough that
|
||||
// meaningfully-nearer geometry still occludes the mask.
|
||||
bias: wgpu::DepthBiasState {
|
||||
constant: 1,
|
||||
slope_scale: 1.0,
|
||||
constant: -8,
|
||||
slope_scale: -1.0,
|
||||
clamp: 0.0,
|
||||
},
|
||||
}),
|
||||
|
|
|
|||
Loading…
Reference in a new issue