ThirteenAG / GTAIV.EFLC.FusionFix

This project aims to fix or address some issues in Grand Theft Auto IV: The Complete Edition
GNU General Public License v3.0
913 stars 42 forks source link

[Question] What happened with PCSS? #512

Closed juicermv closed 1 month ago

juicermv commented 1 month ago

What should happen

So after recent updates, PCSS has been completely removed from FusionFix. Is this permanent?

Checklist

Parallellines0451 commented 1 month ago

It was removed because of increased shader code complexity and engine limitations that make it impossible to calculate a proper penumbra size, which causes visual artifacts such as cutoff large penumbras. There are no plans to bring it back as of now because of the latter.

juicermv commented 1 month ago

Is there any chance you guys could maybe look into a custom variable penumbra softening solution? The game really doesn't look the same without it unfortunately

RecklessGlue540 commented 1 month ago

Does the recent increase in shadow distance make PCSS harder to work properly too? Would the calculations work better if OverrideCascadeRanges is disabled?

Asking because GTAV does this: Once PCSS or CHS is enabled, the shadow distance gets a significant decrease, and I was wondering if that was done for performance reasons (on PC lol), or for them to even work at all...

Parallellines0451 commented 1 month ago
Does the recent increase in shadow distance make PCSS harder to work properly too?
Would the calculations work better if OverrideCascadeRanges is disabled?

No. OverrideCascadeRanges shouldn't need to be disabled under any circumstances.

Firstly, PCSS was not removed from FusionFix for performance reasons. Robi29 did an excellent job working around the limitations of the game's horrible cascaded shadowmap implementation, but it came at the cost of artifacts whenever the penumbra got too large, and we couldn't find a practical way to avoid it.

Aside from that, the entire shadow code was rewritten for the next version of FusionFix to be much more clean, efficient, and produce significantly better looking results, as well as to support the new ShadowSoftness and ShadowBias parameters, which replace the predefined "Shadow Filter" settings.

While most of these improvements could be adapted to accommodate for PCSS in some way, it would add significant unnecessary complexity to everything that was already done and on the way. With that in mind, and the aforementioned artifacts, the decision was made to instead focus on making normal shadows look as good as possible and to deprecate PCSS.

While it may be upsetting to some people to see a feature that was added with FF 2.0 be removed, in return you'll get much better looking shadows overall, which are also more faithful to how they should look (in regards to consoles and versions prior to 1.0.6.0).

juicermv commented 1 month ago

I think the only issue is that that kinda compromises detail on characters, since they won't have sharper shadows anymore.

Although, I guess the question is whether screen-space shadows would be possible to implement in DX9?

Parallellines0451 commented 1 month ago

I wouldn't call it a "compromise" as it's not a base game feature to begin with. You can make shadows as sharp as you want with the new parameters if you so desire.

Screen space shadows are possible and there have been some talks about it, but nothing planned so far.

juicermv commented 1 month ago

Eh, it's not a base game feature but it was a feature that the mod had and was removed so still.

Also, making all the shadows universally sharp kinda defeats the point lol. I do hope you guys manage to implement screen-space shadows, as that would be amazing.

The time and work you guys are putting into preserving and modernizing this game is truly magnificent, there's no other way to describe it.

Perhaps you guys could talk with the guy behind DS2LE, he's been doing very similar work (although for DX11)

Joris-truly commented 3 weeks ago

Aside from that, the entire shadow code was rewritten for the next version of FusionFix to be much more clean, efficient, and produce significantly better looking results, as well as to support the new ShadowSoftness and ShadowBias parameters, which replace the predefined "Shadow Filter" settings.

While most of these improvements could be adapted to accommodate for PCSS in some way, it would add significant unnecessary complexity to everything that was already done and on the way. With that in mind, and the aforementioned artifacts, the decision was made to instead focus on making normal shadows look as good as possible and to deprecate PCSS.

I have to disagree with the quality thing. Been trying v3 using the default config settings, the projected sun shadows on walls are way more jittery and unstable in motion then the previous PCSS solution.