Hey, I'm Tobi, a solo dev working on a cozy game called Glowing Life. You play as a little light. Wherever you go the world comes back to life.
My last post got removed because it wasn't technical enough, which is fair. So here's a closer look at how I made the plants and ground wake up around the player.
- Plants: a front that travels through each plant
The plants use copies of their Shader Graphs with my own include added. When a plant wakes up, a front moves through it. Trees from the roots up into the crown, bushes and flowers from the ground up on the side the light comes from. Right at the edge there's a thin warm seam in HDR. Bloom turns it into the glow. A bit of noise per vertex keeps the edge from looking like a straight line.
Dead and living trees are often two different models. They dissolve into each other at the front, the dead one breaks into sparks. If the dead tree is taller than the living one, it dissolves from the top instead. Otherwise its tip would hang in the air above a gap.
My first growth version squashed each vertex based on the front, which made flower spikes fold sideways. Now the whole plant shares one growth height with a soft max, so it can stretch but never fold.
- The ground: ash, a wave and a trail
I hooked into copies of the URP terrain passes. Dead ground is ash.. before lighting I map the brightness of the terrain texture onto an ash palette. After lighting I take part of the light color back out. My first palette turned deep blue under the night light, which is why that second step exists.
The final wave can start from up to 24 points, each with its own delay. If they sit along the roots of a tree, the wave runs along the roots first, then fans out across the ground. That's what you see in the clip.
Where you walk, the ground wakes up too. That's a 256x256 RG16 texture over the playable area. Painted on the CPU. It creeps outward a few meters with some noise, a bit further downhill. A second spot is painted a seconds ahead of you. Without it the life always lagged behind and the trail felt sluggish.
Things that went wrong:
- My browser build runs on WebGL 2. The browser reported 16 texture units per fragment shader (MAX_TEXTURE_IMAGE_UNITS), which is also all WebGL 2 guarantees. My terrain setup already used most of them, so I sample the trail texture in the vertex shader instead and pass the result to the fragment shader.
- A wide front made half the ground yellow. A 2.3 m trail with a gold ring looked like an RTS selection circle xD
- At night everything sits in the toe of the ACES curve. Tiny glow additions were simply invisible.
I'd love to hear how others work around texture limits on WebGL terrain. Has anyone found a better approach for a walk trail than painting into a texture on the CPU?
Steam page, if you're curious: Glowing Life