Search Unity

Question Custom Volumetric Clouds Injection Point

Discussion in 'High Definition Render Pipeline' started by Serega4567, Jul 18, 2023.

  1. Serega4567


    Jan 11, 2017
    Hello, dear Unity users.

    I have to implement a custom volumetric cloud system with HDRP. Currently, it's essentially a special shader made with ShaderGraph and HLSL-include files. A material that uses this shader is assigned to several mesh renderers across the scene, each renderer being a separate cloud object, and this is how it currently works.

    Now I wonder how I am supposed to inject this cloud system into HDRP so that it befriends other components.

    For example, it doesn't support sky shadows and volumetric light rays. But the main thing that disturbs me is that the SRP Lens Flare is shining through the clouds. According to the Frame Buffer window, flares use _FlareSunOcclusionTex. This seems to be a texture array that the default Unity's volumetric clouds are being rendered to, or a uniform white texture if these clouds are off. However, I don't know whether it is possible to change it somehow.

    There are not so much manuals, tutorials and forum thread about HDRP customization, so I hope this could be useful to other developers.

    Thank you.