 out vec4 oFragColor;
 
 // Based on OpenGL Programming Guide (8th edition), p 457-459.
-float checkered( in vec2 uv, in int freq )
+float checkered( in vec2 uv, in ivec2 freq )
 {
 	vec2 checker = fract( uv * freq );
 	vec2 edge = fwidth( uv ) * freq;


uniform sampler2D	uTex0;
uniform int			uTexturingMode;

in VertexData	{
	vec4 position;


	if( uTexturingMode == 1 ) {
		diffuse *= vec3( 0.7, 0.5, 0.3 );
		diffuse *= 0.5 + 0.5 * checkered( vVertexIn.texCoord, uFreq );
	}
	else if ( uTexturingMode == 2 )
		diffuse *= texture( uTex0, vVertexIn.texCoord.st ).rgb;
