Tweak the dither math.
This commit is contained in:
parent
a0521259a7
commit
05b33078fb
5 changed files with 12 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue