cconvAYUV.c revision 3e1c4447f9ae4b44caf72d405973bd68e34a21d1
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsync/* $Id$ */
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync/** @file
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync *
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * VBox frontends: Qt4 GUI ("VirtualBox"):
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * Shader programming for VBoxFBOverlay.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync */
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync/*
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * Copyright (C) 2009-2011 Oracle Corporation
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync *
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * available from http://www.virtualbox.org. This file is free software;
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * you can redistribute it and/or modify it under the terms of the GNU
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * General Public License (GPL) as published by the Free Software
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsync */
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsync
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsync#extension GL_ARB_texture_rectangle : enable
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsyncuniform sampler2DRect uSrcTex;
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsyncvoid vboxCConvApplyAYUV(vec4 color);
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsyncvoid vboxCConv()
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsync{
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsync vec2 srcCoord = vec2(gl_TexCoord[0]);
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsync vec4 color = texture2DRect(uSrcTex, srcCoord);
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsync vboxCConvApplyAYUV(color);
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsync}
bf6d370b96e7b57cb924ef5f6e5839dbe3a4b9ffvboxsync