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

PRECISON;
VARYING_FRAG vec3 color;
VARYING_FRAG float scalar;
FRAG_OUT_DEF;
void main()
{
	float s = scalar * 50.0;
	if( s - floor(s) <= 0.01 )
		gl_FragColor = vec4(0.0); 
	else
		gl_FragColor = vec4(color, 0.0);
}