I’ve looked at the engine code that updates screen percentage and can give a bit of an insight here.
Editor and runtime (PIE and packaged game) viewports use different functions that define screen percentage modes (PullEditorRenderingSettings and PullRunTimeRenderingSettings respecively, both defined in LegacyScreenPercentageDriver.cpp).
The runtime viewport uses the project settings for defining the screen percentage mode (there are 2 separate settings, for editor and packaged game), but if r.ScreenPercentage is defined, it will use it instead of the setting. The scalability settings usually write directly to r.ScreenPercentage, overriding the project setting. However, as mentioned above, it won’t change it unless you manually change the graphics preset in the viewport settings, and it also seems to stop writing to r.ScreenPercentage if you start setting the value yourself in the console.
There is no way to use “Based on Display Resolution” setting in the Standalone Game.
This was not true on my end - I managed to reflect the project settings on the screen percentage seen in packaged build by packaging two builds with different settings and seeing the difference. Maybe this is related to graphics settings automatically writing to r.ScreenPercentage, I don’t know.
The editor viewport, on the contrary, pulls the screen percentage mode from the project settings directly, ignoring r.ScreenPercentage. This is why editor viewport ignores the scalability settings and won’t change the screen percentage even if you change r.ScreenPercentage in the console.
Motivations for the changes were explained in the engine source commit - github.com (needs repo access)
Commit desription
Changes default screen percentage behavior in editor to take more advantage of TSR’s upscaling behavior already enabled by default
-
Editor viewports now display at high DPI by default for better Gen5-console feeling in editor on high DPI monitors.
-
Realtime editor viewports now display at screen percentage based on the display pixel count. Fix screen percentage independent of the pixel range could either render not enough pixel at low display resolution or be too slow at high display resolution. Given the level editor viewport can scale in size based on editor user layout preference, monitor, the screen percentage automatically scalling based on display pixel count gives a better experience of quality consistency/GPU cost for rendering frame, especially when going level editor fullscreen with F11 or not. The curve to compute rendering resolution from display resolution is in BaseEngine.ini
-
Non-realtime editor viewports still display at a screen percentage based on OS DPI scale, independent of the display pixel count because use spatial upscaler and therefore need consistent sharpness not worst than editor fonts, but keep same rendering resolution as before to not increase out of GPU memory errors. The performance of potentially rendering at high resolution than a realtime viewport is ignored given the non real-time viewports are not rendering every frame.
-
PIE viewports now override r.ScreenPercentage by default to have consistent resolution quality and performance between realtime editor viewport and gameplay viewport by default without risk of introducing out of GPU memory errors loosing possibly unsaved editor work if the game’s graphic settings default to a screen percentage higher. To advertise discoverability of this change, any update to the r.ScreenPercentage cvar will lead to a message display in console/log if overriden by editor settings or dynamic resolution settings.
-
As much as a project can change the default anti-aliasing method, can also configure on a per project basis the default screen percentage behavior in project preference that the editor user can then override locally for his/her own use with his editor settings. For instance mobile only or forward renderer MSAA only video games.
-
When working very high end work-in progress rendering tech project in a econemic context where lattest GPUs are hard to get, the range of GPU performance can vary greatly between contributor of the same projects. To provide more robustness for lowerend GPU of collegues with tech not yet scaling, the project settings now offer a MaxRenderingResolution for editor viewports that can also be overriden on a per user basis.
-
Automated screenshot already takes care of forcing r.ScreenPercentage.
As for how “Based on display resolution” works, its formula can be seen here - github.com (needs repo access). It’s complicated and I don’t really know how to explain it in simple terms. Important part of it is the resolution curve which can be changed on a per project basis (its a screen height which then gets converted to number of pixels on the screen, assuming 16:9 ratio):
BaseEngine.ini
[Rendering.AutoScreenPercentage]
MinDisplayResolution=720
MinRenderingResolution=720
MidDisplayResolution=2160
MidRenderingResolution=1080
MaxDisplayResolution=4320
MaxRenderingResolution=1440
I’ve noticed that if you increase all RenderingResolution numbers to match DisplayResolution numbers, it will always render at 100% even when BasedOnDisplayResolution is set in the settings.