~ubuntu-mate-dev/compiz/mate-tweak

« back to all changes in this revision

Viewing changes to plugins/colorfilter/data/filters/negative-green.frag

  • Committer: Bileto Bot
  • Author(s): Colomban Wendling
  • Date: 2017-04-27 06:40:15 UTC
  • mfrom: (4105.6.12 colorfilter)
  • Revision ID: ci-train-bot@canonical.com-20170427064015-m7zpktnfxzr4h1tx
Restore the ColorChooser plugin by porting it to new OpenGL plugin API.

Not actually tested with GLES, but it should likely work as it doesn't use much GL API, and only simple GLSL things.

Approved by: Andrea Azzarone

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
!!ARBfp1.0
2
 
TEMP temp, neg;
3
 
TEX temp, fragment.texcoord[0], texture[0], RECT;
4
 
RCP neg.a, temp.a;
5
 
MAD temp.rgb, -neg.a, temp, 1.0;
6
 
MUL temp.rgb, temp.a, temp;
7
 
MUL temp, fragment.color, temp;
8
 
SUB temp.rb, temp, temp;
9
 
MOV result.color, temp;
10
 
END
 
1
void negative_green_fragment () {
 
2
    gl_FragColor.rgb = vec3(0, 1.0 - gl_FragColor.g, 0);
 
3
}