diff options
author | AlTheKiller <AlTheKiller@svn> | 2009-09-23 01:49:50 +0000 |
---|---|---|
committer | AlTheKiller <AlTheKiller@svn> | 2009-09-23 01:49:50 +0000 |
commit | 45285e8a9300cd754a760560640b75b09f98035e (patch) | |
tree | ad9f093885ad5c98e9dd4156674e7691c22ed0a2 /system/shaders/yuv2rgb_basic.glsl |
step 3/4: Move linuxport to trunk. How'd I get roped into this?
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@23097 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'system/shaders/yuv2rgb_basic.glsl')
-rw-r--r-- | system/shaders/yuv2rgb_basic.glsl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/system/shaders/yuv2rgb_basic.glsl b/system/shaders/yuv2rgb_basic.glsl new file mode 100644 index 0000000000..49fdf633a5 --- /dev/null +++ b/system/shaders/yuv2rgb_basic.glsl @@ -0,0 +1,28 @@ +#if(XBMC_texture_rectangle) +# extension GL_ARB_texture_rectangle : enable +# define texture2D texture2DRect +# define sampler2D sampler2DRect +#endif + +uniform sampler2D m_sampY; +uniform sampler2D m_sampU; +uniform sampler2D m_sampV; +varying vec2 m_cordY; +varying vec2 m_cordU; +varying vec2 m_cordV; + +uniform mat4 m_yuvmat; + + +void main() +{ + vec4 yuv, rgb; + yuv.rgba = vec4( texture2D(m_sampY, m_cordY).r + , texture2D(m_sampU, m_cordU).r + , texture2D(m_sampV, m_cordV).r + , 1.0 ); + + rgb = m_yuvmat * yuv; + rgb.a = gl_Color.a; + gl_FragColor = rgb; +} |