Debian Codegraph @

Data/Sys/Shaders/sepia.glsl

raw
1 void main()
2 {
3 float4 c0 = Sample();
4
5 // Same coefficients as grayscale2 at this point
6 float avg = (0.222 * c0.r) + (0.707 * c0.g) + (0.071 * c0.b);
7 float red=avg;
8
9 // Not sure about these coefficients, they just seem to produce the proper yellow
10 float green=avg*.75;
11 float blue=avg*.5;
12 SetOutput(float4(red, green, blue, c0.a));
13 }