Bug 322013 - invert effect .frag file modulation bug (patch included, easy fix)
Summary: invert effect .frag file modulation bug (patch included, easy fix)
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: 4.10.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-06 02:06 UTC by Kevin
Modified: 2013-07-08 06:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.11


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin 2013-07-06 02:06:53 UTC
In my
/usr/share/apps/kwin/invert.frag
file, the following two lines
    tex *= modulation;
    tex.rgb = vec3(1.0) - tex.rgb;
should be swapped. They should be
    tex.rgb = vec3(1.0) - tex.rgb;
    tex *= modulation;

The reason why is described below.

Reproducible: Always

Steps to Reproduce:
1. Make two mostly white windows (eg the google website).
2. Turn on the invert effect so that the windows are now mostly black.
3. Put one window on top of the other (so that the other is covered).
4. Now make the window on top ~50% transparent.
Actual Results:  
Due to the bug above, the black windows turn grey...

Expected Results:  
They should be black. A 50% black window on top of a black window should be black.
Comment 1 Martin Flöser 2013-07-08 05:58:29 UTC
Thanks,

if you attach a patch exported with git format-patch I can push it and it will 
keep the authorship.
Comment 2 Kevin 2013-07-08 06:03:33 UTC
I don't know how to do that. I don't think I care about "authorship". I just don't want to apply the fix each time my KDE package updates :) thx!
Comment 3 Martin Flöser 2013-07-08 06:34:50 UTC
Git commit 02e67a261449eb6c5a3342a314a72d85aee7f8f8 by Martin Gräßlin.
Committed on 08/07/2013 at 06:31.
Pushed by graesslin into branch 'master'.

Fix modulation in Invert effect

Thanks to Kevin for spotting and providing a fix.
FIXED-IN: 4.11

M  +1    -1    kwin/effects/invert/data/1.10/invert.frag
M  +1    -1    kwin/effects/invert/data/1.40/invert.frag

http://commits.kde.org/kde-workspace/02e67a261449eb6c5a3342a314a72d85aee7f8f8