When enabling hdrp water system, transparent materials don’t appear in the game view. When disabling hdrp water system, transparent materials appear normally. How do I fix this?
Car with a transparent body as seen in editor view when hdrp water system is enabled
The same car seen in the game view
I tried changing HDRP global settings, but I don’t know exactly what might be causing the issue.
Hey, I believe your links are broken for some reasons which makes it hard to understand what happens.
Also, what HDRP version are you using? (settings and features varies a lot between versions so this might help pinpoint the issue)
However, out of my head, I suspect your transparent object is probably below or behind the water and is refraction (has something other than “none” in its refraction model settings). If yes, it’s expected that it “disappear” because water is also a refractive transparent and in HDRP your cannot stack those.
One way to “fix” this with some limitations is move your transparent object in the “Before Refraction” rendering pass so that when water is rendered, your object is already there.
Keep in mind that, it will lose its refraction model properties though.
Links are working for me. I’m using hdrp 16.0.6. Hmm, I’ve set the rendering pass to ‘before refraction’ and it changed nothing. The refraction model was set to None previously.
1 Like
Can you give me the editor version instead of the HDRP version (because HDRP version is not updated at every code change). The package version is tied to the editor version.
Editor ver is 2023.2.20f1. Ok, I’ve localized the issue. I have a UI camera as a child to main camera which culls only UI. This works ok, but when adding a water excluder in between water and my transparent object, the object becomes invisible. Removing UI camera fixes the problem.
Should I just remove the UI camera or is there a way to keep the UI camera?
1 Like
Still difficult to understand what happens honestly without the hands on the actual project. But it looks like you found a solution by disabling the second camera ?
Open island hdrp sample, add to the main camera UI camera (culling only UI) and cube with hdrp transparent material and default rendering pass. When UI camera is turned on, cube becomes invisible.
1 Like
I have the same behavior but the transparent cube isn’t the only thing disappearing.
I lose clouds, fog, atmospheric scattering etc… It’s just that HDRP doesn’t support camera stacking this way. If you want to make a custom UI you’d better use custom pass.
1 Like