- WoGL Games
- Surf
Surf
Surf an ocean drawn by a shader
The ocean is a shaderWhat is a shader?A small program that runs on the GPU and decides the color of a single pixel. The GPU runs it for every pixel at once. built with FBMWhat is FBM?Fractal Brownian Motion: several layers of noise stacked, each one finer and weaker than the last. Adding them creates natural detail, from big mountains down to the finest texture.; your pointer is the board and leaves a bow wave and a wake behind it. Double click and it surfs on its own.
What you can do
- 01
Ride the swell
The sea moves under your pointer in real time.
- 02
Leave a wake
Moving the board raises a bow wave in front and a wake behind.
- 03
Tune the sea
Four sliders — Scale, Touch, Force and Hue — are uniformsWhat is a uniform?A value fed into the shader from outside, the same for every fragment in that frame, like time or the mouse. It changes between frames, not between pixels: that is why it animates the whole image at once. of the shader.
How it works
- 1
Move
Move your pointer over the water.
- 2
Double click
Double click, or double tap, to surf on autopilot.
- 3
Tune
Move the sliders to change the sea.
Questions
Is it free?
Yes. It runs in your browser and needs no account.
Does it work on a phone?
Yes. Your finger is the board; a double tap surfs on its own.
What are the sliders?
Uniforms of the shader: values fed in from outside that change the whole sea at once.