Request: Could you port Asmodean shaders to common-shaders?

Could someone port Asmodeans shaders to common-shaders they are better than what Retroarch currently has especially for 3D games. https://github.com/libretro/common-shaders/issues/13

They are very good.

Some of them are very complex.

Have you tested them in pixel art games?

For example, see how theyt look in games like Rockman X3, which has a port for psx.

It should be noted that a good shader for PS2 or 3D game may not be good for 8 or 16 bit game. That’s because of the low res nature of 8/16bit games (not only spatial resolution, even number of colors and gradients influence the results). Most 8/16bit games need to be upscaled at least for a scale factor of 4x to fill high resolution displays (LCD, Plasmas, etc). When you think about PS2 and modern systems, they only need 2x upscale to fill most displays.

There’s a huge difference about upscaling something by 2 and by 4. When you upscale by 2, even bilinear filtering looks rather good. I even say nearest neighbor upscale by 2x doesn’t hurt my eyes too much. When you think about 4x scaling, it’s really hard to output something good. Only some advanced shaders present a good output, like crt or xbr like shaders.

You should prove that these shaders are good for pixel art games so that you can convince someone else to port it to retroarch.

Please post some screenshots of 8/16bit games using these shaders. (use 8/16 bit games ported to psx or ps2. Maybe Dolphin could run VC games?)

Retroarch already has large number of shaders for 2D games but barely any for 3D games so they would be very useful for PSX and other emulators with 3D graphics like Desmume, Mupen64Plus and PPSSPP or Dolphin if they will be ever ported to Retroarch. They seem to work fine with 2D games for PSX/PS2/Gamecube/Wii but I want them for 3D games in particular.

But Retroarch only applies shaders to the framebuffer.

For 3D games, it would be necessary to apply shaders on every texture the same way PPSSPP does. Otherwise the shaders made for 2D screens will look weird when applied to 3D games.

So, I think Retroarch would need to change a bunch of things internally to provide this feature. I don’t know if the developers have this will to take this huge task.

Well some of these shaders especially those from PSXFX are specifically for 2D graphics. So Retroarch cant apply shaders to every texture its big flaw then and how GSDX, Dolphin and PeteOpenGL2/GPUBladesoft are applying shaders because they have no problems in using them ? I am not sure if they can apply shaders to every texture.

I don’t think it’s a flaw at all. Only recently Retroarch was able to run emulators for 3D systems. So, it’s just a feature not there yet. It’s to soon to expect a complex feature like that. And yet, I don’t think it’s an easy task, because each emulator has its way to deal with textures. If Retroarch emulate something like pSX, I doubt it could change the way textures are treated. It’s something in the inner parts of an emulator. It’s very distinct from a framebuffer, for example, that is the way you treat the output of any emulator. To tweak textures, it’s necessary to enter inside emulator inners sources, it isn’t an easy task and I don’t know if it’s possible to do it systematically to every emulator out there.

I’m not an emulator or retroarch developer, but I think some way I understand the complexity of this task for Retroarch, because it’s like a framework to plug many different systems, so it must only use general approaches in most cases.

EDIT: I wish Squarepusher or Maister could explain it in more technical and precise terms.

So its impossible to implement these shaders in Retroarch currently ? Can all of these plugins/emulators apply shaders to all textures ? You said that shaders made for 2D screens will look weird when applied to 3D games but most of these shaders are for 3D games anyway. Shaders which Retroarch currently has are working in Mednafen for 3D games.

No, it isn’t impossible. If it was implemented for Retroarch, they would only be applied to the framebuffer, that is, the final image provided by any emulator. You couldn’t apply the shader to the textures directly in the same way PPSSPP does, for example.

Run a NDS 3D game in Retroarch and apply xBR to it and tell me if you like the textures when they zoom in and out from the screen. Pay attention on how the textures get distorted depending on the angle you see them on screen.

That’s what I’m talking when I say some filters made for 2D look weird when applied to 3D games.

It would be good enough for early implementiation developers can potentially improve it later. So I hope someone will implement them anyway.

The asmodean shaders are post-processing filters, so that’s not an issue.

Implementing them is not an issue ? So can you implement them ?

Well, porting it as-is looks completely broken, so there must be some trick to it. I don’t feel like spending lots of time to figure it out.

You can port it as it is and maybe try to figure it out later, did you try to contact Asmodean ?

I still hope you or someone else will manage to port them because most of Retroarch shaders are designed for 2D games and in my opinion they are not enough for 3D games.

Asmodean shaders are indeed single-pass but they are complex so they have multiple functions in one shader.