Tagged: glsl

Part 2: Painted Blocks and Their Light
Paint six materials in code, from bricks to copper, and lay them on the blocks by their place in the world, so that walls read as one surface. A bar shows the materials, and blocks in caves get dark, from the light grids the workers already work out.
Advanced40 min
Part 5: Slopes and Roofs
Give the chisel a second profile: an edge cut flat from side to side. A cube clipped by one plane per edge makes wedges, ridges, pyramids and hip corners; the player walks up them like ramps, and slate lies on a roof in level rows.
Advanced40 min
Part 8: Triplanar Textures
Give the terrain grass, soil, rock and snow: textures painted in code into a texture array, projected from three sides in a GLSL shader, and chosen by slope, height and how deep below the ground a spot lies.
Advanced35 min
Part 11: Cave Light
Let the light of the sky reach only as far into a cave as it can travel through the air: a grid of light nodes, filled breadth-first from the open sky, read at every vertex, the same in neighboring chunks, and a lamp for the dark.
Advanced35 min
Part 12: A Far View to the Horizon
Show the ground beyond the chunks, out to 4.5 km, as a cheap heightfield of rings around the camera that get wider with distance, built in a worker of its own, and joined to the voxel terrain with an overlap the shader hides.
Advanced30 min