Closed IntegratedQuantum closed 3 months ago
I've seen some games implement it as resolution scale, usually configurable from 25% (downscaling) to 200% (upscaling). It shouldn't be too hard to implement
Yeah, super-sampling is also a good idea. Though the downscaling might be a bit finicky. I cannot just linearly interpolate because I need to do some post-processing on the individual pixels first for fog calculations.
Usually, rendering scale is just applied to the viewport size, so let's say the window size is 800x600, a 75% would have a viewport size of 600x450 (like if the window was 600x450) instead of 800x600. So in theory it shouldn't change anything in the fog calculations (unless Cubyz can only render with sizes of powers of 2 but that's not the case) and the only thing that change is that the UI is still rendered at native resolution.
Basically do fog calculations before downscaling
The problem is that the shader that currently renders from the internal framebuffer to the screenbuffer is also handling the fog. This shader can and should be directly reused for upscaling, but for downscaling a new shader would be required, that manually samples and interpolates.
a 75%
I don't want to do weird stuff like that. I want to use nearest-neighbor sampling for upscaling. I don't like how blurry it looks when games use linear sampling. And for nearest-neighbor sampling only powers of 2 make sense. So I would probably limit the entire thing to the factors ¹⁄₄, ¹⁄₂, 1, 2
I would love it if other games had this option. My monitor is often too big for my integrated graphics card, which makes games lag and sometimes even setting all graphics features to lowest is not sufficient for lag-free gameplay.
Additionally this feature might be useful for debugging and performance-testing.