Debian Codegraph @

Data/Sys/Shaders/sketchy.glsl

raw
1 void main()
2 {
3 float4 c0 = Sample();
4 float4 tmp = float4(0.0, 0.0, 0.0, 0.0);
5 tmp += c0 - SampleOffset(int2( 2, 2));
6 tmp += c0 - SampleOffset(int2(-2, -2));
7 tmp += c0 - SampleOffset(int2( 2, -2));
8 tmp += c0 - SampleOffset(int2(-2, 2));
9 float grey = ((0.222 * tmp.r) + (0.707 * tmp.g) + (0.071 * tmp.b));
10
11 // get rid of the bottom line, as it is incorrect.
12 if (GetCoordinates().y*GetResolution().y < 163.0)
13 tmp = float4(1.0, 1.0, 1.0, 1.0);
14
15 c0 = c0 + 1.0 - grey * 7.0;
16 SetOutput(float4(c0.r, c0.g, c0.b, 1.0));
17 }