Paint and Outline
- JPulowski
- Topic Author
- Basic kuwahara filtering by Jan Eric Kyprianidis
- Paint shader by kingeric1992
- Depth-buffer based cel shading by kingeric1992
imgur.com/a/no97p
Download:
Available with framework
Changelog:
1.0 - Initial release/port
1.1 - Replaced depth linearization algorithm with another one by crosire
Added an option to tweak accuracy
Modified the code to make it compatible with SweetFX 2.0 Preview 7 and new Operation Piggyback which should give some performance increase
1.1a - Framework port
1.2 - Changed the name to "Outline" since technically this is not Cel shading (See https://en.wikipedia.org/wiki/Cel_shading)
Added custom outline and background color support
Added a threshold and opacity modifier
1.2a - Now uses the depth buffer linearized by ReShade therefore it should work with pseudo/logaritmic/negative/flipped depth
It is now possible to use the color texture for edge detection
Rewritten and simplified some parts of the code
1.0 - Initial release/port
1.0a - Modified the code to make it compatible with SweetFX 2.0 Preview 7 and new Operation Piggyback which should give some performance increase
1.1 - Removed SweetFX Operation Piggyback compatibility
Added Framework compatibility
1.2 - Rewritten and optimized some parts of the code
Both shaders are available with the framework.
Enjoy.
Please Log in or Create an account to join the conversation.
- Nerd
Going to see about finding a game with depth access next.
EDIT: I got it working with Remember Me but rather than artsy it looks more like my GPU is melting . I wish I had more games with depth buffer access.
EDIT 2: It works a lot better in Remember Me than in Crysis . In Crysis it pretty much activates a wireframe.
Please Log in or Create an account to join the conversation.
- JPulowski
- Topic Author
I am already aware of the "wireframe" look in some games. I also stated it in the readme that in the next versions there will be an option to tweak cel shading.Nerd wrote: Enabling "PaintMethod 0" and lowering the radius looks really cool in high detail games, I like this a lot. I do wish you could adjust how smooth it appears though because it's a bit rough, is that possible to do? Also I tried adding in that other custom cartoon filter you posted using your instructions but it didn't work, I might have messed it up though.
Going to see about finding a game with depth access next.
EDIT: I got it working with Remember Me but rather than artsy it looks more like my GPU is melting . I wish I had more games with depth buffer access.
EDIT 2: It works a lot better in Remember Me than in Crysis . In Crysis it pretty much activates a wireframe.
Also yeah lower values has a denoise or a smart(ish) blur effect. And originally filters such as kuwahara , bilateral etc. are created for denoising, the paint effect is just a side-effect.
Please Log in or Create an account to join the conversation.
- Wicked Sick
Congratulations on a very well done job. I find it amazing the stuff that you guys can do.
i.imgur.com/JIlzpTD.jpg
i.imgur.com/QtWC3KT.jpg
i.imgur.com/LUwoBgq.jpg
Please Log in or Create an account to join the conversation.
- SunBroDave
Please Log in or Create an account to join the conversation.
- sajittarius
Just tested in Final Fantasy XIV and with radius 1 and Kuwahara i can still read the text (hopefully they figure out how to inject before hud soon!)
Definitely a keeper! Thanks!
Please Log in or Create an account to join the conversation.
- Predalienator
Please Log in or Create an account to join the conversation.
- YOBA
For preview 7, please: forums.guru3d.com/showpost.php?p=5025393&postcount=542
Please Log in or Create an account to join the conversation.
- JPulowski
- Topic Author
Might be. There are plans about a new ReShade framework . So I am planning on updating the shader once the framework becomes available. But if it takes too much time, I might release separate MasterEffect-friendly version.Predalienator wrote: Will these shaders be ported to MasterEffect?
There is no need for an update, nothing has changed besides than line numbers because of new code modifications in SweetFX. I have already left some clues about where to copy-paste the code. And this is why it is update-proof, instead of pre-modifed configuration files, the user modifies the code him/herself. I know it's a bit of a hassle, but there is not much we can do until the new framework becomes available. I might release pre-modified files, but in this case it would require a hotfix for every single modification in the code.YOBA wrote: Are you going to update it, JPulowski ?
For preview 7, please: forums.guru3d.com/showpost.php?p=5025393&postcount=542
By the way, I am going to release an update very soon. The cel shader now uses a better optimized depth linearization algorithm by Crosire. It is also now possible to modify the accuracy of the cel shader, so no more "wireframe" effect. Thanks to LuciferHawk and Marty McFly for allowing me to figure it out.
Edit: When I was updating Cel shader, I noticed that indeed there is a change in file structure in SweetFX Preview 7. Going to update both shaders with updated instructions as soon as possible.
Please Log in or Create an account to join the conversation.
- Iddqd
Please Log in or Create an account to join the conversation.
- JPulowski
- Topic Author
It is a pre-defined global for screen dimensions.Iddqd wrote: Hello JPulowski, please tell me what exactly it means in sweetfx screen_size
From Globals.h:
#define screen_size float2(BUFFER_WIDTH,BUFFER_HEIGHT)
Please Log in or Create an account to join the conversation.
- Iddqd
Please Log in or Create an account to join the conversation.
- JPulowski
- Topic Author
Sure, no problem. But you also better ask Marty McFly.Iddqd wrote: Hello JPulowski can I put ported version of paint effect for MasterEffects?
Please Log in or Create an account to join the conversation.
- wo2x
Ive done it over 10 times now, i tried 1.0 and 1.1 cel doesnt work for me at all.
Please Log in or Create an account to join the conversation.
- JPulowski
- Topic Author
As far as I can see from the compatibility list , Battlefield Hardline does not give a depth buffer output. Therefore it is quite natural that cel shader doesn't work. At current state it is dependent on depth buffer, without depth information there is no cel shading.wo2x wrote: Hi, ive got the paint to work, but i couldnt get cel to work in Battlefield Hardline, not sure what im doing wrong.
Ive done it over 10 times now, i tried 1.0 and 1.1 cel doesnt work for me at all.
Please Log in or Create an account to join the conversation.
- TrophiHunter
Please Log in or Create an account to join the conversation.
- NattyDread
I looks really good. Thanks for the port and tweaks!
Here's something I cobbled up with Remember Me last night using Monochrome, Levels, SSAO and Cel:
Please Log in or Create an account to join the conversation.
- Wicked Sick
Please Log in or Create an account to join the conversation.
- NattyDread
Please Log in or Create an account to join the conversation.
- Wicked Sick
EDIT: Also, amazing flickr, Natty.
Please Log in or Create an account to join the conversation.