docs.run2go.idoptiterraOverview & Architecture
Back to optiterra
Terrain Shader

Overview & Architecture

OptiTerra core architecture — Texture2DArray optimization, 16 layers, and 90% GPU bandwidth savings.

About OptiTerra

OptiTerra is a specialized terrain shader designed for Unity's Terrain system, with a core focus on speed and fidelity. It leverages modern GPUs to handle Texture2DArray efficiently, reducing GPU bandwidth usage and minimizing excessive texture sampling within the terrain shader.

Typically, Unity's default terrain system supports only up to 8 layers, resulting in approximately 27 texture samples being processed simultaneously. This behavior is highly demanding on the GPU, especially during the fragment stage. With OptiTerra, all terrain layers require only about 2–3 texture samples total, delivering a performance gain of more than 90% compared to the default Unity terrain shader.

OptiTerra High-Performance HDRP Terrain Shading
OptiTerra High-Performance HDRP Terrain Shading

16-Layer Single Pass Support

The 8-layer limitation in Unity's default TerrainLit often bottlenecks artists creating large-scale, biome-rich environments. OptiTerra solves this by supporting up to 16 terrain layers in a single pass. While the shader is technically capable of handling up to 256 layers at the data level, sampling beyond 16 is avoided to respect AAA performance budgets.

Up to 16 PBR Terrain Layers in a Single Render Pass
Up to 16 PBR Terrain Layers in a Single Render Pass

Key Technical Specs

  • Native Unity 6 HDRP (6000.0+) compatibility
  • Up to 16 PBR terrain layers in a single render pass
  • Texture2DArray batching: CH (Color + Height) and NOS (Normal + AO + Smoothness)
  • Instanced Tessellation with continuous Draw Instancing active
  • Dual Anti-Tiling Hex algorithms eliminating repetitive tiling patterns
  • Dynamic weather reactivity with wetness and rain ripple simulations