Then I apply this material in a plane and a second camera rendertexture this plane to a second texture.
Then I use a GUITexture to show the minimap in the screen.
The problem is: My mask is a circle, so I expected to see just a circle as the minimap, but what I’m getting a 50% alpha black square with a round minimap inside…
If I don’t apply the texture in a GUITexture, but in a plane, the 50% alpha black square disapears…
Any clue?
Thanks in advance,
[EDIT] - Damn, I solved like 5 min after posting here… hehe I just changed the Clear Flags of the second camera to Solid Color
Hey Deoxyz, as I said above I used 2 cameras.
Te first was filming all my map and randering in a texture (tex1).
I created a material with the shader above (and tex1) and used it in a plane. A second camera was filming this plane and rendering another texture (tex2).
This tex2 is them rendered in a GUITexture.
Some tricks are always necessary depending on your project. But make sure the second camera can only film the plane’s layer.
I don’t have any example project with this right now, but I’m sure you can make it yourself, its not that hard now
good luck, if you have any pontual issues, let me know.