VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/shaders/cconvYUY2.c@ 54440

Last change on this file since 54440 was 35579, checked in by vboxsync, 14 years ago

scm: cleanups and adjustments

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 530 bytes
Line 
1#extension GL_ARB_texture_rectangle : enable
2uniform sampler2DRect uSrcTex;
3void vboxCConvApplyAYUV(vec4 color);
4void vboxCConv()
5{
6 vec2 srcCoord = vec2(gl_TexCoord[0]);
7 float x = srcCoord.x;
8 int pix = int(x);
9 vec4 srcClr = texture2DRect(uSrcTex, vec2(float(pix), srcCoord.y));
10 float u = srcClr.g;
11 float v = srcClr.a;
12 float part = x - float(pix);
13 float y;
14 if(part < 0.5)
15 {
16 y = srcClr.b;
17 }
18 else
19 {
20 y = srcClr.r;
21 }
22 vboxCConvApplyAYUV(vec4(u, y, 0.0, v));
23}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette