Skip to content

Commit

Permalink
fix render to depth image on Apple Retina displays (#7001)
Browse files Browse the repository at this point in the history
One of the few differences is that the depth version calls ConfigureForColorPicking, which disables a lot of the post processing that is used for RGB rendering, as it's not required for depth rendering. Surprisingly, it turns out that activating shadowing again for the depth rendering fixes the scaling issue and the depth image saves correctly. I was not able to find any obvious cause for this in Open3D code, so for now I am assuming that setShadowingEnabled has some unknown side effect in Filament.
  • Loading branch information
rxba authored Oct 21, 2024
1 parent 1a98853 commit d829996
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
- Support lowercase types when reading PCD files (PR #6930)
- Fix visualization/draw ICP example and add warnings (PR #6933)
- Fix alpha shape reconstruction if alpha too small for point scale (PR #6998)
- Fix render to depth image on Apple Retina displays (PR #7001)

## 0.13

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ void FilamentRenderToBuffer::CopySettings(const View* view) {
// overhead and the depth buffer is discarded when post-processing is
// enabled so the returned image is all 0s.
view_->ConfigureForColorPicking();
// Set shadowing to true as there is a pixel coordinate scaling
// issue on Apple Retina displays that results in quarter size depth
// images if shadowing is disabled.
view_->SetShadowing(true, View::ShadowType::kPCF);
}
}

Expand Down

0 comments on commit d829996

Please sign in to comment.