This page is created automatically. Click here to view this shader on Shadertoy.

Created for the Shadertoy Competition 2018

07/29/2018 I have made some optimizations and bugfixes, so I could enable AA.

!! Please change AA (line 47) to 1 if your framerate is below 60 (or if you're running the shader fullscreen).

This shader uses motion capture data to animate a humanoid. The animation data is compressed by storing only a fraction of the coeffecients of the Fourier transform of the positions of the bones (Buffer A). An inverse Fourier transform is used to reconstruct the data needed.

Image Based Lighting (IBL) is used to render the scene. Have a look at my shader "Old watch (IBL)" ( for a clean implementation of IBL.

Buffer A: I have preprocessed a (motion captured) animation by taking the Fourier transform of the position of all bones (14 bones, 760 frames). Only a fraction of all calculated coefficients are stored in this shader: the first coefficients with 16 bit precision, later coefficients with 8 bit. The positions of the bones are reconstructed each frame by taking the inverse Fourier transform of this data.

I have used (part of) an animation from the Carnegie Mellon University Motion Capture Database. The animations of this database are free to use:

Íñigo Quílez has created some excellent shaders that show the properties of Fourier transforms, for example:

Buffer B: The BRDF integration map used for the IBL and the drawing of the humanoid are precalculated.

Buffer C: Additional custom animation of the bones is calculated for the start and end of the loop.

Source code

You can find (the full source of) [SH18] Human Document on Shadertoy.