void GenerateColorsMap() { _displayFilter.sharedMesh = MyMapGenerator.GenerateQuad(_width, _height); float[,] heightMap = GetHeightMap(); Color[] colorsMap = GetColorsMap(heightMap); _displayRenderer.sharedMaterial.mainTexture = MyMapGenerator.GenerateColorsMap(colorsMap, heightMap.GetLength(0), heightMap.GetLength(1)); }
void GenerateMeshMap() { float[,] heightMap = GetHeightMap(); Color[] colorsMap = GetColorsMap(heightMap); float meshScale = 1 / Mathf.Pow(2, _detailLevel); _displayFilter.sharedMesh = MyMapGenerator.GenerateHeightMesh(heightMap, _heightCurve, _maxMeshHeight, meshScale); _displayRenderer.sharedMaterial.mainTexture = MyMapGenerator.GenerateColorsMap(colorsMap, heightMap.GetLength(0), heightMap.GetLength(1)); }