VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/shaders/cconvUYVY.c@ 62281

最後變更 在這個檔案從62281是 55401,由 vboxsync 提交於 10 年 前

added a couple of missing Id headers

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id Revision
檔案大小: 541 位元組
 
1/* $Id: cconvUYVY.c 55401 2015-04-23 10:03:17Z 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.b;
12 float v = srcClr.r;
13 float part = x - float(pix);
14 float y;
15 if(part < 0.5)
16 {
17 y = srcClr.g;
18 }
19 else
20 {
21 y = srcClr.a;
22 }
23 vboxCConvApplyAYUV(vec4(u, y, 0.0, v));
24}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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