Glacial Valley

tanelpoder1 pts0 comments

GitHub - deedy/glacial-valley: A photorealistic glacial valley at sunrise, procedurally generated in real time in the browser. Three.js, zero assets, all math. · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

deedy

glacial-valley

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star<br>12

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>4 Commits<br>4 Commits

demo-video

demo-video

.gitignore

.gitignore

README.md

README.md

index.html

index.html

main.js

main.js

preview.png

preview.png

serve.py

serve.py

shaders.js

shaders.js

tree-test.html

tree-test.html

trees.js

trees.js

View all files

Repository files navigation

Glacial Valley

A photorealistic alpine glacial valley at sunrise, running in real time in the browser.<br>No game engine. No textures. No 3D models. Every mountain, the braided river, the<br>grass, the birds — all generated procedurally from math, in ~2,400 lines of Three.js.

▶ Walk around in it — mouse looks<br>(hold the cursor at a screen edge to keep turning), WASD moves, Shift sprints,<br>Space jumps. You can wade into the river.

How it works

Terrain — erosion-weighted fBm (octaves damped by accumulated gradient) plus<br>ridged multifractal peaks with domain warping. One height function drives the mesh,<br>the physics, the water depth, and all object placement. The braided river emerges<br>naturally: a wide shallow trough whose gravel-bar noise crosses the waterline.

Light & shadow — the sun is static, so sun visibility is ray-marched over the<br>heightfield and baked at load: mountains cast kilometer-long soft shadows, shaded<br>areas stay cold blue, and the drifting mist respects fog shadows behind boulders.

Water — two-pass screen-space refraction, Beer–Lambert absorption plus glacial<br>rock-flour scattering (that's the turquoise), depth-faded caustics, bed-gradient<br>rapids whitewater, shoreline foam, sun glitter.

Life — 85k wind-bent grass blades with per-blade gust flutter, circling birds,<br>fish-rise rings on calm pools, splash droplets at rapids, insects, pollen drifting<br>in sunbeams, dew, wildflowers.

Pipeline — all materials output linear HDR; a post pass applies ACES tonemapping,<br>vignette, grain, and adaptive exposure that stops down as you turn toward the sun.

Everything is generated at load (~3–5 s): no asset files, no network requests beyond<br>the Three.js CDN module.

Run locally

python3 serve.py # serves on http://localhost:8123 with caching disabled

Any static file server works. WebGL2 required.

Repo map

File<br>What

index.html<br>shell, import map, loading overlay

main.js<br>terrain generation, shadow baking, scene assembly, player controller

shaders.js<br>all GLSL: terrain, water, sky, mist, grass, rocks, ice, birds, post

serve.py<br>no-cache dev server

demo-video/<br>script that produced the demo video (ElevenLabs VO + captions)

Built with Claude Code.

About

A photorealistic glacial valley at sunrise, procedurally generated in real time in the browser. Three.js, zero assets, all math.

Resources

Readme

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

12<br>stars

Watchers

watching

Forks

forks

Report repository

Releases

No releases published

Packages

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

JavaScript<br>85.4%

Python<br>8.6%

HTML<br>6.0%

You can’t perform that action at this time.

glacial valley reload html search generated

Related Articles