libretro / common-shaders

Collection of commonly used Cg shaders. These shaders are usable by either HLSL and/or Cg runtime compilers. The cg2glsl script will translate most of these into GLSL shaders.
http://www.libretro.com
1.05k stars 253 forks source link

Photoshop pixel bender Oil Paint look alike filter (Source Included!) #135

Open Mickevincent opened 7 years ago

Mickevincent commented 7 years ago

Not sure if the forum were the right place to post this. But I am just wondering if someone could port this to Retroarch as a shader? Here is an URL to my post at the forum -

https://forums.libretro.com/t/photoshop-oil-paint-filter/13131

VelocityRa commented 7 years ago

What kinds of resources exist for it? Is there a shader already written for it that needs porting, or would someone need to start from scratch (probably a lot of work)?

Edit: Also I'm doubtful as to whether this would be possible real-time, for the Skyrim demo he says in the description that it wasn't real-time.

Mickevincent commented 7 years ago

I dont know if any resource actually exists. I have tried to find it but I will look more. From the Skyrim clip it is not real time. But it was also uploaded 2013. Maybe gpus today can do it in real time? Its kinda hard to tell but it doesnt seem like my 980ti has any problems with it. Of course when it runs 30 times a second it could be different... I would be really glad if someone could pull this one off.

VelocityRa commented 7 years ago

Its kinda hard to tell but it doesnt seem like my 980ti has any problems with it

How did you figure that out? In order for it to be feasible, running the effect (which might not even be viable at all in the form of a shader), should take less than ~10ms for 60 fps.

Mickevincent commented 7 years ago

No you are absolutely correct. Like Iike said, maybe it would struggle in 30 fps, who knows. However it is absolutely faster than Waifu2x at least, but yeah.. doesnt say that much since waifu is extremely slow. Man if someone just could implement this one.

VelocityRa commented 7 years ago

I did find those 2 shaders on ShaderToy:

https://www.shadertoy.com/view/MdGSDG https://www.shadertoy.com/view/XtVGD1

Maybe with a few modifications it could resemble the look. Porting to Cg/HLSL shouldn't be too hard then.

Mickevincent commented 7 years ago

Well, if it can look the same as the Photoshop filter it doesnt matter wich one it is. That is if anyone is willing to try and port them to Reteoarch then make them look the same :)

Mickevincent commented 7 years ago

"- Its kinda hard to tell but it doesnt seem like my 980ti has any problems with it" "- How did you figure that out?"

I should also mention that in photoshop when I adjust the sliders for this effect, the image updates fluidly. Looks like 60fps but it is at least 30. Now.. of course maybe this doesnt tell wether or not it wouöd actually run smoothly as a shader, but still. Doesnt seem to be a struggle.

No one up to try this? :(

Mickevincent commented 7 years ago

I found a source for a filter that looks the same. Here it is

https://yande.re/GreycShop-r216-src.zip

VelocityRa commented 7 years ago

Interesting but as I suspected, it involves a lot of CPU processing and multiple steps (needs extra work), it would be hard to do on just shaders (RA's system) and you'd have to start from scratch.

Mickevincent commented 7 years ago

Damn.. thats bad. I guess its alot of work to change these processes to gpu?