Fix color premultiply and alpha blending
ClosedPublic

Authored by ahiemstra on Mar 13 2020, 1:44 PM.

Details

Summary

This fixes the premultiply function in ShadowedRectangleNode and does not
double-apply alpha blending in the shaders. In addition it fixes the core profile
shaders to actually work. It also makes the shadow offset pixel-correct.

Test Plan

Colors are now correct when compared to a normal rectangle.

Diff Detail

Repository
R169 Kirigami
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ahiemstra created this revision.Mar 13 2020, 1:44 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptMar 13 2020, 1:44 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ahiemstra requested review of this revision.Mar 13 2020, 1:44 PM
mart accepted this revision.Mar 13 2020, 1:49 PM
This revision is now accepted and ready to land.Mar 13 2020, 1:49 PM
ahiemstra updated this revision to Diff 77564.Mar 13 2020, 3:14 PM
  • Revert "Don't premultiply colors"
  • Fix the premultiply function
  • Fix blending, offset positioning and other things of shaders
ahiemstra retitled this revision from Don't premultiply colors to Fix color premultiply and alpha blending.Mar 13 2020, 3:17 PM
ahiemstra edited the summary of this revision. (Show Details)
broulik accepted this revision.Mar 13 2020, 3:20 PM
broulik added a subscriber: broulik.

Qt.color(0,0,0,0.3) now matches between DropShadow layer and the ShadowedRectrangle. Very nice!

mart accepted this revision.Mar 13 2020, 3:22 PM
This revision was automatically updated to reflect the committed changes.