libretro / common-shaders

Collection of commonly used Cg shaders. These shaders are usable by either HLSL and/or Cg runtime compilers. The cg2glsl script will translate most of these into GLSL shaders.
http://www.libretro.com
1.03k stars 250 forks source link

Shader scaling issues #154

Open iokzero opened 4 years ago

iokzero commented 4 years ago

System: Lakka 2.2.2 x64 PC

Not sure if this is a "Bug" but I am having a hard time understand how shaders work. and please move this post to its rightful place

They seems behavior differently base on different output resolution in combination with internal resolution for each core.

Example:

said using the crt-hyllian shader

setting Retroarch resolution to 720p and using PSX - beetle cores with 1X, 2X, 4X, 8X internal resolution all works fine.

setting Retroarch resolution to 1080p and using PSX - beetle cores, 1X (fine), 2X (looking weird with dots all over the place), 4X (Scan-lines looks twice as big), 8X(fine),

setting Retroarch resolution to 1440p and using PSX - beetle cores, no issues as it is 720p

integer scale on or off make no difference on this shader.

NOTE: I am just using crt-hyllian and PSX - beetle as example, the same thing happens on many other cores with several other shaders, hard to describe them all.

Any idea / insight on what's the cause?

many thanks!

hizzlekizzle commented 4 years ago

Most shaders are somewhat resolution-dependent and only work with low-res images (think: 240p-ish). Some cores, like fxaa/smaa, don't care and actually work better on higher-res stuff. There are a few other shaders, like the super-xbr-3D and crt-hyllian-3D shaders, which are designed for use with higher-res stuff and compensate for the resolution (in crt-hyllian-3D, there's a runtime parameter to fit the res multiplier; in super-xbr-3D, you pick the right preset for the res multiplier)