
#define texture texture2D
#define in varying

in vec2 v_tc0;

uniform sampler2D u_smokeDensity_tex;
uniform sampler2D u_obstacle_tex;

void main()
{
	vec4 d = texture( u_smokeDensity_tex, v_tc0 );
	float c = d.x;

	float obstacleVal = texture( u_obstacle_tex, v_tc0 ).r;

	gl_FragColor = mix ( vec4( 0.3, 0.2, 1.0, 1.0 ), vec4( c, c, c, 1.0 ), obstacleVal );
}
