Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main() {
- highp float grayComponent = rand(vec2(positionInput.x + u_Random, positionInput.y + u_Random));
- // Daniel's code randomises every pixel. I found that randomising only those that came
- // out higher than 0.9 made for a more old-school "television, tuned to a dead channel",
- // which I also found more hypnotic.
- if (grayComponent > 0.9) {
- gl_FragColor = vec4(grayComponent, grayComponent, grayComponent, 1.0);
- } else {
- gl_FragColor = vec4(0, 0, 0, 1.0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement