facebookresearch / habitat-sim

A flexible, high-performance 3D simulator for Embodied AI research.
https://aihabitat.org/
MIT License
2.54k stars 414 forks source link

Ability to render the viewer content at quarter resolution on very-high-DPI screens #2321

Closed mosra closed 6 months ago

mosra commented 6 months ago

Motivation and Context

Changes needed in the native viewer application and the RenderTarget to allow for rendering at a resolution that's smaller than the actual framebuffer. For simplicity halving the framebuffer width and height, thus quarter of the size, however the limit at which this switch is done is configurable, so it's also achievable on non-HiDPI displays if you pass --quarter-resolution-scaling-limit 1 to the app.

It also:

See also https://cvmlp.slack.com/archives/CFN5TAUSD/p1697296903351319 for original context.

How Has This Been Tested

On my Linux box with a 4K display, 1.6875x DPI scaling and --quarter-resolution-scaling-limit 1.6. The way the limit calculation is done it should work on a Mac as well.

Types of changes