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
979 stars 44 forks source link

[Feature Request] Adding back wire shadows #581

Closed RecklessGlue540 closed 2 months ago

RecklessGlue540 commented 2 months ago

What should happen

Not exactly. That only works for wires that don't use gta_wire (and ideally they all should use it because of this). While changing the gta_wire.sps drawbucket does enable shadows for wires that use it, it disables the anti aliasing functionality and causes extreme aliasing on them, which is especially visible on the Broker bridge cables.

ExtraDynamicShadows = 3 actually should have been removed long before 3.0 because not all objects are meant to cast shadows for various technical and artistic reasons, and it caused several bugs obviously, as it's a very naive way of doing things. 1 and 2 work by selectively overriding IDE flags on safe objects that have specific keywords in them (like "fence", "grate", "bush" etc.).

If you think that any props (including wires) could cast shadows without causing issues, check by editing their IDE flags to enable shadow casting and post pictures of them and their filenames in a separate issue.

As @Parallellines0451 suggested, I decided to go ahead and do some model hunting myself, and here is a list with a bunch of wire models that I was able to gather from the files: wires.txt

Also, an idea: Wouldn't adding those models like it was done here technically be a better approach? Basically a model list to pick up from? Since then you'd have the actual models get picked up instead of using from what I'm getting wildcards that may also pick up other unintended objects as a result.

In any case, I also went ahead and added all names (at least I hope so) from the txt above into one that has them in the same format as here, so it wouldn't be as much of a hassle adding them in case you guys agree this idea is better. For now I guess wires can be done like this. In the future I may also hunt for other models / objects that are currently wildcarded just so this could be done in the safest way possible, even though I kinda agree that it does somewhat unnecessarily overcomplicate things... Here's how it could be implemented ixx.txt

Even if wires can be pretty aliasy, me and a couple of others would rather prefer them having shadows than not at all, which is why I think bringing this back would be worth it, under option 3.

Also a minor mistake I think I've spotted, shouldn't this option be 2 now that 2 is default? No expert at this stuff, but I think that's what it should be...

Checklist

Parallellines0451 commented 2 months ago

(including wires)

I was in a hurry when I wrote that reply and shouldn't have included that specific bit, as there's an issue that I forgot to take into account.

Forward rendered objects don't support shadow casting, and forcing them to cast shadows breaks them completely, like in this example: Screenshot 2024-08-21 161921 Screenshot 2024-08-21 161934

Wires that use gta_wire use forward rendering for transparency, so an option like that would break them as well. It would be especially bad if Various Fixes is installed because its devs are working on making all wires use the gta_wire shader, to make them all consistent and anti aliased.

Of course, you could change the drawbucket, but that would have to be done manually on top of changing an ini option, and it would cause all wires to look heavily aliased in all situations, even at 4K, and I don't think that's worth it.

It would be best for a standalone mod to do this, as it was never intended behavior.