Skip to content

Feature #8705: Use texture-based LUT for moddable global map colors

Replace hardcoded color formulas in globalmap.cpp with a texture-based lookup table (LUT). The global map now loads colors from textures/omw_map_color_palette.dds, a 256x1 RGB texture that maps WNAM height values (-128 to 127) to RGB colors (indices 0 to 255).

This allows modders to customize the global map color scheme by overriding the texture file, while maintaining the original Morrowind appearance by default. The implementation handles both RGB and BGR pixel formats for compatibility with DDS files.

Changes:

  • Added omw_map_color_palette.dds to builtin data files
  • Modified CreateMapWorkItem to accept and use color LUT
  • Replaced per-pixel formula calculations with LUT lookups
  • Added validation for LUT dimensions (must be 256x1)

Merge request reports

Loading