|
Last change
on this file since 1168 was 561, checked in by Dmitry A. Kuminov, 16 years ago |
|
trunk: Merged in qt 4.6.1 sources.
|
|
File size:
462 bytes
|
| Line | |
|---|
| 1 | uniform vec2 porterduff_ab;
|
|---|
| 2 | uniform vec3 porterduff_xyz;
|
|---|
| 3 |
|
|---|
| 4 | vec4 composite(vec4 src, vec4 dst)
|
|---|
| 5 | {
|
|---|
| 6 | vec4 result;
|
|---|
| 7 |
|
|---|
| 8 | result.xyz = porterduff_ab.x * src.xyz * dst.a
|
|---|
| 9 | + porterduff_ab.y * dst.xyz * src.a
|
|---|
| 10 | + porterduff_xyz.y * src.xyz * (1.0 - dst.a)
|
|---|
| 11 | + porterduff_xyz.z * dst.xyz * (1.0 - src.a);
|
|---|
| 12 |
|
|---|
| 13 | result.a = dot(porterduff_xyz, vec3(src.a * dst.a, src.a * (1.0 - dst.a), dst.a * (1.0 - src.a)));
|
|---|
| 14 |
|
|---|
| 15 | return result;
|
|---|
| 16 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.