Using HDRP in production we encountered one major roadblock for our team and desired art style. Namely, we want to use an outline post process / custom pass to add outlines to objects in the scene.
However, we encounter the major issue that the custom passes do you not offer sufficient injection points. In combination with volumetric fog we cannot use an injection point that happens before the volumetric fog rendering. See the attached screenshot with using the HDRP outline sample that demonstrates the issue we encounter. You will see that the outline is not affected by the fog and is rendered on top of it.
We need an injection point after the opaque cluster but before clouds and fog. The earlier injection points are too early for an outline shader to work. As the system is already in place we would like to request to add additional injection points. Having to duplicate the HDRP package and do this changes ourselves is a lot of wasted time and we feel this an oversight on Unity’s side of things.
Even for realistic scenarios this would be essential (e.g., outline for an interactive element).
hey @designmatic ,
I did the same suggestion in the following tread!
I had the exact same case as you (resolved for me) :
I gave some live of code to do a custom Injection Point before the fog apply by modifying two HDRP scripts. I didn’t gave all detail so if you need more precision, I can help.
We need to modify HDRP package by ourself this way in the meantime our suggestions get noted
Yes it would be great to have more finely grained injection points - for example we draw stars in a custom pass, but we have no control whatsoever to ensure that it is drawn BEFORE the HDRP local Volumetric Clouds.
Local Volumetric clouds are always drawn before any other transparent objects, meaning that we can’t use a custom pass to put something behind the clouds.
@mgeorgedeveloper_1 As VolumetricClouds is not a Custom Pass, either for Transparent Object rendering order, I am think that your suggestion is a little different as it don’t touch Custom Pass purpose : it’s a feature request for volumetric cloud vs transparents shaders rendering order, I guess such a feature would have a cost?
The Injection Point I suggestted would allow to procedurally inject stars or whatever in the skyColor before the clouds/fog apply, but using a fullscreen effect rather than transparent geometries.
To explain in the context of custom pass injection points: because local clouds are rendered before other transparent objects, I thought a good solution to get the stars (VFX) rendered before the clouds, would be to use a custom pass with an appropriate injection point - but such an appropriate injection point does not exist. So I’m just talking generally here to give another example where more custom pass injection points might solve some issues (not related to your specific case, sorry)
Sorry, I didn’t get it because it is possible without transparency, to draw stars on sky : all you need is to draw a color and a “mask” channel using your emitted particle (draw mesh) into a Screen Space buffer(not camera) then use your color to be blended with skyColor using this mask channel data when you apply your CustomPass (Draw Procedural), so you will have use your “mask” channel to draw the first rendered color, like refraction do with screen color. but whatever the channel you need, you can compute them from an Unlit shader that particles draw and capture it in your buffer to be apply screen space.
So this way you would be able to use the “Before Sky and Fog” (the Injection point I have suggested) because at this step of rendering, the sky is already colored, without volumetric clouds, so you can draw whatever you want like stars this way, And to get occlusion from dense fog/volumetric cloud naturally too.
From my point of view you can even use Opaque shader on your VFX and don’t go for CustomPass, as a star is a shiny thing, if you put an high HDR value on the emmisive, they will bloom in the sky with a normal occlusion behavior regarding cloud and blooming intensity.