jiaozi158 / UnitySSGIURP

Screen Space Global Illumination for Unity URP (Universal Render Pipeline).
MIT License
176 stars 14 forks source link

Unity 2022 - Empty Renderer created during builds in Render Pipeline Asset #9

Open AoABlacky opened 1 month ago

AoABlacky commented 1 month ago

As in the picture, not sure if you tried any builds recently but I can repro this 10/10 times. With SSGI in a project and attempting a build, an empty renderer is forcefully added to the active render pipeline asset at the time of building. This can break some assets (like TND's DLSS/FSR which require all renderers in a list to be filled).

Unity_BF8A2b9myy

jiaozi158 commented 1 month ago

Hi, this empty temporary renderer is created by the KeepDeferredVariantEditor script to simplify the set up of this repo.

I tried building with Unity 6000.0.5f1 several times and didn't observe this issue, but thanks for letting me know it happens in Unity 2022.

I will investigate it as soon as possible.

AoABlacky commented 1 month ago

Would appreciate it, I've been trying some fixes myself but no matter what it always ends up with a missing renderer remaining in my render asset making SSGI unusable in builds, at least in my use cases.

jiaozi158 commented 1 month ago

A quick fix could be like this:

Note: If you'd like to revert these changes, you can just remove the "./Packages/com.jiaozi158.unityssgiurp@xxx" and Unity should reinstall the latest version from this repo.

To fix this issue that some people may encounter, I'm planning to add an option to disable auto-keeping deferred shader variants in the SSGI renderer feature.

jiaozi158 commented 3 weeks ago

Hi, I think adding options to solve this issue isn't ideal, so I adjusted the rule for adding a deferred renderer.

If there's a deferred renderer in list, the script will not try to add one when building the project.