Programming
Progress

News Node Code WebGL Workers About

WebGL Samples

Copyright © 2010 Sami Mäkelä

Flow

In this sample, the color level is controlled for each cell by a simple equation that involves only adjacent cells.

Rubik's cube

This sample solves the Rubik's cube. It's magic!

N-body simulation

This sample shows how to make n-body simulations in GPU. It includes gravitation and simple collision handling. Obviously it is much slower and more cumbersome than it would be using OpenCL. Requires VTF, so it won't currently work with ANGLE.

Refraction sample

Refraction sample implements just the refraction of light when it moves from the bottom of the water container to the eye.

Fire demo

Simple 3D fire effect can be seen here. This one uses VTF too.

Xmas star

This sample has a bit more heavy shader than the other samples on this page. It might take a minute or so for the shader to compile, so do not kill the page too soon.

WARNING: Might crash your computer, do not try with older GPUs.

Video effects

Coming soon.