Mirrors and scopes in HDRP

Cheo

Active member
Hello everyone, mirrors and scopes are not working properly in my HDRP project - let's start with the mirrors : there is no issue with the prefab in the built-in demo, but the one in HDRP does not render the third person head and arms, and in addition shows the first person arms and items ! Here is a screenshot :


Capture d’écran (185).jpg

As you can see the scope isn't rendered properly either - here's what it looks like when aiming :

Capture d’écran (181).jpg

The overlay pass prefab did have an effect though, it simply looks like a pink circle without it :

Capture d’écran (184).jpg

I'm pretty sure I followed this guide correctly, and I set the lit shader mode to Both if that changes anything (a warning saying "Your HDRP settings do not support ForwardOnly, some objects might not render" was displayed on the custom pass when using Deferred Only). I'm using Unity 2021.1.1f1 and HDRP 11.0.0.

Has anyone else got correct result with UCC's scopes and mirrors with HDRP ? Thanks in advance !
 
It's a slightly different context than yours, but this thread may have some use:

 
Sorry but I don't think that's useful - that issue was apparently caused by not having imported both first and third person assets. And besides, it was about the built-in rp, which does not cause any issue with scopes and mirrors - I'm precisely asking about HDRP. Allow me to ask again : have you gotten correct results with scopes and mirrors in HDRP ?
 
This relates to demo scene content so I haven't created the shaders for it. HDRP changes too often right now to be able to maintain multiple pipelines of demo content. You should be able to use Shader Graph or Amplify Shader Editor to create the HDRP shader.
 
Alright, I'll try creating a custom shader for the overlay. But about the mirror, the MaterialSwapper script contains the "#if UNIVERSAL_RENDER_PIPELINE || HIGH_DEFINITION_RENDER_PIPELINE" line twice, could you please check if something in this script may be the cause of the issue shown in the first picture ? Thanks !
 
I can see that there are now shaders for HDRP to use with scopes, but when adding this into the scene the scope just renders as a blue tint and cannot see anything from the camera. Any ideas? Using HDRP 11 in Unity 2021.1.18
 
I will add this to my list of things to look at before the next update but my guess is that HDRP was updated and the shader needs to be updated. The shader was created with Amplify Shader Editor so if you have that then it may be a matter of just regenerating the shader.
 
I will add this to my list of things to look at before the next update but my guess is that HDRP was updated and the shader needs to be updated. The shader was created with Amplify Shader Editor so if you have that then it may be a matter of just regenerating the shader.
Yeah I have that, when I get a chance I'll take a look. Thanks for the help!
 
Top