Class TerrainTypeTextureGenerator
Generates terrain type texture (R8) from terrain color texture (RGBA32) Maps terrain colors back to terrain type indices using TerrainColorMapper Purpose: Enables terrain splatting for detail texture selection
Architecture:
- Input: ProvinceTerrainTexture (RGBA32) with terrain colors
- Output: TerrainTypeTexture (R8) with terrain type indices (0-255)
- Method: Reverse color lookup via TerrainColorMapper
public static class TerrainTypeTextureGenerator
- Inheritance
-
objectTerrainTypeTextureGenerator
Methods
GenerateTerrainTypeTexture(Texture2D, bool)
Generate terrain type texture from terrain color texture Uses reverse lookup to map colors → terrain type indices
public static Texture2D GenerateTerrainTypeTexture(Texture2D terrainColorTexture, bool logProgress = true)
Parameters
terrainColorTextureTexture2DSource terrain texture (RGBA32)
logProgressboolEnable progress logging
Returns
- Texture2D
Terrain type texture (R8 format, 0-255 terrain indices)