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:
Removes use of 4x MSAA which achieved nothing as the content was rendered to a non-multisampled framebuffer in the first place.
Cleans up various interesting ways of doing vector math.
Removes an assertion in the RenderTarget that required the source and destination size to match, and switches the filter to linear to not look that blocky.
Removes an errorneous multiplication by dpiScaling() when getting a framebuffer-relative mouse position. The DPI scaling value is already baked into the framebuffer size at that point, thus multiplying again gives an incorrect value.
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
[x] New feature (non-breaking change which adds functionality)
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:
dpiScaling()
when getting a framebuffer-relative mouse position. The DPI scaling value is already baked into the framebuffer size at that point, thus multiplying again gives an incorrect value.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