Table of Contents

Class DetailTextureArrayLoader

Namespace
Map.Loading
Assembly
MapAssembly.dll

Loads terrain detail textures into Texture2DArray for GPU splatting Scans Assets/Data/textures/terrain_detail/ for {index}_{name}.png files

Architecture:

  • File naming: {index}_{name}.png (e.g., "0_grasslands.png", "3_desert.png")
  • Index range: 0-255 (matches TerrainColorMapper terrain type indices)
  • Format: RGBA32 sRGB with mipmaps for performance
  • Missing indices: Filled with neutral gray (128,128,128,255) for multiply blend

Moddability:

  • Drop PNG files in folder to add/replace detail textures
  • File names must match terrain type indices from TerrainColorMapper
  • Supports hot-reload (rebuild array when files change)
public static class DetailTextureArrayLoader
Inheritance
object
DetailTextureArrayLoader

Methods

GetLoadedTerrainTypes()

Get list of loaded terrain type indices Useful for debugging and validation

public static List<int> GetLoadedTerrainTypes()

Returns

List<int>

HasDetailTexture(int)

Check if terrain type has detail texture available

public static bool HasDetailTexture(int terrainTypeIndex)

Parameters

terrainTypeIndex int

Returns

bool

LoadDetailTextureArray(int, bool)

Load all detail textures into Texture2DArray

public static Texture2DArray LoadDetailTextureArray(int textureSize = 512, bool logProgress = true)

Parameters

textureSize int

Resolution per texture (default 512x512)

logProgress bool

Enable progress logging

Returns

Texture2DArray

Texture2DArray with terrain detail textures