recalbox / recalbox-configgen

Emulators configuration tools for recalboxOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shaders should not turn off bilinear filtering automatically or should have an option to change this behaviour

rsn8887 opened this issue · comments

These lines in libretroconfig.py force any bilinear filtering off as soon as shaders are enabled in ES or recalbox.conf. This causes the important statement linear_filter0="true" in any glslp file to have no effect whatsoever:
if defined('shaders', recalboxConfig):
retroarchConfig['video_shader'] = recalboxConfig['shaders']
retroarchConfig['video_shader_enable'] = 'true'
retroarchConfig['video_smooth'] = 'false'

This breaks shaders_glsl/retro/sharp-bilinear.glslp and probably many other presets that rely on linear filtering to actually work as intended. Shaders are NOT just masks. For example sharp-bilinear with a pre-scale of 2 or 3 is the ONLY filter that gives sharp pixels with minimum blurring without any pixelwobble during scrolling at non-integer scalings. It would be great to have sharp-bilinear, with a pre-scale of 2, as one of the presets that the user can choose. But for it to work, the video_smooth should NOT be turned off automatically.

One quick fix would be to add a allow_smoothing_with_shaders option in recalbox.conf to allow advanced users who want to bypass this behaviour to do so.

EDIT: Nevermind it works identical to smoothing if the shader defined linear_filterx = "true" for anything but the LAST shader pass.