vec4 notch() { vec2 inSize = 1.0 / oneTexel; vec2 halfSize = 0.5 * inSize; vec2 stepCoord = tex_coord; stepCoord.x = float(int(stepCoord.x * halfSize.x)) / halfSize.x; stepCoord.y = float(int(stepCoord.y * halfSize.y)) / halfSize.y; vec4 noise = texture(tex, stepCoord * halfSize / 4.0);// I don't have a dither sampler so we'll see how this goes. vec4 col2 = texture(tex, stepCoord) + noise * vec4(1.0 / 12.0, 1.0 / 12.0, 1.0 / 6.0, 1.0); float redComponent = float(int(col2.r * 8.0)) / 8.0; float greComponent = float(int(col2.g * 8.0)) / 8.0; float bluComponent = float(int(col2.b * 4.0)) / 4.0; return vec4(redComponent, greComponent, bluComponent, 1.0); }