res/shaders/wiiu.shader/wiiu.fs (view raw)
1varying vec2 texCoord;
2uniform sampler2D tex;
3uniform vec2 texSize;
4
5const float scale[32] = float[](
6 0.0/255.0, 6.0/255.0, 12.0/255.0, 18.0/255.0, 24.0/255.0, 31.0/255.0, 37.0/255.0, 43.0/255.0,
7 49.0/255.0, 55.0/255.0, 61.0/255.0, 67.0/255.0, 73.0/255.0, 79.0/255.0, 86.0/255.0, 92.0/255.0,
8 98.0/255.0, 104.0/255.0, 111.0/255.0, 117.0/255.0, 123.0/255.0, 129.0/255.0, 135.0/255.0, 141.0/255.0,
9 148.0/255.0, 154.0/255.0, 159.0/255.0, 166.0/255.0, 172.0/255.0, 178.0/255.0, 184.0/255.0, 191.0/255.0
10);
11
12void main() {
13 vec4 color = texture2D(tex, texCoord);
14 color.rgb = round(color.rgb * 31.0);
15 color = vec4(
16 scale[int(color.r)],
17 scale[int(color.g)],
18 scale[int(color.b)],
19 1.0
20 );
21 gl_FragColor = color;
22}