Fix animated logo glitching on some GPUs.

This commit is contained in:
Mari the Deer 2021-12-21 22:03:38 +01:00
commit f10b3b0d6d
2 changed files with 4 additions and 4 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r92 \cu(Tue 21 Dec 22:03:30 CET 2021)\c-";
SWWM_SHORTVER="\cw1.2pre r92 \cu(2021-12-21 22:03:30)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r93 \cu(Tue 21 Dec 22:03:38 CET 2021)\c-";
SWWM_SHORTVER="\cw1.2pre r93 \cu(2021-12-21 22:03:38)\c-";

View file

@ -83,12 +83,12 @@ void SetupMaterial( inout Material mat )
base = blacktoalpha(base);
// add alpha of first layer
base.a += BilinearSample(Layer1,uv,size,pxsize).a;
// clamp
base = clamp(base,vec4(0.),vec4(1.));
// sixth layer, alpha blend
tmp = BilinearSample(Layer6,uv,size,pxsize);
tmp2.a = tmp.a+base.a*(1-tmp.a);
tmp2.rgb = (tmp.rgb*tmp.a+base.rgb*base.a*(1-tmp.a))/tmp2.a;
// clamp
tmp2 = clamp(tmp2,vec4(0.),vec4(1.));
// ding, logo's done
mat.Base = tmp2;
}