mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 09:49:47 +01:00
shaders: minor premultiplication fixes
This commit is contained in:
parent
37a211a2ae
commit
3d9545d2e0
2 changed files with 6 additions and 5 deletions
|
@ -109,11 +109,14 @@ void main() {
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pixColor[3] == 0.0)
|
if (additionalAlpha == 0.0)
|
||||||
discard;
|
discard;
|
||||||
|
|
||||||
pixColor = getColorForCoord(v_texcoord);
|
pixColor = getColorForCoord(v_texcoord);
|
||||||
|
pixColor.rgb *= pixColor[3];
|
||||||
|
|
||||||
gl_FragColor = pixColor * alpha * additionalAlpha;
|
pixColor *= alpha * additionalAlpha;
|
||||||
|
|
||||||
|
gl_FragColor = pixColor;
|
||||||
}
|
}
|
||||||
)#";
|
)#";
|
||||||
|
|
|
@ -79,9 +79,7 @@ void main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// premultiply
|
// premultiply
|
||||||
pixColor[0] *= pixColor[3];
|
pixColor.rgb *= pixColor[3];
|
||||||
pixColor[1] *= pixColor[3];
|
|
||||||
pixColor[2] *= pixColor[3];
|
|
||||||
|
|
||||||
gl_FragColor = pixColor;
|
gl_FragColor = pixColor;
|
||||||
})#";
|
})#";
|
||||||
|
|
Loading…
Reference in a new issue