Table of Contents

Namespace Map.Rendering.Compositing

Classes

CinematicShaderCompositor

Cinematic compositor - enhanced contrast and effects. Suitable for screenshots and trailers.

CompositorConfig

Configuration for shader compositing. Passed to shader via material properties.

DefaultShaderCompositor

ENGINE: Default shader compositor with standard layer compositing.

Compositing Order:

  1. Base Color (map mode) - always rendered
  2. Normal Map Lighting - lerp blend
  3. Borders - lerp blend
  4. Highlights - lerp blend
  5. Fog of War - lerp blend
  6. Overlay Texture - multiply blend

All layers enabled, standard blend modes. This is the ENGINE default - GAME can register alternatives.

MinimalShaderCompositor

Minimal compositor - borders and highlights only, no fog/overlay. Useful for performance or clean visual style.

ShaderCompositorBase

ENGINE: Abstract base class for shader compositors. Provides common utilities for configuring material properties.

Subclasses implement:

  • CompositorId, DisplayName - identification
  • GetConfig() - return compositing configuration
  • ConfigureCompositor() - custom material setup
StylizedShaderCompositor

Stylized compositor - uses multiply blending for borders for EU4-like look. Borders darken the base color instead of overlaying.

Structs

CompositorContext

Context provided during compositor initialization.

Interfaces

IShaderCompositor

ENGINE: Interface for pluggable shader compositing strategies.

Pattern 20: Pluggable Implementation Pattern

  • ENGINE provides interface + default implementation
  • GAME registers custom implementations via MapRendererRegistry
  • Controls HOW render layers are combined in the final output

Compositing Layers (each from pluggable IRenderer):

  1. Base Color - Map mode (political/terrain/development)
  2. Lighting - Normal map lighting
  3. Borders - From IBorderRenderer
  4. Highlights - From IHighlightRenderer
  5. Fog of War - From IFogOfWarRenderer
  6. Overlay - Paper/parchment effects

Default: Standard layer-by-layer compositing with lerp blending Custom examples: Stylized (multiply borders), Minimal (skip fog), Cinematic (custom post)

Enums

BlendMode

Blend modes for layer compositing. Matches shader implementation.