I refer to GitHub - alelievr/HDRP-Custom-Passes: A bunch of custom passes made for HDRP for this issue. I’m trying to run the outline custom pass along with the FPSforeground custom pass, but somehow it seems as if the presence of the FPSforeground custom pass causes Outline’s “CustomPassUtils.DrawRenderers(ctx, outlineLayer);” to not render the layer onto the render texture.
Repro steps:
- Open FPS Foreground scene.
- Set Sector_1’s layer (and its children) to Selection.
- Add an outline custom pass to the FPS Foreground gameobject, with the outline layer on selection. The Scene camera would render this correctly, but not the game camera surprisingly.
Observations:
- Turning the Foreground Mask for FPSForeground Custom pass to nothing renders things correctly in game scene.
- Frame Debugger shows that the outline renderpass is not even doing a RenderLoopNewBatcher.Draw(), hence the render texture is all black and no outline is produced. (As attached below)
I must be missing something in SRP rendering, can anyone enlighten me and show me how to do this? I want to have a foreground object that is rendered after everything, while still having outlineable renderables.
