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 GPU compute shader 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: GPU compute shader with color lookup buffer
public static class TerrainTypeTextureGenerator
Inheritance
object
TerrainTypeTextureGenerator

Methods

GenerateTerrainTypeTexture(Texture2D, bool)

Generate terrain type texture from terrain color texture using GPU compute shader

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)