This experiment diferentiates of the others because the renderer is running inside the texture of an object. Take a look at this file to see how it is implemented.

This experiment uses the Voxels renderer to create a pixelated lava lamp.

First, the getScene function creates a bunch of spheres combined with the SmoothMin function. Then, the renderer uses that surface to simulate the voxels in 3D. To read more about this effect, take a look at the Voxels experiment.

To calculate colors, the getLight function uses the position of the hit to determine the color of the lava lamp.

3D model credits

This work is based on "Groovy Lava Lamp" ( by thelaughingdingo ( licensed under CC-BY-4.0 (