Beispiel #1
0
    public void ProcessPropertyMapRevised()
    {
        var       Size    = GetSize();
        Texture2D TempMap = null;

        if (PropAlpha == PropChannelMap.None)
        {
            TempMap = new Texture2D(HeightMap.width, HeightMap.height, TextureFormat.RGB24, false);
        }
        else
        {
            TempMap = new Texture2D(HeightMap.width, HeightMap.height, TextureFormat.RGBA32, false);
        }

        Color theColour = new Color();

        for (int x = 0; x < TempMap.width; x++)
        {
            for (int y = 0; y < TempMap.height; y++)
            {
                theColour.r = TextureRed == null?TextureRed.GetPixel(x, y).grayscale : new Texture2D(TempMap.width, TempMap.height).GetPixel(x, y).grayscale;

                theColour.g = TextureGreen == null?TextureGreen.GetPixel(x, y).grayscale : new Texture2D(TempMap.width, TempMap.height).GetPixel(x, y).grayscale;

                theColour.b = TextureBlue == null?TextureBlue.GetPixel(x, y).grayscale : new Texture2D(TempMap.width, TempMap.height).GetPixel(x, y).grayscale;

                if (PropAlpha == PropChannelMap.None)
                {
                    theColour.a = 255;
                }
                else
                {
                    theColour.a = TextureAlpha == null?TextureAlpha.GetPixel(x, y).grayscale : new Texture2D(TempMap.width, TempMap.height).GetPixel(x, y).grayscale;
                }

                TempMap.SetPixel(x, y, theColour);
            }
        }
        TempMap.Apply();
        PropertyMap = TempMap;
        SaveTextureFile(MapType.Property);
    }
Beispiel #2
0
 public CombineMap(TempMap t1, TempMap t2)
 {
     TempMap1 = t1;
     TempMap2 = t2;
 }
Beispiel #3
0
 public Print(System.IO.TextWriter o)
 {
     Out = o;
     TempMap = new DefaultMap();
 }
Beispiel #4
0
 public Print(System.IO.TextWriter o, TempMap t)
 {
     Out = o;
     TempMap = t;
 }
Beispiel #5
0
 public CombineMap(TempMap t1, TempMap t2)
 {
     TempMap1 = t1;
     TempMap2 = t2;
 }
Beispiel #6
0
 public Print(System.IO.TextWriter o)
 {
     Out     = o;
     TempMap = new DefaultMap();
 }
Beispiel #7
0
 public Print(System.IO.TextWriter o, TempMap t)
 {
     Out     = o;
     TempMap = t;
 }