Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • KWin KWin
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 58
    • Issues 58
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 151
    • Merge requests 151
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PlasmaPlasma
  • KWinKWin
  • Merge requests
  • !1150

feat: frost mode for contrast shaders

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Jan Blackquill requested to merge work/janb/frost into master Jul 06, 2021
  • Overview 38
  • Commits 3
  • Pipelines 0
  • Changes 7

This implements an improved contrast effect that uses some colour arithmetic shenanigans that provides something that's simultaneously more opaque and more transparent, much in the same way Apple products can be impossibly shiny without the screens reflecting your entire workspace at you.

In more details, this uses colour dodge on the area behind a window w/ contrast rather than the usual alpha blend. This colour blending technique results in a sort of balance between the following rules:

  • ligher background -> weaker effect and darker background -> stronger effect
  • lighter foreground -> stronger effect and darker background -> weaker effect

This allows more "intelligent" selection on how to adjust colours, resulting in an effect that simultaneously has better text contrast while allowing the background to seem more transparent to appeal to our graphic designers that obsess over blur + transparency.

Marked as draft because needs client<->server glue code all over the place for X11 and Wayland that I haven't implemented + integration into Plasma & other places that might use the contrast effect. For now, hardcoded to always use frost effect with #121212 at 40% opacity.

Edited Jul 08, 2021 by Jan Blackquill
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/janb/frost