Arvtesh / UnityFx.Outline

Screen-space outlines for Unity3d.
MIT License
1.27k stars 90 forks source link

URP 13+ depth issue turning screen full black (with Fix inside) #60

Closed Sir3eBpA closed 1 year ago

Sir3eBpA commented 2 years ago

Hi,

I tried running it on Unity 2022.1.19f1 and it worked great except for depth testing, the fix is incredibly simple, you have to swap out the RTHandle for depth texture from custom made one to the cameraDepthTargetHandle provided by URP.

Looks like this: 2

Essentially replacing line 52 in OutlinePass in the URP folder. I've done this in my fork so feel free to check it out here CLICK

and here's the final result: 1

Hope anyone finds it useful!

Don't want to make a pull request for it as it changes the URP and unity versions so this is not a proper fix for everyone but for those who suffer from the same issues I did 😄

CaseyHofland commented 1 year ago

The proposed solution here is incompatible with MSAA, use the solution proposed in the Pull Request for MSAA compatible outlines once more.