Hello everybody!
I've been attempting to mask a render texture and I can't seem to get the hang of it.
I'm making a cheap re-make of Portal (the game by Valve) for a school project and I have a render texture that's being used to render the portals.
However, the render textures are square and the portals are egg-shaped.
This is why I need to figure out how to mask the edges. ![alt text][1]
First off: My unity version is 2017.1.2f1
I tried watching YouTube tutorials on this matter to no avail. One video showed right clicking on an image, going into "2D Objects" and clicking "Sprite Mask".
It sounded promising until I realized that:
Sprite Mask's only work on **Sprite Renderers**, and since I'm using render textures they are not sprites. I tried looking at the settings on the texture to see if I could make it into a sprite...
However, there is no option for it since these are render textures, not regular textures. ![List item][2]
So my question is this.
Is it even possible to mask out a render texture?
**If so** then how do I do it?
**If it's not possible** then is there a workaround or a different approach you can recommend to me?
Thanks in advance for your help with this!
**PS:** Check my comment on this post to see what image I made for the mask. [1]: /storage/temp/106757-capture.png [2]: /storage/temp/106758-capture.png
I've been attempting to mask a render texture and I can't seem to get the hang of it.
I'm making a cheap re-make of Portal (the game by Valve) for a school project and I have a render texture that's being used to render the portals.
However, the render textures are square and the portals are egg-shaped.
This is why I need to figure out how to mask the edges. ![alt text][1]
First off: My unity version is 2017.1.2f1
I tried watching YouTube tutorials on this matter to no avail. One video showed right clicking on an image, going into "2D Objects" and clicking "Sprite Mask".
It sounded promising until I realized that:
Sprite Mask's only work on **Sprite Renderers**, and since I'm using render textures they are not sprites. I tried looking at the settings on the texture to see if I could make it into a sprite...
However, there is no option for it since these are render textures, not regular textures. ![List item][2]
So my question is this.
Is it even possible to mask out a render texture?
**If so** then how do I do it?
**If it's not possible** then is there a workaround or a different approach you can recommend to me?
Thanks in advance for your help with this!
**PS:** Check my comment on this post to see what image I made for the mask. [1]: /storage/temp/106757-capture.png [2]: /storage/temp/106758-capture.png