Namespace Map.MapModes.Colorization
Classes
- GradientMapModeColorizer
ENGINE: Default map mode colorizer using 3-color gradient interpolation.
Algorithm:
- Sample gradient at 3 points (low=0, mid=0.5, high=1.0)
- GPU compute shader interpolates based on province values
- Provinces with negative values use ocean color
This is the ENGINE default colorizer - wraps existing GradientMapMode.compute logic. GAME layer can register alternatives (DiscreteColorBands, MultiGradient, etc.)
- MapModeColorizerBase
ENGINE: Abstract base class for map mode colorizers. Provides common utilities for GPU compute shader-based colorization.
Subclasses implement:
- ColorizerId, DisplayName - identification
- InitializeColorizer() - load compute shader, create buffers
- DoColorize() - dispatch compute shader
- DisposeResources() - release GPU resources
Structs
- ColorizationStyleParams
Style parameters for colorization. Passed to Colorize() to control visual output.
- MapModeColorizerContext
Context provided during colorizer initialization. Contains shared resources needed by colorizers.
Interfaces
- IMapModeColorizer
ENGINE: Interface for pluggable map mode colorization strategies.
Pattern 20: Pluggable Implementation Pattern
- ENGINE provides interface + default implementation (gradient-based)
- GAME registers custom implementations via MapRendererRegistry
- VisualStyleConfiguration references by string ID
Default: GradientMapModeColorizer (3-color linear interpolation) Custom examples: DiscreteColorBands, MultiGradient, PatternOverlay, AnimatedEffects