Table of Contents

Class DistanceFieldBorderRenderer

Namespace
Map.Rendering.Border
Assembly
MapAssembly.dll

ENGINE: Distance field border renderer implementation. Wraps BorderDistanceFieldGenerator for pluggable interface.

Uses Jump Flooding Algorithm (JFA) for GPU-based smooth anti-aliased borders. Results in silky smooth borders at any zoom level (CK3/Stellaris quality).

public class DistanceFieldBorderRenderer : BorderRendererBase, IBorderRenderer
Inheritance
object
DistanceFieldBorderRenderer
Implements
Inherited Members

Constructors

DistanceFieldBorderRenderer(BorderDistanceFieldGenerator)

public DistanceFieldBorderRenderer(BorderDistanceFieldGenerator generator = null)

Parameters

generator BorderDistanceFieldGenerator

Properties

DisplayName

Display name for UI/debugging

public override string DisplayName { get; }

Property Value

string

RendererId

Unique identifier for this renderer (e.g., "DistanceField", "PixelPerfect", "MyCustom")

public override string RendererId { get; }

Property Value

string

RequiresPerFrameUpdate

Whether this renderer requires per-frame updates (e.g., MeshGeometry needs OnRenderFrame)

public override bool RequiresPerFrameUpdate { get; }

Property Value

bool

Methods

ApplyToMaterial(Material, BorderStyleParams)

Apply visual parameters to the material (colors, widths, etc.) Called when visual style parameters change.

public override void ApplyToMaterial(Material material, BorderStyleParams styleParams)

Parameters

material Material
styleParams BorderStyleParams

Dispose()

Cleanup resources when renderer is deactivated or destroyed.

public override void Dispose()

GenerateBorders(BorderGenerationParams)

Generate/update borders. Called when borders are dirty or ownership changes.

public override void GenerateBorders(BorderGenerationParams parameters)

Parameters

parameters BorderGenerationParams

OnInitialize()

Override for custom initialization logic. Called after textureManager and context are set.

protected override void OnInitialize()

SetDistanceFieldGenerator(BorderDistanceFieldGenerator)

Set the distance field generator reference. Called by BorderComputeDispatcher when migrating to pluggable architecture.

public void SetDistanceFieldGenerator(BorderDistanceFieldGenerator generator)

Parameters

generator BorderDistanceFieldGenerator