Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

HDRP + second cam

Discussion in 'Graphics Experimental Previews' started by pragmascript, May 7, 2018.

  1. pragmascript

    pragmascript

    Joined:
    Dec 31, 2010
    Posts:
    107
    Hello,

    we are in the process of moving our game to the HDRP.

    We are currently rendering special elements with a second camera into a render texture.
    The render texture is then used on in-game screens.

    The problem is:
    everytime we render with the second camera the main camera flickers horribly.



    This is how we render to the second camera cam:
    Code (CSharp):
    1. cam.targetTexture = rm.targetRenderTexture;
    2. Graphics.DrawMesh(mesh0, m0, mat, layer, cam, 0, null, UnityEngine.Rendering.ShadowCastingMode.Off);
    3. Graphics.DrawMesh(mesh1, m1, mat, layer, cam, 0, null, UnityEngine.Rendering.ShadowCastingMode.Off);
    4. cam.Render();
    If we comment out line 4 the flickering stops. Note that this has worked fine prior to the switch to HDRP.
     
  2. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    HD SRP is not yet ready for production. It is still experimental and released as preview.
     
  3. Deleted User

    Deleted User

    Guest

    Hence why it's in the "experimental" section what
     
    antoripa likes this.
  4. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Using HDRP in production are a bad idea since it keep changing
     
  5. pragmascript

    pragmascript

    Joined:
    Dec 31, 2010
    Posts:
    107
    Hey,

    thanks for replies. We know it is experimental. This is why now is the best time to give feedback on the issues that come up. I would also be happy with a workaround, or an explanation why this might be happening.
     
  6. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Super risky... :)

    This is a valid report but without more information it's hard to tell. You ported from what version of Unity, for a start? And to what version of unity with what HDRP?
     
  7. pragmascript

    pragmascript

    Joined:
    Dec 31, 2010
    Posts:
    107
    Well it's an experimental port ;) we do keep a running version with the old fixed pipeline around.
    We are using 2018.1 and are just using the HDRP version from the package manager directly,
    so this would be 1.1.5-preview.
     
  8. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    I would suggest to use LW SRP that is in a good shape. You can write shader , lights are good. And it is also gonna be the replacement for current render pipeline.
    HD is incompleted , still work in progress and with changes coming. It is kinda demo. I don’t expect something stable before next year for HD.
    All of us we replied with same concept, just to help you to not waste time and address your effort to more effective features.
     
  9. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    LW is being extended by reliable 3rd parties like @tatoforever last I heard (for more shadow casters etc)
     
    antoripa likes this.
  10. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    and I would add Microsplat from terrain shader category .. with full LW compatibility