Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak the depth bias multiplier for WebGL #2491

Merged
merged 2 commits into from
Jun 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion crates/re_renderer/shader/utils/depth_offset.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ fn apply_depth_offset(position: Vec4, offset: f32) -> Vec4 {
var w_scale_bias = f32eps * offset;
if frame.device_tier == DEVICE_TIER_GLES {
// Empirically determined, see section on GLES above.
w_scale_bias *= 1000.0;
// For `human_pose_tracking` 1000.0 is way too high, 512.0 mostly works, 64.0 is better: https://github.com/rerun-io/rerun/issues/2483
w_scale_bias *= 5120.0;
}
let w_scale = 1.0 - w_scale_bias;

Expand Down