HDRP + second cam

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.

PotableScalyBat

This is how we render to the second camera cam:

cam.targetTexture = rm.targetRenderTexture;
Graphics.DrawMesh(mesh0, m0, mat, layer, cam, 0, null, UnityEngine.Rendering.ShadowCastingMode.Off);
Graphics.DrawMesh(mesh1, m1, mat, layer, cam, 0, null, UnityEngine.Rendering.ShadowCastingMode.Off);
cam.Render();

If we comment out line 4 the flickering stops. Note that this has worked fine prior to the switch to HDRP.

HD SRP is not yet ready for production. It is still experimental and released as preview.

Hence why it’s in the “experimental” section what

1 Like

Using HDRP in production are a bad idea since it keep changing

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.

Super risky… :slight_smile:

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?

Well it’s an experimental port :wink: 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.

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.

LW is being extended by reliable 3rd parties like @tatoforever last I heard (for more shadow casters etc)

1 Like

and I would add Microsplat from terrain shader category … with full LW compatibility