Shaders with Beetle PSX HW - A Catch-22

Been struggling with this one a bit. Here’s what I’m dealing with:

For playing a PS1 game, if I choose regular Beetle PSX (not HW), there is an excessive glut of visual anomalies in the graphics, especially 2D elements. This is not an issue with Beetle PSX HW, however. Therefore it very much behooves me to use the latter.

Beetle PSX HW causes a black screen (emulation still works; sound is heard) unless I specifically make use of the Vulkan driver. Even the RetroArch menu is completely black when this happens. This is a known phenomenon and the solution has been repeated a few times already.

Most shaders simply do not work with Beetle PSX HW, as is made clear when I attempt to use the same with Beetle PSX (non-HW, but still using Vulkan). All shaders work properly under Beetle PSX non-HW, but of course then I am contending with the above-mentioned visual glitches. Certain shaders (CRT, for example) do in fact work with Beetle PSX HW, however.

I’m wanting to use Beetle PSX HW to avoid the visual anomalies, but I am also wanting to use certain shaders like SABR, which evidently don’t work with Beetle PSX HW. Whether this has something to do with the necessity of using “slang” shaders, due to the necessity of the Vulkan driver, I can’t say.

What to do?

What kind of anomalies and on what games? I have yet to see any. It’s usually the HW version that has weird glitches. Did you try using OpenGL with both cores?

As far as shaders go, Vulkan only accepts slang shaders. I recommend taking screenshot of the games affected. You can also post a log to see if anything strange is going on when running the Cores. To do this go to Settings -> Logging and turn on “Logging Verbosity”. Next time you run a game it will display a log of everything that is going on in the background.

After exiting retroarch the log information is saved in the main folder under “retroarch-log.txt”.

I was going to post screenshots, but now that I have investigated things further, it seems the anomalies I noted are limited to the bios opening screens. During gameplay, I cannot detect anything out of the ordinary. I’ll be on the lookout. For now, I’m happy enough that I can get shaders to work and not suffer random crashes from tweaking various settings.

Since you asked, the anomalies that persist during the bios opening screens are basically the duplication of complete horizontal and vertical lines here and there, giving the impression of poorly-rendered nearest-neighbor texture scaling.

I have great results in both Beetle cores using the Vulkan driver and these shaders.

The HW shader is designed for high resolution rendering - I use 8x resolution with adaptive smoothing.

Pretty good.

I admit in my case I’m not (currently) going for a CRT look. I’m shooting for fake higher-res for a 2d game, and it seems like the highest evolution of that type of filter is still SABR 3.0. Personally, I would have thought that by now, somebody would have put together a post-process for SABR to convert all those false contours into smooth gradients. If done well, that, to me, would be the ultimate in upscaling.

For 2D sprite games, xBR-mlv4-multipass, super-xBR, ScaleFx and xBRZ-Freescale typically all look better than SABR.

For games with mixed 2D and 3D elements, the super-xbr-3d shaders will ignore the uprezzed polygons and only upscale 2D menu/HUD elements and prerendered backgrounds.

I’ve tried all of these now. My thoughts:

xBR-mlv4-multipass: Visually, basically SABR, but instead of attempting to interpolate rounded edges, the focus is on preserving straight lines. Whether this works better than SABR or not probably depends on the game.

super-xBR: (Tried many variants.) Interesting. It’s sort of like if one started with a SABR base and then allowed the paint to run. Individual details merge together like watercolors. I actually both like and dislike the look – my dislike stems from the fact that it gives a pretty blurry result, not unlike a basic bicubic filter. I feel like if one could take another stab at this filter but make an attempt to preserve sharp contours (only blurring mild gradients), this would be pretty good.

ScaleFx: Like SABR, but seems to limit itself to something like 1/4th the rendered resolution for some reason, resulting in, of course, jaggies everywhere.

xBRZ-Freescale: Seems to try to generate gradients on edges, but limits this effect to anything that isn’t perfectly vertical or horizontal – those edges, it leaves flat. Gives an ugly result, particularly on text.

xBR-mlv4-multipass will probably be my new go-to filter for the game I’m currently playing. I can live with the occasional too-pixely look of certain sprites.

Does SuperFx shader support other internal resolution than 1x for BeetlePSX ? I see visual impact only for 1x internal resolution, for 4x its virtually non existent. May be some tweaks/changing shader parameters required ? Thanks.

No, none of the smoothing shaders’ pixel detection routines work with increased internal resolution. (EDIT: except for the super-xbr-3d shaders, which will filter pre-rendered backgrounds and/or 2D HUD elements and ignore uprezzed polys of the specified scale)

1 Like

For 2x internal resolution for example, the AA Shader 4.0 is a good choice also. 2D gets filtered in a decent quality and 3D get some AA. Internal resolution must be adjusted though - to 2.0 (1.0 is default).

Also a great idea would be to combine the super-xbr-3d shaders with some sort of AA, like FXAA or SMAA. :heart_eyes:

2 Likes