heyy everyone i have set up a minimap using render texture using this code
var mTexture : Texture;
var mMatt : Material;
function OnGUI () {
if (Event.current.type == EventType.Repaint){
Graphics.DrawTexture(Rect(0,-1,250,250), mTexture,Rect(0,0,1,1),0,0,0,0,mMatt);
}
}
which was originally ment to set a texture such as “Hard” from the standard assets and then display a material onto the texture which was a cemera rendertexture material but that didn’t work so i found this shader
Shader "MaskedTexture"
{
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
_Mask ("Culling Mask", 2D) = "white" {}
_Cutoff ("Alpha cutoff", Range (0,1)) = 0.1
}
SubShader
{
Tags {"Queue"="Transparent"}
Lighting Off
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
AlphaTest GEqual [_Cutoff]
Pass
{
SetTexture [_Mask] {combine texture}
SetTexture [_MainTex] {combine texture, previous}
}
}
}
and used it with my material and that worked but i want to be able to make it so i can change the color of the map like what this person’s map looks like
http://forum.unity3d.com/threads/59622-Graphics.Draw-being-rendered-in-the-actual-game…-Solved?highlight=minimap
ok so that was really hard to explain and probably doesnt make sense to anyone so if you dont understand i will try to rephrase it pretty much i want to achieve what the person from that link has done using render texture but of cause with my own map material. i have got mine working where the map is round and displays what the camera sees i just cant figure out how to make it so i can add my own texture to it and make the map a different color so it doesnt blend into the map.