CAS Improved for Reshade

  • Posts: 18
4 weeks 1 day ago #1 by ZabaZu
Figured I'd throw this in an easy to locate place. Me and my buddy Lord of Lunacy tried to improve the reshade port of CAS. So far, we've added a better method of adjusting intensity and switched from working with srgb to working with a linear colorspace, which the original algorithm was designed to use, making the results far more similar to a native implementation of the shader.

This version of the shader (the current best version of the shader) can be downloaded here. github.com/OopyDoopy/CAS-for-Reshade

If anybody spots improvements that can be made to the shader, feel free to contribute.
The following user(s) said Thank You: Viper_Joe, Marty, aaronth07, nikobellic, MacTir

Please Log in or Create an account to join the conversation.

  • Posts: 8
3 weeks 5 days ago - 3 weeks 5 days ago #2 by nikobellic
I have no reshade programming knowledge but if one feature I would like with reshade version of CAS is "Ignore film grain" or "film grain rejection" while sharpening, its present in Nvidia's implementation of CAS.
The following user(s) said Thank You: John_567

Please Log in or Create an account to join the conversation.

  • Posts: 532
3 weeks 5 days ago #3 by lowenz
It would be a nice addition (if possible, I don't know if nVidia driver level sharpening filter does use CAS or doesn't)

Please Log in or Create an account to join the conversation.

  • Posts: 8
3 weeks 4 days ago #4 by nikobellic
Another would be adding some sort of depth mask to it. So that faraway objects don't look as sharp as objects that are close. Maybe reduce intensity the further the pixel is. Or might add a cutoff distance. Prod80 has a sharpening shader which has depth based option, I am just not sure if he uses CAS, and of course not this version of CAS.

I just tried yours, though I could not see much difference initially between the old and this one but I did notice brightness change with old version, but with yours I there is not much brightness change. So this version has become my go to CAS reshade version. Thanks again!

Please Log in or Create an account to join the conversation.

  • Posts: 8
2 weeks 5 days ago - 2 weeks 5 days ago #5 by nikobellic
There are few sharpening filter which already does what I was looking for. So, I took some help from those (prod80's sharpening + Filming Anamorphic Sharpening) and added couple of depth based effect with CAS. This is my first time even trying anything in reshade or shader related, so the code is not optimized. gist.github.com/imniko/20b715b23fa914af4becda02ee5f9b49

Some comparison slider:
Normal CAS vs w Depth Edge (Object edges wont be sharpened)
Cas vs w Depth Fade (Objects further from camera would be less sharp than objects closer)
CAS vs above two effects combined
The following user(s) said Thank You: aaronth07

Please Log in or Create an account to join the conversation.

  • Posts: 71
1 week 6 days ago - 1 week 6 days ago #6 by aaronth07
Just wanted to say that this is absolutely amazing work, so thanks!

Also, might I add a suggestion: The shader "Smart_Sharp.fx ( hyperlink )" has a feature that adjusts the sharpening intensity based on motion. This is important for games using TAA, because TAA blurs more in motion than standing still. As an example, I might adjust this sharpening filter to be enough when standing still, but as soon as I start moving, it becomes too blurry. Smart_Sharp somehow detects motion, and has options to multiply the sharpening intensity when motion is detected, meaning that TAA blur can almost entirely be eliminated.

I'm not exactly sure if the same thing can be added to this shader, but if it is, this would make it the best sharpening filter on Reshade.

Please Log in or Create an account to join the conversation.

  • Posts: 8
1 week 5 days ago #7 by nikobellic
I saw smart sharp code and it has a lots of stuffs going on. Pretty high level for a noob like me, I didn't know smart sharp worked on motion differently, maybe I will try to detect motion and up the sharpness, I know smart sharp is far more complex.
The following user(s) said Thank You: aaronth07

Please Log in or Create an account to join the conversation.