jean-moreno / EdgeDetect-PostProcessingUnity

Unity legacy Edge Detect image effect ported to Post Processing Stack v2
298 stars 32 forks source link

Effect looks broken on SRP 2 #7

Closed Rockylars closed 6 years ago

Rockylars commented 6 years ago

The new Unity release of 2018's will cause the defined Background Color to be put over the skybox and bloom, its an effect that cant be fully disabled, sliding the Edges only factor around will in-/decrease its effect.

Replacing the PostProcessEvent definition above the EdgeDetectPostProcessing class with BeforeStack will fix it, as BeforeTransparent now no longer handles it properly, this will cause issues with the intent of drawing lines on top of transparent objects.

https://imgur.com/MXSEnPn https://imgur.com/tZcI623

jean-moreno commented 6 years ago

I looked into this today, and it seems to be an issue with Post Processing & LWRP: I also get wrong results when using the example custom effects from Post Processing's wiki. For some reason the color returned by the main image in the post effect is wrong when using the BeforeTransparent injection through Post Processing.

I'll leave it at BeforeTransparent for now though, as this works with the legacy rendering pipeline and LWRP is still in preview mode.

jean-moreno commented 6 years ago

I've submitted an issue on Post Processing's GitHub: https://github.com/Unity-Technologies/PostProcessing/issues/653

Rockylars commented 6 years ago

It appears the Gizmo's are partially broken with the LWRP as well for a lot of users including our project, and will be fixed by 2018.3, making them either not appear at all or in our case, flicker whenever we have a Post Processing Layer assigned to our camera, even if the Post Processing Volume doesnt exist, so i too would say that you should wait.

The issue still persists, with BeforeTransparent now causing a ghost effect that removes everything behind the outlined object and the object itself, AfterStack will give a bloom/color intensifying effect of the objects it outlines, as if it doubles certain coloring and BeforeStack still works fine.

jean-moreno commented 6 years ago

I've updated the effect so that the three injection points are available to the user, this way it can work with all three renderers (legacy, LWRP, HDRP). Some effects are still unavailable for SPRs and a warning box will inform the user.

For this particular issue, use the "Before Stack" injection rather than "Before Transparent".