Fix regression in SetOutlineDepth::Real.
This commit is contained in:
parent
bf1f1b3785
commit
12fa2e5448
@ -63,7 +63,7 @@ fn vertex(vertex: VertexInput) -> @builtin(position) vec4<f32> {
|
||||
#ifdef FLAT_DEPTH
|
||||
let out_zw = vec2<f32>(model_origin_z(vstage.origin, view.view_proj) * clip_pos.w, clip_pos.w);
|
||||
#else
|
||||
let out_zw = clip_pos.wz;
|
||||
let out_zw = clip_pos.zw;
|
||||
#endif
|
||||
#ifdef OFFSET_ZERO
|
||||
let out_xy = clip_pos.xy;
|
||||
|
@ -304,7 +304,9 @@ impl SpecializedMeshPipeline for OutlinePipeline {
|
||||
depth_compare: CompareFunction::Greater,
|
||||
stencil: StencilState::default(),
|
||||
bias: DepthBiasState {
|
||||
constant: if key.pass_type() == PassType::Stencil {
|
||||
constant: if key.depth_mode() == DepthMode::Flat
|
||||
&& key.pass_type() == PassType::Stencil
|
||||
{
|
||||
2 // 1 is empirically not enough to prevent Z-fighting.
|
||||
} else {
|
||||
0
|
||||
|
Loading…
Reference in New Issue
Block a user