Visual Pipeline

Rendering Overview

Dracor targets atmospheric dark fantasy visuals rendered entirely in the browser. The rendering pipeline is built on Babylon.js 7, using WebGPU where available with a WebGL2 fallback. The visual strategy prioritizes composition and atmosphere over raw polygon counts — dense pine forests, misty valleys, ember-lit shrines, and golden hour lighting create mood through environmental storytelling rather than brute-force detail.

PBR Materials

All surfaces use physically-based rendering with the metallic/roughness workflow. Materials are authored with albedo, normal, metalness, roughness, and ambient occlusion maps. This ensures consistent lighting response across the day-night cycle and different weather conditions.

  • Metallic/roughness workflow for all environment and character assets
  • Baked ambient occlusion combined with one real-time directional shadow
  • Texture atlasing for terrain and foliage to minimize draw calls

Hardware Instancing

Trees, grass, rocks, and other repeated objects use hardware instancing. A single mesh definition is uploaded once, then drawn thousands of times with per-instance transform data. This allows dense forests of 5,000+ trees to render in a single draw call per mesh variant, keeping frame times well within budget.

Instance Budget

Trees

~5,000

Grass Patches

~10,000

Rocks / Props

~2,000

Terrain Streaming

The world is divided into terrain chunks that stream in and out based on the player's position. A view radius determines which chunks are loaded; chunks beyond the radius are disposed to keep memory under control. Height data, splat maps, and foliage placement are loaded per-chunk, allowing the world to feel vast without loading everything upfront.

  • Chunks stream based on player proximity with configurable view radius
  • Under 10MB initial load to reach gameplay
  • LOD system with three detail levels per object for smooth transitions

Post-Processing

A lightweight post-processing pipeline adds visual polish without destroying frame budget. Effects are ordered carefully and can be toggled individually by the player or automatically by the quality tier system.

Bloom

Soft glow on emissive surfaces: ember shrines, torch fire, magical effects. Adds warmth and atmosphere to night scenes.

SSAO

Screen-space ambient occlusion adds contact shadows in crevices, under foliage, and around characters for grounded visuals.

Tonemapping

ACES tonemapping compresses HDR values into displayable range while preserving color richness and contrast.

Fog

Distance fog and height fog create depth and mystery. Doubles as a performance tool by hiding pop-in at chunk boundaries.

Quality Tiers

Four quality presets automatically adapt to the player's hardware. The system monitors frame time and adjusts tier dynamically, or players can lock a specific tier manually. Each tier controls shadow resolution, post-processing features, LOD distances, and instance counts.

TierShadowsPost-FXTarget FPS
Ultra2048pxAll enabled60
High1024pxBloom + Tonemap60
Medium512pxTonemap only30
LowOffNone30