- Home /
Transparent background in Unity 2019 HDRP
I want a RenderTexture image with transparent background.
I set the Background Type to "Color" and alpha value of the Background Color to zero in Camera property.
It was OK with the Unity 2018 HDRP.
But it does not become transparency with Unity 2019 HDRP. (2019.1.0f2, HDRP:5.13.0)
Even if it is Unity 2019, it is possible if not use the HDRP.
Is it impossible with Unity 2019 HDRP?
I found the solution.
Edit -> Project settings -> Quality -> HDRP
Set the item to "R16G16B16A16" of "Color Buffer Format" in "Rendering".
I have confirmed that it can be done with unity 2019.3.9 and 2019.4.1.
Thank you!
Answer by Ben-Kuper · Aug 16, 2019 at 08:31 AM
Same here, tried to fiddle around FinalPass.shader but nothing good out came out of it. This is a huge stepback when using Render Textures ! We're using them all the time along with Spout in digital art and live show projects, but this is a blocker...
That's right! Even if the rendering performance is improved, it doesn't make sense.
Answer by abgrac · Oct 24, 2019 at 02:20 AM
This is outrageous!! Alpha is needed for MANY purposes. Does Unity at least propose any other way of blending cameras if not through RenderTexture!?
Hello abgrac! I also tried Unity 2019.3.0b4 and HDRP 7.0.1 but it was not successful again.
Answer by kelloh · May 07, 2019 at 03:28 PM
FYI, one reason this is impossible in the current version of HDRP is that that in HDRP's FinalPass.shader, you've got this line:
return float4(outColor, 1.0);
I'm not sure why HDRP is setup to always throw away the alpha value...
Answer by Satton38 · May 08, 2019 at 01:32 AM
Hello kelloh. Thank you for answering.
In other words, it is difficult with the current HDRP specifications.
I tried to rewrite the FinalPass.shader you taught me but it did not resolve.
By the time the HDRP is officially released, I will wait for the issue to be resolved...
Thank you. :)
Answer by Extrawurst · Jun 20, 2019 at 10:34 AM
I observe the same in the LWRP - a workaround for me was disabling multisampling / antialiasing in the render texture, does that work for you as well @Satsukawa ?
Hello Extrawurst.
I tried your approach. But unfortunately it did not succeed in that way. Thank you! @Extrawurst