uniform sampler3D tex;
uniform bool usePositionLookup;

varying vec3 normal;
varying vec3 pos;
varying float y;

void main()
{
   // gl_LightSource[0].position.xyz
   
   // bunti
   vec4 c1 = vec4(0.2);//vec4(0.8, 0.9, 1, 0);//vec4(texture3D(tex, normalize(normal)).rgb, 1);
   vec4 c2 = vec4(texture3D(tex, normalize(pos)).rgb, 0);
   gl_FragColor = usePositionLookup ? c2 : c1;
   gl_FragColor.a = 0.0;
   //gl_FragColor = vec4(sin(pos.x)*sin(pos.z));//vec4(texture3D(tex, normalize(pos)).rgb, 1);//vec4(1,0,normal.x,1);
}


////   gl_FragColor = sin(15*sin(sin(pos.x)*sin(pos.y)+abs(sqrt(1+sin(pos.x)))+abs(sqrt(1+sin(pos.y))))) * gl_Color;
