Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the repo for your SSAO shader? #28

Open
Arcitec opened this issue Dec 20, 2021 · 4 comments
Open

What's the repo for your SSAO shader? #28

Arcitec opened this issue Dec 20, 2021 · 4 comments

Comments

@Arcitec
Copy link

Arcitec commented Dec 20, 2021

Hi Marty,

I noticed that your MXAO filter is here.

There's a SSAO file by you that's going around, which is copyrighted 2015:

https://github.com/Mortalitas/GShade/blob/master/Shaders/SSAO.fx

I am curious why it's not in this repo, and also how that compares to your MXAO? I've tried both and prefer the look of SSAO.fx (it gives deeper shadows in crevices), but I don't know enough to say what's going on here. :)

@martymcmodding
Copy link
Owner

Oh, GShade. They're just throwing files together from every ReShade era, even really old and deprecated files. To explain what that is and how it relates to this repo, I need to paint a bit wider picture.

Early ReShade versions could only load single shader files. So we all created uber shaders from lots of third party effects found on the web, and with the ReShade Framework, they got fragmented into includes, and lateron converted into standalone effects as ReShade 3.0 first could load multiple shaders at once. This SSAO.fx is such a file. It contains Crytek's SSAO, some raymarched AO, the original HBAO and Alchemy SAO.

Now there's multiple reasons why I don't use this code anymore:

  • I'm not allowed to not just relicense them - younger me didn't know that - so I can only upkeep qUINTs license without them
  • Like all programmers, I started with messing with third party code. Now, I can just write all my stuff myself. These effects are from 2012 and earlier, ancient technology
  • It goes against qUINTs design paradigm: each shader is supposed to be the quintessential solution to a certain task. Most ReShade presets contain zillions of different shaders, like 30 different color graders, 5 AO shaders stacked on top. I wanted a collection of effects where one shader gets the entirety of color grading over with, another shader is the most optimal SSAO shader I am capable of and so on.
  • I've always had a fascination with SSAO shaders and ported every one under the sun. I daresay there's not a single relevant SSAO shader I haven't experimented with so I have a firm grasp on all existing techniques and how they work. MXAO is my spin on that. For at least 7 reasons at the top of my mind I think MXAO (or at least, its combo of concepts) is the best SSAO shader. So lessons learned from all of these went into MXAO. Most SSAO shaders don't really differ that much. So MXAO is your one proper screwdriver vs SSAO.fx being a whole toolbox of dollar store screwdrivers, all slightly different, but old, banged up, and redundant af.

Of course ymmv. Sometimes a non-photorealistic approach looks better to the eye, as we're all trained how games "must look" and strong SSAO is an integral part. SSAO is short range occlusion, doesn't appear like that IRL, real diffuse shadows have no "range parameter" so if SSAO was at all realistic, you couldn't just adjust its shadow range.

@Arcitec
Copy link
Author

Arcitec commented Jan 13, 2022

@martymcmodding Thank you so much, that was a very fascinating history lesson.

I agree with everything. GShade really is a collection of too many (old and broken) shaders. Plenty of them throw errors when you enable them.

And yes, most people making presets throw together "30 different color graders, 5 AO shaders" etc without understanding what they are doing (which is why their preset run like dogsh-t). Even though usually 1-2 shaders could do the same job if they just took the time to tweak the settings.

I completely agree with using smaller, specialized shaders that do 1 task well, and it's the preset author's job to understand this and to achieve the whole effect with just 1 flexible shader instead of layering lots of different ones. I love your shaders, and I love Lightroom for this (you're a genius; Lightroom can do pretty much everything I need without involving other shaders). Another thing preset authors constantly fail at is having the proper shader order (I often see "crazy" shader orders, like applying a film grain effect and then a blur effect AFTER that, hehe). That understanding of these aspects is why my Final Fantasy XIV shaders presets are among the most optimized out there: https://github.com/Bananaman/Smashface-Shaders/

I've been using SSAO simply because it gives the shadow depth I wanted, in every little crease and crevice of the character clothes and the world. But MXAO's "lighter looking shadows" certainly look more correct, like you say. We don't have SSAO's "deep" shadows in the real world, that's for sure. But in this game, SSAO was the perfect way to cure the "flat" shading of the regular rendering. MXAO wasn't able to give enough depth for this particular game. My presets list qMXAO next to SSAO at the top of the shader list though, so that people can easily switch between them.

Games like Final Fantasy XIV and NieR Replicant are unfortunately way too flat originally to look good with just qMXAO.

In other, more modern looking games which already have some depth, I am sure that qMXAO will fare much better and will be my 1st choice thanks to your explanation.

Again, I really appreciate the history lesson and will look into the components you used for SSAO, to see if maybe MXAO + one of those would be enough to get the depth I wanted on FFXIV too.

Thanks again for everything, you're awesome! :)

@martymcmodding
Copy link
Owner

Thanks :)

Shameless plug, you might want to check out my Patreon shaders. I've got a new MXAO (without IL) that works with compute shaders (DX9 unsupported). It looks a lot better and runs up to 4-5 times faster depending on the settings. It's in most ways superior to original MXAO and I use it extensively in all my private presets.
Also, there's ReGrade (same Tier as RTGI), which is basically what qUINT Lightroom should have been. It's even faster, has much improved features and allows reordering and selective enable of different color grading tools. The vignette now operates in HDR (looks a lot better, most vignette effects are wrong) and it's integrated with a new depth based bloom shader that is also lightning fast and better than the original qUINT bloom.

@NekoAlosama
Copy link

NekoAlosama commented Jan 20, 2022

@martymcmodding Question about your shameless plug, will those new MXAO, ReGrade, and bloom shaders ever be released publicly or will they be on your Patreon permanently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants