sketchy.glsl 704 B

12345678910111213141516171819202122
  1. uniform sampler2D samp9;
  2. out vec4 ocol0;
  3. in vec2 uv0;
  4. uniform vec4 resolution;
  5. void main()
  6. {
  7. float4 c0 = texture(samp9, uv0).rgba;
  8. float4 tmp = float4(0, 0, 0, 0);
  9. tmp += c0 - texture(samp9, uv0 + float2(2, 2)*resolution.zw).rgba;
  10. tmp += c0 - texture(samp9, uv0 - float2(2, 2)*resolution.zw).rgba;
  11. tmp += c0 - texture(samp9, uv0 + float2(2, -2)*resolution.zw).rgba;
  12. tmp += c0 - texture(samp9, uv0 - float2(2, -2)*resolution.zw).rgba;
  13. float grey = ((0.222 * tmp.r) + (0.707 * tmp.g) + (0.071 * tmp.b));
  14. // get rid of the bottom line, as it is incorrect.
  15. if (uv0.y*resolution.y < 163)
  16. tmp = float4(1.0, 1.0, 1.0, 1.0);
  17. c0 = c0+1-grey*7.0;
  18. ocol0 = float4(c0.r, c0.g, c0.b, 1);
  19. }