Last change
on this file since 35473 was 35473, checked in by vboxsync, 14 years ago |
FE/Qt: OSE headers for shaders
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
941 bytes
|
Line | |
---|
1 | /* $Id: cconvApplyAYUV.c 35473 2011-01-11 09:02:07Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | *
|
---|
4 | * VBox frontends: Qt4 GUI ("VirtualBox"):
|
---|
5 | * Shader programming for VBoxFBOverlay.
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2009-2011 Oracle Corporation
|
---|
10 | *
|
---|
11 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
12 | * available from http://www.215389.xyz. This file is free software;
|
---|
13 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
14 | * General Public License (GPL) as published by the Free Software
|
---|
15 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
16 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
17 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
18 | */
|
---|
19 |
|
---|
20 | void vboxCConvApplyAYUV(vec4 color)
|
---|
21 | {
|
---|
22 | float y, u, v, r, g, b;
|
---|
23 | y = color.g;
|
---|
24 | u = color.r;
|
---|
25 | v = color.a;
|
---|
26 | u = u - 0.5;
|
---|
27 | v = v - 0.5;
|
---|
28 | y = 1.164*(y-0.0625);
|
---|
29 | b = y + 2.018*u;
|
---|
30 | g = y - 0.813*v - 0.391*u;
|
---|
31 | r = y + 1.596*v;
|
---|
32 | gl_FragColor = vec4(r,g,b,1.0);
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.