WebGL Terrain Editor

April 2012 | By Rob Chadwick


Video Play Button
An editor for height map terrains. This experiment uses WebGL for render the height field, and also for the editing operations. The rendering pipeline uses the GPU to accelerate raytracing for soft shadows, ambient occlusion, and volumetric atmosphere shadows. The height map generates tangent space in a shader, and uses texture atlases for diffuse and normal mapping. The diffuse lighting term is supplied by precomputed spherical harmonics. All operations use floating point values packed into RGBA textures, so it should not require any special WebGL extensions. Use the right mouse button and wheel to navigate, and the left button to edit. Buffers will be redrawn on mouseup. The samples for the raytraced effects accumulate over time, and should be nice and smooth after 30 seconds or so.

Built with: