mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
- change 'halfstep' in the dither shader to a #define
This commit is contained in:
parent
1cfed9de45
commit
07c9db682d
1 changed files with 17 additions and 17 deletions
|
@ -17,24 +17,24 @@ vec4 ApplyGamma(vec4 c)
|
||||||
return vec4(val, c.a);
|
return vec4(val, c.a);
|
||||||
}
|
}
|
||||||
|
|
||||||
float halfstep = 1./65.;
|
#define HALFSTEP 1./65.
|
||||||
float DitherMatrix[64] = float[](
|
float DitherMatrix[64] = float[](
|
||||||
0.0 / 16.0 + halfstep * 1, 8.0 / 16.0 + halfstep * 1, 2.0 / 16.0 + halfstep * 1, 10.0 / 16.0 + halfstep * 1,
|
0.0 / 16.0 + HALFSTEP * 1, 8.0 / 16.0 + HALFSTEP * 1, 2.0 / 16.0 + HALFSTEP * 1, 10.0 / 16.0 + HALFSTEP * 1,
|
||||||
0.0 / 16.0 + halfstep * 3, 8.0 / 16.0 + halfstep * 3, 2.0 / 16.0 + halfstep * 3, 10.0 / 16.0 + halfstep * 3,
|
0.0 / 16.0 + HALFSTEP * 3, 8.0 / 16.0 + HALFSTEP * 3, 2.0 / 16.0 + HALFSTEP * 3, 10.0 / 16.0 + HALFSTEP * 3,
|
||||||
12.0 / 16.0 + halfstep * 1, 4.0 / 16.0 + halfstep * 1, 14.0 / 16.0 + halfstep * 1, 6.0 / 16.0 + halfstep * 1,
|
12.0 / 16.0 + HALFSTEP * 1, 4.0 / 16.0 + HALFSTEP * 1, 14.0 / 16.0 + HALFSTEP * 1, 6.0 / 16.0 + HALFSTEP * 1,
|
||||||
12.0 / 16.0 + halfstep * 3, 4.0 / 16.0 + halfstep * 3, 14.0 / 16.0 + halfstep * 3, 6.0 / 16.0 + halfstep * 3,
|
12.0 / 16.0 + HALFSTEP * 3, 4.0 / 16.0 + HALFSTEP * 3, 14.0 / 16.0 + HALFSTEP * 3, 6.0 / 16.0 + HALFSTEP * 3,
|
||||||
3.0 / 16.0 + halfstep * 1, 11.0 / 16.0 + halfstep * 1, 1.0 / 16.0 + halfstep * 1, 9.0 / 16.0 + halfstep * 1,
|
3.0 / 16.0 + HALFSTEP * 1, 11.0 / 16.0 + HALFSTEP * 1, 1.0 / 16.0 + HALFSTEP * 1, 9.0 / 16.0 + HALFSTEP * 1,
|
||||||
3.0 / 16.0 + halfstep * 3, 11.0 / 16.0 + halfstep * 3, 1.0 / 16.0 + halfstep * 3, 9.0 / 16.0 + halfstep * 3,
|
3.0 / 16.0 + HALFSTEP * 3, 11.0 / 16.0 + HALFSTEP * 3, 1.0 / 16.0 + HALFSTEP * 3, 9.0 / 16.0 + HALFSTEP * 3,
|
||||||
15.0 / 16.0 + halfstep * 1, 7.0 / 16.0 + halfstep * 1, 13.0 / 16.0 + halfstep * 1, 5.0 / 16.0 + halfstep * 1,
|
15.0 / 16.0 + HALFSTEP * 1, 7.0 / 16.0 + HALFSTEP * 1, 13.0 / 16.0 + HALFSTEP * 1, 5.0 / 16.0 + HALFSTEP * 1,
|
||||||
15.0 / 16.0 + halfstep * 3, 7.0 / 16.0 + halfstep * 3, 13.0 / 16.0 + halfstep * 3, 5.0 / 16.0 + halfstep * 3,
|
15.0 / 16.0 + HALFSTEP * 3, 7.0 / 16.0 + HALFSTEP * 3, 13.0 / 16.0 + HALFSTEP * 3, 5.0 / 16.0 + HALFSTEP * 3,
|
||||||
0.0 / 16.0 + halfstep * 4, 8.0 / 16.0 + halfstep * 4, 2.0 / 16.0 + halfstep * 4, 10.0 / 16.0 + halfstep * 4,
|
0.0 / 16.0 + HALFSTEP * 4, 8.0 / 16.0 + HALFSTEP * 4, 2.0 / 16.0 + HALFSTEP * 4, 10.0 / 16.0 + HALFSTEP * 4,
|
||||||
0.0 / 16.0 + halfstep * 2, 8.0 / 16.0 + halfstep * 2, 2.0 / 16.0 + halfstep * 2, 10.0 / 16.0 + halfstep * 2,
|
0.0 / 16.0 + HALFSTEP * 2, 8.0 / 16.0 + HALFSTEP * 2, 2.0 / 16.0 + HALFSTEP * 2, 10.0 / 16.0 + HALFSTEP * 2,
|
||||||
12.0 / 16.0 + halfstep * 4, 4.0 / 16.0 + halfstep * 4, 14.0 / 16.0 + halfstep * 4, 6.0 / 16.0 + halfstep * 4,
|
12.0 / 16.0 + HALFSTEP * 4, 4.0 / 16.0 + HALFSTEP * 4, 14.0 / 16.0 + HALFSTEP * 4, 6.0 / 16.0 + HALFSTEP * 4,
|
||||||
12.0 / 16.0 + halfstep * 2, 4.0 / 16.0 + halfstep * 2, 14.0 / 16.0 + halfstep * 2, 6.0 / 16.0 + halfstep * 2,
|
12.0 / 16.0 + HALFSTEP * 2, 4.0 / 16.0 + HALFSTEP * 2, 14.0 / 16.0 + HALFSTEP * 2, 6.0 / 16.0 + HALFSTEP * 2,
|
||||||
3.0 / 16.0 + halfstep * 4, 11.0 / 16.0 + halfstep * 4, 1.0 / 16.0 + halfstep * 4, 9.0 / 16.0 + halfstep * 4,
|
3.0 / 16.0 + HALFSTEP * 4, 11.0 / 16.0 + HALFSTEP * 4, 1.0 / 16.0 + HALFSTEP * 4, 9.0 / 16.0 + HALFSTEP * 4,
|
||||||
3.0 / 16.0 + halfstep * 2, 11.0 / 16.0 + halfstep * 2, 1.0 / 16.0 + halfstep * 2, 9.0 / 16.0 + halfstep * 2,
|
3.0 / 16.0 + HALFSTEP * 2, 11.0 / 16.0 + HALFSTEP * 2, 1.0 / 16.0 + HALFSTEP * 2, 9.0 / 16.0 + HALFSTEP * 2,
|
||||||
15.0 / 16.0 + halfstep * 4, 7.0 / 16.0 + halfstep * 4, 13.0 / 16.0 + halfstep * 4, 5.0 / 16.0 + halfstep * 4,
|
15.0 / 16.0 + HALFSTEP * 4, 7.0 / 16.0 + HALFSTEP * 4, 13.0 / 16.0 + HALFSTEP * 4, 5.0 / 16.0 + HALFSTEP * 4,
|
||||||
15.0 / 16.0 + halfstep * 2, 7.0 / 16.0 + halfstep * 2, 13.0 / 16.0 + halfstep * 2, 5.0 / 16.0 + halfstep * 2
|
15.0 / 16.0 + HALFSTEP * 2, 7.0 / 16.0 + HALFSTEP * 2, 13.0 / 16.0 + HALFSTEP * 2, 5.0 / 16.0 + HALFSTEP * 2
|
||||||
);
|
);
|
||||||
|
|
||||||
vec4 Dither(vec4 c, float colorscale)
|
vec4 Dither(vec4 c, float colorscale)
|
||||||
|
|
Loading…
Reference in a new issue