- Home /
Masking camera image with transparent background in combination with UI
Hi everyone,
I've been looking for some time now and it would be very much appreciated, if someone could point me into the right direction!
I have 2D UI, which uses a lot of the Unity UI components. I also have a particle system, which I want to be drawn on top of the UI. However, I want the particle system to be masked in a certain way. My approach was the following:
I have one camera that only renders the UI canvas, which is in Screen Space - Camera render mode.
I have one camera that only renders the particle system into a render texture.
On my canvas I have a RawImage that uses that render texture. This image is masked via the UI mask component.
This works pretty fine, the only problem is, that the background of the RawImage is opaque. I need to see the UI components of the canvas underneath that RawImage, which I just cannot get to work.
Unfortunately I am very new to shaders. It would be great if someone could point me into the right direction, maybe even with a completely different approach?!
Regards
Your answer
Follow this Question
Related Questions
Player UI freezes when rendering to render texture. 1 Answer
Render texture only works in scene view 3 Answers
How to make the camera render RenderTexture if the camera is in another scene? 1 Answer
Masking camera from rectangular to arbitrary shape 0 Answers
RenderTexture on RawImage requiring second camera? 0 Answers