Table of Contents

Class TerrainTypeTextureGenerator

Namespace
Map.Loading
Assembly
MapAssembly.dll

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
object
TerrainTypeTextureGenerator

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

terrainColorTexture Texture2D

Source terrain texture (RGBA32)

logProgress bool

Enable progress logging

Returns

Texture2D

Terrain type texture (R8 format, 0-255 terrain indices)