Page 1 of 1

Unity HDRP & RenderTexture Alpha

Posted: 16 Dec 2021, 12:21
by ttermeer-reboundcg
We are middle of upgrading our project to HDRP and we noticed some unusual behavior regarding RenderTexture. We a very basic avatar displayed in our UI using RenderTexture into an ImageSource using TextureSource. This was working perfectly before switching to HDRP. But since upgrading, the alpha is not respected. I verified in Unity, and the alpha channel is properly set and when using it in a raw image, the transparency is correct but in NoesisGUI, the transparency is no longer applied. Any idea what could cause this ?

Re: Unity HDRP & RenderTexture Alpha

Posted: 16 Dec 2021, 15:51
by ttermeer-reboundcg
Solved by changing the background color on the camera to 0, 0, 0, 0

Re: Unity HDRP & RenderTexture Alpha

Posted: 17 Dec 2021, 12:03
by jsantos
Great! I was going to work on this now, thanks for saving us time.

Re: Unity HDRP & RenderTexture Alpha

Posted: 21 Dec 2021, 15:51
by ttermeer-reboundcg
For anyone else having issue, also make sure in the HDRP quality settings to set R16G16B16A16 as Color Buffer Format.

Re: Unity HDRP & RenderTexture Alpha

Posted: 22 Dec 2021, 14:18
by jsantos
I will improve the documentation and verify. So R8G8B8A8 is not working?

Re: Unity HDRP & RenderTexture Alpha

Posted: 22 Dec 2021, 17:14
by ttermeer-reboundcg
This in the HDRP settings in the Color Buffer Format. The only possible values is R11G11B10 or R16G16B16A16 .
Even if the texture is declared as R8G8B8A8, it will not work if the HDRP settings does not include alpha.
download.png

Re: Unity HDRP & RenderTexture Alpha

Posted: 22 Dec 2021, 17:21
by jsantos
I see, thanks for the clarification!