@add shader test
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

float hash( float n )
{
    return fract(sin(n)*43758.5453);
}

vec3 hash3( float n )
{
    return fract(sin(vec3(n,n+1.0,n+2.0))*vec3(43758.5453123,22578.1459123,19642.3490423));
}

// ripped from Kali's Lonely Tree shader
mat3 rotationMat(vec3 v, float angle)
{
	float c = cos(angle);
	float s = sin(angle);

	return mat3(c + (1.0 - c) * v.x * v.x, (1.0 - c) * v.x * v.y - s * v.z, (1.0 - c) * v.x * v.z + s * v.y,
		(1.0 - c) * v.x * v.y + s * v.z, c + (1.0 - c) * v.y * v.y, (1.0 - c) * v.y * v.z - s * v.x,
		(1.0 - c) * v.x * v.z - s * v.y, (1.0 - c) * v.y * v.z + s * v.x, c + (1.0 - c) * v.z * v.z
		);
}

vec3 axis = normalize( vec3(-0.3,-1.,-0.4) );

vec2 map( vec3 p )
{

    // animation
	float atime = iGlobalTime+12.0;
	vec3 o = floor( 0.5 + p/50.0  );
	float o1 = hash( o.x*57.0 + 12.1234*o.y  + 7.1*o.z );
	float f = sin( 1.0 + (2.0*atime + 31.2*o1)/2.0 );
	p.y -= 2.0*(atime + f*f);
	p = mod( (p+25.0)/50.0, 1.0 )*50.0-25.0;
	if( abs(o.x)>0.5 )  p += (-1.0 + 2.0*o1)*10.0;
	mat3 roma = rotationMat(axis, 0.34 + 0.07*sin(31.2*o1+2.0*atime + 0.1*p.y) );

    // modeling
	for( int i=0; i<16; i++ )
	{
		p = roma*abs(p);
		p.y-= 1.0;
	}

	float d = length(p*vec3(1.0,0.1,1.0))-0.75;
	float h = 0.5 + p.z;
Merge branch 'master' of github.com:FSource/Faeris-Demo