Last change
on this file since 24377 was 23564, checked in by vboxsync, 15 years ago |
video hw accel: fix scaling issue
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
824 bytes
|
Line | |
---|
1 | #extension GL_ARB_texture_rectangle : enable
|
---|
2 | uniform sampler2DRect uSrcTex;
|
---|
3 | uniform sampler2DRect uVTex;
|
---|
4 | uniform sampler2DRect uUTex;
|
---|
5 | float vboxSplitBGRA(vec4 color, float coord);
|
---|
6 | void vboxCConvApplyAYUV(vec4 color);
|
---|
7 | void vboxCConv()
|
---|
8 | {
|
---|
9 | vec2 clrCoordY = vec2(gl_TexCoord[0]);
|
---|
10 | vec2 clrCoordV = vec2(gl_TexCoord[1]);
|
---|
11 | int ix = int(clrCoordY.x);
|
---|
12 | vec2 coordY = vec2(float(ix), clrCoordY.y);
|
---|
13 | ix = int(clrCoordV.x);
|
---|
14 | vec2 coordV = vec2(float(ix), clrCoordV.y);
|
---|
15 | vec4 clrY = texture2DRect(uSrcTex, vec2(coordY));
|
---|
16 | vec4 clrV = texture2DRect(uVTex, vec2(coordV));
|
---|
17 | vec4 clrU = texture2DRect(uUTex, vec2(coordV));
|
---|
18 | float y = vboxSplitBGRA(clrY, clrCoordY.x);
|
---|
19 | float v = vboxSplitBGRA(clrV, clrCoordV.x);
|
---|
20 | float u = vboxSplitBGRA(clrU, clrCoordV.x);
|
---|
21 | vboxCConvApplyAYUV(vec4(u, y, 0.0, v));
|
---|
22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.