Hi! In the last few days I’ve been setting up the cores I want to use and testing shaders that offer a good representation of the CRT output. I’m doing this in an Android phone. Small screen, 1080p, Exynos SOC… so my expectations are not great.
In a foolish attempt to put nostalgia back into my games, in the cores that provide it, I’m using Blargg filters along with some shaders. It works fine mostly, with the exception being 32bit and up, that already take up most of my phones resources simply by running, without much room for shaders, performance speaking.
Among the lightweight shaders, the one that stuck with me was zfast-composite, a GLSL shader that somehow miraculously outputs a remarkable result without almost any overhead. It’s fine even with non integer scaling.
Cutting a long story short-ish, some cores run better with Vulkan on Android and this shader has no slang version. Also, the slang zfast implementation seems to be fundamentally different, at last in my screen.
This is zfast-composite (GLSL). The individual “phosphors” are all organic, growing and shrinking like they should in my childhood CRT. Disregard the banding, it’s the exaggerated settings causing it.
This is zfast (Slang). I assume my screen resolution isn’t enough to show the mask in this one.
This is zfast-hd (Slang). Here the phosphors and the spaces between scanlines are too well defined.
I’ve cranked up the settings to maximize the dynamic beam width (equivalent settings in all three shots), and the composite has some convergence going on, but it should serve as a comparison anyway.
Is there a way to convert the GLSL version into Slang? I’m a developer also but apart from recognizing the syntax, shaders are very outside of my knowledge. Even so, if there’s anything I can do to help, just ask!
(Sorry for my broken english, I’m not a native speaker)