Tweak the dither math.

This commit is contained in:
Marisa the Magician 2023-02-26 18:03:11 +01:00
commit 05b33078fb
5 changed files with 12 additions and 6 deletions

View file

@ -35,8 +35,8 @@ void main()
float dth = texelFetch(DitherTexture,dcoord,0).x*.9375+.03125;
vec3 thr = vec3(step(dth,cf.r),step(dth,cf.g),step(dth,cf.b));
res.rgb = mix(cl,ch,thr);
vec3 lc = clamp(floor(res.rgb*64.),0.,63.);
ivec2 lcoord = ivec2(lc.r,lc.g+lc.b*64);
vec3 lc = clamp(floor(res.rgb*63.),0.,63.);
ivec2 lcoord = ivec2(int(lc.r),int(lc.g)+int(lc.b)*64);
lcoord.x += 64*palnum;
res.rgb = texelFetch(PalLUTTexture,lcoord,0).rgb;
FragColor = res;