We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
varying vec2 v_texcoord;uniform sampler2D u_texture;float fractFp16(in float value) { float exponent = min(ceil(-log2(value + 1.4013e-045) - 1.0), 127.0); float scaled = value * pow(2.0, exponent); float result = fract(scaled * 65536.0) + ((exponent + 1.0) / 65536.0); return result; } vec3 noise(in float variation, in float intensity) { float value = sin(fractFp16(variation * 0.180654321)); value = fractFp16(value); return vec3(value) / intensity; } void main() { vec3 color = texture2D(u_texture, v_texcoord).rgb; vec3 noise_factor = noise(length(color), 3.0); color += noise_factor; gl_FragColor = vec4(color, 1.0); }