Table of Contents

Class ProvinceTerrainAnalyzer

Namespace
Map.Rendering
Assembly
MapAssembly.dll

ENGINE: Analyzes terrain.bmp to determine dominant terrain type per province Uses GPU compute shader for efficient majority voting across all pixels Refactored to use specialized components for RGB lookup, BMP reading, and overrides

public class ProvinceTerrainAnalyzer : MonoBehaviour
Inheritance
object
ProvinceTerrainAnalyzer

Methods

AnalyzeAndGetTerrainTypes(RenderTexture, Texture2D, ushort[])

Analyze terrain and return results as array Returns uint[] where [arrayIndex] = terrainTypeIndex (0-255) Main entry point used by MapDataLoader

public uint[] AnalyzeAndGetTerrainTypes(RenderTexture provinceIDTexture, Texture2D terrainTexture, ushort[] provinceIDs)

Parameters

provinceIDTexture RenderTexture
terrainTexture Texture2D
provinceIDs ushort[]

Returns

uint[]

Initialize(string)

Initialize terrain analyzer. Called by ArchonEngine after GameSettings is registered.

public void Initialize(string dataDirectory)

Parameters

dataDirectory string