uniform sampler3D tex_intensity;
uniform sampler1D tex_transfer;

varying vec3 normal;
varying vec3 v;
varying vec3 lightvec;
varying mat3 normalMatrix;

void main(){

	vec4 intensity = texture3D(tex_intensity, vec3(gl_TexCoord[0]));
	vec4 transferred = texture1D(tex_transfer, intensity.x);
		
	gl_FragColor = transferred;
}