tmp = texture2D(tex, Texcoord); if ((tmp.r + tmp.g+tmp.b) > 0.45) { discard; } gl_FragColor = color;
i = int(mod(Texcoord.s*10.0,2.0)); j = int(mod(Texcoord.t*10.0,2.0)); if (( i == 1 && j == 0 )|| (i == 0 && j == 1)) { gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0) - color; } else { gl_FragColor = color; }
vec2 position; vec2 useBrick; // should be uniform variables. vec2 brickPct = vec2(0.96, 0.96); vec2 brickSize = vec2(0.5, 0.25); position = Position / brickSize; if (fract(position.y * 0.5 ) > 0.5) position.x += 0.5; position = fract(position); useBrick = step(position, brickPct); gl_FragColor = mix(vec4(0.0, 0.0, 0.0, 1.0), color, useBrick.x * useBrick.y);