CRTSIM causes black screen only on Flycast

When using the gl driver and shader crtsim, Flycast only shows a black screen or a strobbing black screen frame when changing alpha sorting to per-pixel. Tested on two windows machines and on Android. The specific shader causing this is composite.glsl.

Is there a reason for this? It’s kinda frustrating as it only happens on Flycast, other cores load fine.

As mentioned in your github issue, the statement that it’s happening only on flycast is wrong, that shader seems to produce the same result on every hardware-accelerated libretro cores i tested, so the obvious conclusion is that the shader does something that is unsafe with hardware-accelerated cores.

Yes, you’re right! I hadn’t see the reply when creating this post, and never emulate N64 or Saturn, but the problem is definitely the shader and how it interacts with hardware accelerated cores. A mod might edit or delete the post if it’s necessary.

It looks like it’s related to the Prev*Texture. It appears that the same thing happens with other shaders that use that, such as motionblur-simple.

So, bigger issue than just the one shader, but that makes it easier to test and trackdown, too.