Is there a way to make debug shapes exempt from postprocessing?
Hi, in our game we're using a post-process material to draw dark outlines around all the objects in the environment via a scene depth comparison with the neighboring pixels. This effect looks good on the environment, but as an unfortunate side-effect all the debug shapes (spheres, lines, cones, etc) are also getting outlines, and as a result they are often turning black and it becomes hard to tell their color or differentiate them.
Besides completely disabling the post-process material when debugging, is there a way to exclude debug shapes from being affected by the post-process material? A couple sub-optimal methods I was considering was to a) somehow change the blend mode of all debug shapes to Translucent so that they will not be affected or b) somehow give all debug shapes a specific stencil value that is explicitly ignored in our post-process material. Although I'm not sure how I would implement either of these solutions.
Also, I typically create debug shapes from C++ like this:
DrawDebugSphere(world, position, 25.0f, 6, FColor::Blue);
Here is a screenshot of how the debug shapes are turning black:
asked Aug 13 '18 at 04:57 AM in Rendering
Using a Custom Depth pass might be a solution. Here is a cel shader tutorial that uses Custom Depth to make specific objects be exempt from post processing:
https://www.raywenderlich.com/146-unreal-engine-4-cel-shading-tutorial ("Isolating the Cel Shader" section)
Follow this question
Once you sign in you will be able to subscribe for any updates here