Table of Contents

Class PixelPerfectBorderRenderer

Namespace
Map.Rendering.Border
Assembly
MapAssembly.dll

ENGINE: Pixel-perfect border renderer implementation. Uses compute shader for crisp, aliased 1-pixel border detection.

Best for retro/pixel art aesthetics where sharp borders are desired. Supports configurable thickness and optional anti-aliasing.

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

Constructors

PixelPerfectBorderRenderer(ComputeShader)

public PixelPerfectBorderRenderer(ComputeShader computeShader = null)

Parameters

computeShader ComputeShader

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()

SetParameters(int, int, float)

Set pixel-perfect rendering parameters.

public void SetParameters(int countryThickness, int provinceThickness, float aa)

Parameters

countryThickness int

Country border thickness in pixels

provinceThickness int

Province border thickness in pixels

aa float

Anti-aliasing gradient width (0 = sharp)