CaffeineMC / sodium

A Minecraft mod designed to improve frame rates and reduce micro-stutter
Other
4.82k stars 809 forks source link

Add an option to configure render scaling #2362

Open jellysquid3 opened 9 months ago

jellysquid3 commented 9 months ago

Problem

Since we don't intend to encourage the use of exclusive fullscreen mode (see https://github.com/CaffeineMC/sodium-fabric/issues/2359), the game will often be rendering at the monitor's native resolution. This may be unnecessary, and in some cases, detrimental to performance. For macOS in particular, their displays are very high resolution, and their laptops are often not powerful enough to render any kind of game at native resolution.

Solution

We should implement an option to allow the user to select a lower resolution for rendering, which is then upscaled to the monitor's native resolution. The implementation of render scaling should only affect world rendering, and not the user interface.

Please note, implementing any advanced upscaling technologies (FSR, DLSS, XeSS, etc) is not in scope for this issue. These require motion vectors to function correctly, and generating those is not trivial. It's also not clear to me whether these technologies would make much sense, given the kind of workload that Minecraft is.

copilot-lover commented 9 months ago

Just read this and was wondering if fsr 1.0 cold be valid because it does not require motion vectors like FSR2, DLSS, XeSS, etc https://jntesteves.github.io/shadesofnoice/graphics/shaders/upscaling/2021/09/11/amd-fsr-demystified.html-fsr on opengl

copilot-lover commented 9 months ago

It's also not clear to me whether these technologies would make much sense, given the kind of workload that Minecraft is.

some people are on severly gpu limited systems(like igpu's that are old or weak) and if they are gpu bound this would be helpfull

0-x-2-2 commented 9 months ago

Just read this and was wondering if FSR 1.0 could be valid because it does not require motion vectors like FSR2, DLSS, XeSS, etc https://jntesteves.github.io/shadesofnoice/graphics/shaders/upscaling/2021/09/11/amd-fsr-demystified.html-fsr on OpenGL

Please note, that implementing any advanced upscaling technologies (FSR, DLSS, XeSS, etc) is not in scope for this issue.

^^

Note: FSR 1.0 without motion vectors is significantly worse for a voxel game. Also pretty sure this is more in scope for Iris than Sodium right now since I know TAA already exists in shader packs and that requires motion vectors and TAA is a pretty good prerequisite before trying FSR/DLSS etc.