VirtualBox

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

Last change on this file since 82784 was 71027, checked in by vboxsync, 7 years ago

FE/Qt: big svn props cleanup

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 541 bytes
Line 
1/* $Id: cconvYUY2.c 71027 2018-02-15 14:33:48Z vboxsync $ */
2#extension GL_ARB_texture_rectangle : enable
3uniform sampler2DRect uSrcTex;
4void vboxCConvApplyAYUV(vec4 color);
5void vboxCConv()
6{
7 vec2 srcCoord = vec2(gl_TexCoord[0]);
8 float x = srcCoord.x;
9 int pix = int(x);
10 vec4 srcClr = texture2DRect(uSrcTex, vec2(float(pix), srcCoord.y));
11 float u = srcClr.g;
12 float v = srcClr.a;
13 float part = x - float(pix);
14 float y;
15 if(part < 0.5)
16 {
17 y = srcClr.b;
18 }
19 else
20 {
21 y = srcClr.r;
22 }
23 vboxCConvApplyAYUV(vec4(u, y, 0.0, v));
24}
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