Projects

Open to work · Relocation ready

Apothecary's Dungeon

Stylized top-down RPG · Unity URP

In-game capture: grass, vegetation and lighting

In development

  • Unity
  • URP
  • HLSL

A stylized top-down RPG made at Elven Empire, still in development. I built its custom grass rendering system for large environments and the shared wind shader that moves the vegetation.

Studio
Elven Empire, remote
Role
Unity Developer / Technical Artist
Status
In development
Stack
Unity, URP, HLSL

// Rendering

Grass for large environments

The grass is drawn with GPU instancing through DrawMeshInstancedIndirect and loads in chunks. The blades move with vertex animation in the shader, driven by the shared wind include.

// Tech Art · Shaders

One wind core for all vegetation

A single include, WindCore.hlsl, drives the grass, the flowers and every other object that sways. Layered value noise (FBM) makes the steady breeze. A travelling gust wave adds bursts on top of it.

Each vertex bends with the wind and then sags, which keeps a blade from stretching. The include depends only on _Time.

WindCore.hlsl HLSL
// travelling gust wave
float wavePhase = dot(worldPos.xz, dir) * 0.1 - time * 0.9;
float waveFront = smoothstep(0.90, 1.0, sin(wavePhase));
float totalWind = lightBreeze + waveMask * 0.7
                + windNoise * (lightBreeze + waveMask) * 0.4;

// bend the blade, then sag so it never stretches
worldPos.xz += (dir + swirlDir) * bend;
worldPos.y  -= (1.0 - sqrt(1.0 - bend * bend)) * heightT * scale;
  • HLSL
  • Value noise + FBM
  • Gust waves
  • Per-vertex bend
  • Distance fade
  • GPU instancing

// Shaders · Lighting

Water, vegetation and light

Besides the grass, I wrote URP shaders for water and vegetation and built custom lighting for the game.

Back to projects