I’m developing a game in which I use 3 cameras to render different elements of the scene into 3 different render textures, that later I “merge” with a shader to get the final image (a simple workaround for getting the same result as in camera stacking with the built-in pipeline).
I’ve been working in Unity 2019.2.5 with the LWRP and everything seemed to work fine, but as soon as I upgraded the project to the beta version (2019.3.0b) the render textures stopped having transparency.
The cameras seem to have transparency when I disable the “Render PostProcessing” toggle in the camera inspector, but as soon as I do that I get a “don’t clear” effect in which every frame stacks with the previous one.
if I enable it the alpha channel seems to disappear (everything is white).
What am I doing wrong? Is this a bug of the new URP?
Attached there are screenshots of my setup of one of the cameras (the three of them are the same) and of the render textures.
Hi were you able to solve this? I have the exact same problem. I also seem to have a problem if I upgrade from URP 7.0 to 7.1 all my shaders go pink so that is not a viable solution for me
If you put the alpha to zero everything disappears, If I make it 1 then the object is transparent but the background is the solid color I choose. Not sure how you made it to work.
I Ended up taking a different approach and using layer order in order to achieve the desired result. It’s not as clean as It would have been by just stacking cameras, but it does the trick until some solution is provided by Unity.
I have just found a workaround. I choose URP/Particles/Simple Lit for the material of the object in the render texture, and set it to multiply and its alpha to 255.
no problem. I realized when I saw my mesh with Mobile/Particles/Alpha Blended was visible on the texture. So you can use that shader too if you want to make it visible. Dont know why this happens. Must be related to render order or something like that. I really dont understand those shader/render pipeline stuff.
This is so frustrating. I need post processing but I can’t remove the background when post processing is enabled.
The only “solution” I found is to use camera stacking BUT that doesn’t work because my entire UI is build in UI Toolkit, which is ALWAYS rendered on top of ALL the cameras, meaning if I use camera stacking my sprites and such are rendered behind the UI - and if I use a render texture I get a black background.
Does anyone have a solution?
**
Edit:
I finally caved and just added this with a canvas instead. I was trying to build a whole game with the new UI system but I simply can’t solve this part. So if anyone else has the same problem because you are using UI Toolkit, just make a canvas and have a raw image with the rendertexture instead of using UI Toolkit for it. Then you can add a material with the correct alpha (which was what I couldn’t figure out how to do on top of a render texture for UI Toolkit)