OLD | NEW |
1 uniform float imageHeight; | 1 uniform float imageHeight; |
2 | 2 |
3 attribute vec4 c; | 3 attribute vec4 c; |
4 | 4 |
5 #define I915_WORKAROUND 1 | 5 #define I915_WORKAROUND 1 |
6 | 6 |
7 varying vec2 lineCounter; | 7 varying vec2 lineCounter; |
8 varying vec2 yPlane; | 8 varying vec2 yPlane; |
9 varying vec2 uPlane; | 9 varying vec2 uPlane; |
10 varying vec2 vPlane; | 10 varying vec2 vPlane; |
11 | 11 |
12 void main() { | 12 void main() { |
13 gl_Position = c; | 13 gl_Position = c; |
14 #if I915_WORKAROUND | 14 #if I915_WORKAROUND |
15 gl_TexCoord[0].xy = vec2(c.y * imageHeight / 4.0, 0.0); | 15 gl_TexCoord[0].xy = vec2(c.y * imageHeight / 4.0, 0.0); |
16 gl_TexCoord[0].zw = vec2(c.x, (2.0 * c.y + 1.0) / 3.0); | 16 gl_TexCoord[0].zw = vec2(c.x, (2.0 * c.y + 1.0) / 3.0); |
17 gl_TexCoord[1].xy = vec2(c.x / 2.0, (c.y + 1.0) / 6.0); | 17 gl_TexCoord[1].xy = vec2(c.x / 2.0, (c.y + 1.0) / 6.0); |
18 gl_TexCoord[1].zw = vec2(c.x / 2.0, c.y / 6.0); | 18 gl_TexCoord[1].zw = vec2(c.x / 2.0, c.y / 6.0); |
19 #else | 19 #else |
20 lineCounter = vec2(c.y * imageHeight / 4.0, 0.0); | 20 lineCounter = vec2(c.y * imageHeight / 4.0, 0.0); |
21 yPlane = vec2(c.x, (2.0 * c.y + 1.0) / 3.0); | 21 yPlane = vec2(c.x, (2.0 * c.y + 1.0) / 3.0); |
22 uPlane = vec2(c.x / 2.0, (c.y + 1.0) / 6.0); | 22 uPlane = vec2(c.x / 2.0, (c.y + 1.0) / 6.0); |
23 vPlane = vec2(c.x / 2.0, c.y / 6.0); | 23 vPlane = vec2(c.x / 2.0, c.y / 6.0); |
24 #endif | 24 #endif |
25 } | 25 } |
26 | 26 |
OLD | NEW |