I’m trying to render a stroke brush over other meshes.
To achieve this I render a bunch of quads using a spherical brush and additive blending onto a texture (CaptureSceneComponent)
I post-process the result using a color gradient based on the red value in the texture
As you can see, the problem is the quads that should be hidden behind objects.
I’ve used Direct X in the past so I know you can simply use a new render target with the original scene’s depth buffer to solve this issue, I just can’t find a way to set this in unreal.
Is it possible using the current API? And if not, is there any other way to achieve this effect without capturing the entire scenes depth storing it in another texture, then sampling the depth buffer as this is very expensive.