~linaro-graphics-wg/compiz-plugins-main/oneiric-gles2

« back to all changes in this revision

Viewing changes to colorfilter/data/filters/deuteranopia

  • Committer: Sam Spilsbury
  • Date: 2011-09-20 07:43:55 UTC
  • Revision ID: sam.spilsbury@canonical.com-20110920074355-puzdutejjwsu3ta2
Sync - Remove Plugins

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
!!ARBfp1.0
2
 
TEMP ab, ci, texv, temp1, temp2;
3
 
TEX texv, fragment.texcoord[0], texture[0], RECT;
4
 
 
5
 
MOV ab, {-0.0615003999429, 0.058589396688,
6
 
          0.0827700165681, -0.0793451999536};
7
 
MOV ci, {-0.01320014122, 0.013289415272,
8
 
          0.57638336864, 0.0};
9
 
 
10
 
POW texv.r, texv.r, {0.4761904, 0, 0, 0}.r;
11
 
POW texv.g, texv.g, {0.5, 0, 0, 0}.r;
12
 
POW texv.b, texv.b, {0.4761904, 0, 0, 0}.r;
13
 
 
14
 
DP3 temp1.r, {0.05059983, 0.08585369, 0.00952420, 0.0}, texv;
15
 
DP3 temp1.g, {0.01893033, 0.08925308, 0.01370054, 0.0}, texv;
16
 
DP3 temp1.b, {0.00292202, 0.00975732, 0.07145979, 0.0}, texv;
17
 
 
18
 
RCP temp2.r, temp1.r;
19
 
MAD temp2.r, temp2.r, temp1.b, -ci.b;
20
 
 
21
 
MUL temp2.g, ab.r, temp1.r;
22
 
MAD temp2.g, ci.r, temp1.b, temp2.g;
23
 
RCP temp2.a, -ab.b;
24
 
MUL temp2.g, temp2.g, temp2.a;
25
 
 
26
 
MUL temp2.b, ab.g, temp1.r;
27
 
MAD temp2.b, ci.g, temp1.b, temp2.b;
28
 
RCP temp2.a, -ab.a;
29
 
MUL temp2.b, temp2.b, temp2.a;
30
 
 
31
 
CMP temp1.g, temp2.r, temp2.g, temp2.b;
32
 
 
33
 
DP3 temp2.r, {30.830854, -29.832659, 1.610474, 0.0}, temp1;
34
 
DP3 temp2.g, {-6.481468, 17.715578, -2.532642, 0.0}, temp1;
35
 
DP3 temp2.b, {-0.375690, -1.199062, 14.273846, 0.0}, temp1;
36
 
 
37
 
POW temp2.r, temp2.r, {2.1, 0, 0, 0}.r;
38
 
POW temp2.g, temp2.g, {2.0, 0, 0, 0}.r;
39
 
POW temp2.b, temp2.b, {2.1, 0, 0, 0}.r;
40
 
 
41
 
MOV temp2.a, texv.a;
42
 
MOV result.color, temp2;
43
 
END