Skip to content

Commit

Permalink
Tweak the depth bias multiplier for WebGL (#2491)
Browse files Browse the repository at this point in the history
### What
Closes #2483

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2491

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/12ef481/docs
Examples preview: https://rerun.io/preview/12ef481/examples
<!-- pr-link-docs:end -->
  • Loading branch information
emilk authored Jun 26, 2023
1 parent fad55fc commit e5ccdce
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit e5ccdce

Please sign in to comment.