RenderTexture transparency ignored

Hello!

I have a camera with output target to a render texture. When I turn on post process on this camera, transparency is gone. More precisely, background transparency. It shows the opaque color of this camera no matter if color’s transparency is zero. Background type set to solid color.

Is this the intended behavior?

1 Like

Hi,
which rendering pipeline and more specifically on which Unity version are you working at the moment? This situation is currently somewhat fragmented with standard render pipeline, SRP with HDRP and LWRP which now morphed to URP and differences between 2018, 2019.2 and 2019.3.x. I know that some effects affect alpha (or overwrite it?) at least when using Post-processing Stack v2 on 2018 and HDRP. I haven’t tried that on 2019.3 and with HDRP/URP yet, actually I should check it. But it’s different thing as the post-processing is built in to those new render pipelines.

Anyway, if I assume you were on 2018, I know that Vignette effect writes to alpha, if you have post-processing on, you will see white gradient in the alpha channel. Bloom too writes that halo to alpha. But you shouldn’t get flat alpha.

Anti-aliasing modes affect that alpha too I think, if you have FXAA on, post-processing stack v2 effects use alpha to store LDR luminosity. I’m not expert on this but at least in some cases this ends up to the final alpha of the RenderTexture.

This is URP forum is not? :slight_smile: But fair enough.

I’m using URP with Unity 2019.3.0b7 and I’m usign post processing V3. (V3 is already built into URP) Film grain, Chromatic Abb, Bloom, Color Adjustment. I’m using these PP on the camera I wanna project the renderTexture. (corr.: projected into 3D object’s transparent material what sees the main camera)

I did some further test; I turned off all the PP effects, also the AA options on each camera. The only thing I did, I checked the Post Processing checkbox under the rendering group on the render texture targeted camera.

Bammm… alpha/transparency is gone. It’s probably a bug.
Can you confirm this @Olmi ?

Ouch sorry I somehow missed that lol, checked new posts and somehow mixed up the forum section in my head… I’ll check it here sec.

Sigh, exactly same result, as soon as I toggle the “Post Processing” option on under the Rendering sub-section, the alpha gets solid white. So yes, same behavior as you had over there. Looks like a bug unless this is somehow the expected behavior now.

I was using Unity 2019.3.0b7.

Thanks @Olmi !

erhhmmm… can we expect a Unity developer here, please?

Which version of Universal RP are you using?
7.1.1 should have this fixed.
If it’s not, please report a bug.

7.1.2 Sir! And sadly hasn’t got fixed. :frowning: Bug report just sent for this.

Bump! Still there in 7.1.6 with Unity 19.3.0f3.
Any news?

Hey!

I contacted with devs on this matter, and they replied that this is by design. So they wont make it to work. This is because PP effects needs alpha itself, so it wont work with render textures which also use alpha channel. :frowning:
This is it, such is life Mate… :frowning:

Oh wow…It worked back then with pp stack v2, right? Or was it even before that?
That’s so sad, it means that I can’t have a nice antialiasing on my RT :frowning:

Has anyone figured out a way to have antialiasing on RenderTextures with transparency? I have the exact same problem.

Dude, did you read the thread? :wink: this

Sorry – to clarify, I mean “has anyone figured out a workaround”. Such as an algorithm for adding antialiasing manually.

1 Like

The key here is the transparency. It just wont work, they did this by design… :eyes: I don’t get it either. If this has a workaround, I think it has big impact on performance.

Okay so the more pertinent question is … how do I turn the URP off??? I don’t care about any special pipeline stuff I just need alpha channels work work with render textures to play transparent video clips!!!

I need this to work the way it did in Unity 2018!

Okay, URP isn’t default in Unity (Yet) and I don’t have it installed… so this isn’t what’s causing my problem…