DDT Shader

DDT extended method released in Cg:

https://github.com/libretro/common-shaders/blob/master/ddt/ddt-extended.cg

It’s sharper than the original.

The original DDT looks like this at 5x:

is this shader still working with recent retroarch versions? RA crashes for me right away as soon as I try to use it. with opengl it doesn’t crash but isn’t working correctly either.

I just got a chance to test this and it worked fine with a build from a week ago. OpenGL, AMD gfx, Win64.

tried it again with a recent version… still the same problems. seems incompatible to newer nvidia cards (last time I used it was with my old system). the normal variant “ddt.cg” doesn’t crash but just gives a black picture. maybe I can mess around with the code and see where the problem is.

Updated ddt shader. Now it uses luma to compare pixels.

Added a variant called ddt-sharp too.

Revived this topic with news on DDT:

  1. I’ve made a hybrid between DDT and Jinc shaders. It behaves like DDT at strong diagonal edges, otherwise like Jinc2. This helps HUDs and fonts getting nice quality.

screens for ddt-jinc:

Gallery: https://imgbox.com/gallery/edit/xvb1MVzBjB/oFZhfFQd7Xl7k1LM

  1. Ported CUT shader to slang. CUT (https://github.com/Swordfish90/cheap-upscaling-triangulation) is some kind of DDT that have an adaptive way to smooth color transitions;

  2. Added that CUT adaptive code to my old DDT code and created ddt-xbr-lv1, which uses xbr edge detection rules.

2 and 3 are already on REPO. I made a PR for ddt-jinc now.

6 Likes

Updated ddt-xbr-lv1 and ddt-jinc. It’ll be on official repo soon.

  • Added a better euristics to avoid filtering grass and random textures on backgrounds. It avoids filtering dithering too. So, overall picture is less wonky now!

Games like sports over grass benefits the most.

Screens of ddt-xbr-lv1:

2 Likes

Is this shader can’t accept any passes or I’m wrong? Talking about ddt-xbr-lv1, even img_mod isn’t working, too bad as it seems one of the few shaders that preserve the art-style while delivering a better looking visuals with fewer artifacts.

what is it you’re trying to do? add shaders after this?

Are you using the append/prepend feature from the nightly builds or are you doing it manually?

Yes I am trying to add img_mod pass to it, but no other shader pass works as I tested many, as the desired pass gets applied on normal picture, it’s like applying a pass without adding a shader.

I’m using shaders through the F5 menu, it’s faster for me to check changes.

Ah, I think I see what’s going on: the xBR effect needs >1x scaling to be apparent, and when you add a pass onto the end of an existing shader, it will automatically get a 1x scale.

So, on the shader menu, once you’ve added your next pass, go to the ddt-xbr-lv1 shader and set the scale to 2x (or higher) and then hit apply.

1 Like

I tried to set the scale to 2x after adding a pass to ddt-xbr-lv1 but RA crashes when I do that.

heh, weird. works fine here. I would recommend trying it through RetroArch’s normal “big picture” interface instead of the desktop menu to see if it treats you any differently.

1 Like

Couldn’t edit scale in big picture either, anyway thank you, I’ll try something else.

the last possibility is to just make your own preset instead of doing it through the interface.

1 Like

I’ve noticed severe artifacts on other games using DDT, it kinda works fine with games like SMAS but with Contra 3 for example it’s not that good, I’ll try to find something else, thanks for the help ^^

1 Like