// 
//
// Simple Fragment Shader to Render a TFfunction & including the Alpha of the FrontColor
//
#include "Renderer.glsl"

uniform sampler1D texTransfer;
uniform sampler3D texData;
uniform sampler2D texGrid;
uniform float stepX;
uniform float stepY;
void main(){
	
	
	vec4 intensity = texture3D(texData, gl_TexCoord[0].stp);
	//vec4 intensity = getValue(gl_TexCoord[0].xy, texture2D(texGrid, gl_TexCoord[0].xy).xy, texGrid, texData,1.0/stepX, 1.0/stepY);	
	vec4 color = texture1D(texTransfer, intensity.x);
	gl_FragColor = vec4(color.rgb,getAlpha(gl_Color.a,color.a));
	
}
