UnityFx.Outline icon indicating copy to clipboard operation
UnityFx.Outline copied to clipboard

[URP] Overlay camera also draws outline

Open STARasGAMES opened this issue 2 years ago • 1 comments

URP has a camera stacking feature that allows rendering additional objects on top of the Base camera. For example, this could be used for rendering FPS weapons that don't clip with the environment.

The problem is that the overlay camera also draws the outline. This produces waste draw calls. Moreover, in cases when the overlay camera has a different field of view player will see two(or more) separate outlines which is really weird.

As a solution OutlineFeature could have a setting that forces OutlinePass to render outline only for the base camera. Whether a camera is base or overlay could be found by using this component: https://docs.unity3d.com/Packages/[email protected]/manual/universal-additional-camera-data.html

STARasGAMES avatar Feb 11 '22 14:02 STARasGAMES

Hey, thanks for the report. Sounds like a useful feature for the next release.

Arvtesh avatar Feb 13 '22 19:02 Arvtesh