Arvtesh / UnityFx.Outline

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

Outline doesn't work in scene with no skybox. Built-in RP. OutlineBehaviour #34

Closed STARasGAMES closed 3 years ago

STARasGAMES commented 3 years ago

Sorry for creating so many issues :)

If skybox material isn't set here: image

then outline won't work. Most likely because AfterSkybox CameraEvent is never occurring.

I know that I can choose CameraEvent on OutlineBehaviour, and choosing CameraEvent.AfterForwardOpaque works fine for me. But this is only for now... Are there any downsides to using AfterForwardOpaque versus AfterSkybox?

Arvtesh commented 3 years ago

That's weird. Will check. Thanks for the report.

Arvtesh commented 3 years ago

Hm. Unity seems to changes skybox render order depending on its settings: 1) It the material is set, it is rendered after geometry; 2) If no material is set, it seems to be rendered on the very start on the rendering cycle, when it's too early to render outline.

The solution is to change RenderEvent value. There should not be any downsides - it's just render order. If it looks correct, it's OK.