uniform sampler3D t;
uniform int a;

float s(vec3 x)
{
	return texture3D(t, x / 256.0).x;
}

void main()
{
	float x = float(a);
	vec2 fc = gl_FragCoord.xy;
	gl_FragData[0] = vec4(
		s(vec3(fc, x)) * .5 +
		s(vec3(fc, x) * 2.) * .25 +
		s(vec3(fc, x) * 4.) * .125 +
		s(vec3(fc, x)  * 8.) * .0625 +
		s(vec3(fc, x)* 16.) * .03125
	);
}