zfast-crt broken
pawlakus opened this issue · 5 comments
Dear libretro team, I've noticed that zfast-crt is broken on current master but comparing to https://github.com/libretro/glsl-shaders/tree/46a00f15e09ffbd4fba46ab41f0653aeea918fd1 it was correct back then.
Attaching comparison of the two outputs, android+opengl
Old shader, more or less correct:
https://ibb.co/2hM9C8r
New shader zfast-crt, renders weird on the left side, a one third of the screen.
https://ibb.co/fX3pzCb
Hmm, my guess is the change to this line:
https://github.com/libretro/glsl-shaders/blob/master/crt/shaders/zfast_crt.glsl#L104
which added the 1.0001 offset.
Oddly, this was intended to fix a rounding issue on Android.
Is that a thing you could test? You would need to go to settings > directory and change your 'shaders' directory to somewhere user-writeable and then re-fetch the glsl shaders from the online updater, then make the change with a text editor (that is, replace TEX0.xy = TexCoord.xy*1.0001;
with TEX0.xy = TexCoord.xy;
)
I've tested this but no difference with rendering.
https://ibb.co/z6QT6YZ
https://ibb.co/q02HpWn
Anyway, I've switched to vulkan and slang shader works perfect.
Glsl zfast-crt have another very subtle issue, left side is broken but also on the bottom, 15% percent bottom of r screen, on the bottom, scanline effect dark is thicker for 7-8 lines. This bottom thick scanline covering 3 lines was also present in the snapshot from 2022 I've pasted earlier... It is very subtle but noticeable.
None of those two issues are seen with slang version of the shader.
Old shader wasn't correct, there was no mask. I will check it as I think I did that change.
Hopefully fixed this, there was also a rounding issue caused by that *0.4999 that was cancelling the *1.0001 in vertex.
If it ends up not fixing it for OP, we can reopen the issue.