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

@ -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;
}