mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-09-11 21:27:20 +03:00
shaders: minor premultiplication fixes
This commit is contained in:
parent
37a211a2ae
commit
3d9545d2e0
@ -109,11 +109,14 @@ void main() {
|
||||
discard;
|
||||
}
|
||||
|
||||
if (pixColor[3] == 0.0)
|
||||
if (additionalAlpha == 0.0)
|
||||
discard;
|
||||
|
||||
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
|
||||
pixColor[0] *= pixColor[3];
|
||||
pixColor[1] *= pixColor[3];
|
||||
pixColor[2] *= pixColor[3];
|
||||
pixColor.rgb *= pixColor[3];
|
||||
|
||||
gl_FragColor = pixColor;
|
||||
})#";
|
||||
|
Loading…
Reference in New Issue
Block a user