// console commands
// 'xs wave'

// shader inputs
// uniform vec3		iVolumeSize;	// volume size [1-126]
// uniform float	iColorIndex;	// current color index [1-255]
// uniform vec3		iMirror;		// current mirror mode [0-1]
// uniform vec3		iAxis;			// current axis mode [0-1]

// uniform float	iFrame;			// current anim frame index
// uniform float	iNumFrames;		// total num of anim frames

// uniform float	iIter;			// current iteration index

// uniform vec4		iRand;			// random number

// uniform float	iArgs[8];		// user args

// built-in functions
// float voxel( vec3 v );			// get voxel color index at position v

// generate new voxel color index at position v
float map( vec3 v ) {
	vec3 center = iVolumeSize * 0.5;

	float t = length( ( v + 0.5 - center ).xy );

	float s = center.z * ( cos( t * 3.14159 * 0.1 + 3.14159265 * 2.0 * iFrame / iNumFrames ) * 0.25 + 1.0 );

	return iColorIndex * step( abs( v.z - s ), 2.0 );
}
