public static Texture2DArray GenerateOrLoadBiomeTexture2DArray(BiomeSwitchTree bst, string fName, bool forceReload = false) { List <Texture2D> biomeTextures = new List <Texture2D>(); var biomeSurfaces = bst.GetBiomes().OrderBy(kp => kp.Key).Select(kp => kp.Value.biomeSurfaces); foreach (var biomeSurface in biomeSurfaces) { if (biomeSurface.biomeLayers != null) { foreach (var layerSurface in biomeSurface.biomeLayers) { foreach (var slopeSurface in layerSurface.slopeMaps) { if (slopeSurface.surfaceMaps != null) { if (slopeSurface.surfaceMaps.albedo != null && !biomeTextures.Contains(slopeSurface.surfaceMaps.albedo)) { biomeTextures.Add(slopeSurface.surfaceMaps.albedo); } } } } } } return(GenerateOrLoadTexture2DArray(fName, biomeTextures, forceReload)); }
public BiomeData() { biomeTree = new BiomeSwitchTree(); datas = new Sampler2D[9]; datas3D = new Sampler3D[9]; isWaterless = true; }