shaderScalarField.frag 258 Bytes
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1 2 3 4 5 6 7 8
// ShaderScalarField::fragmentShaderText

PRECISON;
VARYING_FRAG vec3 color;
VARYING_FRAG float scalar;
FRAG_OUT_DEF;
void main()
{
9
	float s = scalar * 30.0;
Pierre Kraemer's avatar
Pierre Kraemer committed
10 11 12 13 14
	if( s - floor(s) <= 0.01 )
		gl_FragColor = vec4(0.0); 
	else
		gl_FragColor = vec4(color, 0.0);
}