public void Generate()
    {
        ModuleBase myModule = new Perlin(frequency, lacunarity, persistence, octaves, seed, quality);

        Noise2D heightMapBuilder = new Noise2D(width, height, myModule);

        heightMapBuilder.GenerateSpherical(south, north, west, east);

        LibNoiseGradient g = new LibNoiseGradient(gradient.colorKeys[0].color);

        foreach (var col in gradient.colorKeys)
        {
            g[col.time] = col.color;
        }

        image            = heightMapBuilder.GetTexture(g);
        image.filterMode = imageFilterMode;
        image.wrapMode   = imageWrapMode;
        image.Apply();

        GetComponent <LODMaterial>().OurMaterial.mainTexture = image;
    }
Esempio n. 2
0
 public Texture2D GetTexture(Gradient gradient)
 {
     return(this.GetTexture(ref gradient));
 }