OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010, Google Inc. | 2 * Copyright 2010, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 * [0,1] to [-.5,.5] as part of the transform. | 72 * [0,1] to [-.5,.5] as part of the transform. |
73 */ | 73 */ |
74 vec4 channels = vec4(yChannel, uChannel, vChannel, 1.0); | 74 vec4 channels = vec4(yChannel, uChannel, vChannel, 1.0); |
75 mat4 conversion = mat4( 1.0, 1.0, 1.0, 0.0, | 75 mat4 conversion = mat4( 1.0, 1.0, 1.0, 0.0, |
76 0.0, -0.344, 1.772, 0.0, | 76 0.0, -0.344, 1.772, 0.0, |
77 1.402, -0.714, 0.0, 0.0, | 77 1.402, -0.714, 0.0, 0.0, |
78 -0.701, 0.529, -0.886, 1.0); | 78 -0.701, 0.529, -0.886, 1.0); |
79 | 79 |
80 gl_FragColor = conversion * channels; | 80 gl_FragColor = conversion * channels; |
81 } | 81 } |
OLD | NEW |