Search Unity

Feature Request Usable Camera Stacking (Graphics Compositor)

Discussion in 'High Definition Render Pipeline' started by Eltharis, Nov 18, 2022.

  1. Eltharis

    Eltharis

    Joined:
    Aug 30, 2018
    Posts:
    17
    Hello,

    Has anyone got the camera stacking to work using Graphics Compositor or any other way?
    I did, but performance hit is ridiculously big, it basically halves fps or worse. I guess it's unusable this way.
    What I need is to have cameras for different clipping planes, otherwise shadows disappear completely with a distant view. Which makes it literally impossible to create big open worlds in Unity... Really, Unity, please don't make us switch to other engines for reasons you most likely could fix without much work.

    Now, I guess it is possible to fake big open worlds IF you're staying on the surface all the time and won't see distant meshes cut (the horizon, custom atmosphere on spherical mesh, celestial bodies, etc.).
    But if player would rise even a few hundred meters above the mesh terrain surface, the cut is obvious. This way we also can't render space with planets, at all.

    Currently it seems we have 2 options
    1. Make camera far clipping plane so distant, that it will render everything we need, but it will also disable all shadows. Near and far, all shadows on the scene are disabled in this case. Which isn't acceptable.

    2. Or we cam make a far clipping close enough to render all shadows with one camera, but clip the horizon, view, it won't even render whole quarters of real sized planets. Which isn't acceptable too.

    3. Make camera stacking which will halve all framerate, all the time. Which, once again, isn't acceptable.

    So, we either need to have performant camera stacking for HDRP, or some other solution. I've read Elite Dangerous uses 6 shadow cascades to allow rendering shadows over great distances. Maybe you could implement that option for HDRP and we'd all be happy with one fast camera?

    Currently I have stacked compositor setup, but my framerate is halved. This is most likely unusable. Or maybe I'm doing something wrong. Anyone made a successful 2-camera stacking setup and can share?

    (NOTE: the above text is updated. I've managed to get rid of artifacts, but performance is unfortunately not nearly enough).
     
    Last edited: Nov 19, 2022