// brick example fragment shader // shader constants, could be passed in to allow modification float width=.25, height = .1, mortar = .01; vec4 brick_color = vec4(1.,0.,0.,1.); vec4 mortar_color = vec4(.5,.5,.5,1.); void main() { // find row and column for this pixel float bs = gl_TexCoord[0].x, bt = gl_TexCoord[0].y; // offset even rows by half a bt if (mod(bt,2.*height)