Skip to content

Commit aa76b6e

Browse files
committed
Fix depth clamping semantics
1 parent 8d5f24f commit aa76b6e

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/conv.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use crate::{
22
binding_model, command, pipeline, resource, Color,
33
Extent3d, Origin3d,
4-
MAX_DEPTH_BIAS_CLAMP,
54
};
65

76

@@ -491,7 +490,7 @@ pub fn map_rasterization_state_descriptor(
491490
pipeline::FrontFace::Ccw => hal::pso::FrontFace::CounterClockwise,
492491
pipeline::FrontFace::Cw => hal::pso::FrontFace::Clockwise,
493492
},
494-
depth_bias: if desc.depth_bias != 0 || desc.depth_bias_slope_scale != 0.0 || desc.depth_bias_clamp < MAX_DEPTH_BIAS_CLAMP {
493+
depth_bias: if desc.depth_bias != 0 || desc.depth_bias_slope_scale != 0.0 || desc.depth_bias_clamp != 0.0 {
495494
Some(hal::pso::State::Static(hal::pso::DepthBias {
496495
const_factor: desc.depth_bias as f32,
497496
slope_factor: desc.depth_bias_slope_scale,

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ pub use self::hub::{HUB, Id, IdentityManager, Registry};
4444
use std::ptr;
4545
use std::sync::atomic::{AtomicUsize, Ordering};
4646

47-
pub const MAX_DEPTH_BIAS_CLAMP: f32 = 16.0;
4847
type SubmissionIndex = usize;
4948

5049
//TODO: make it private. Currently used for swapchain creation impl.

0 commit comments

Comments
 (0)