Skip to content

Commit

Permalink
shaders: fix texture uniforms for NV12 rendering.
Browse files Browse the repository at this point in the history
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
  • Loading branch information
gbeauchesne committed Aug 17, 2012
1 parent e6e434f commit 421a543
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions xbmc/cores/VideoRenderers/VideoShaders/YUV2RGBShader.cpp
Expand Up @@ -261,8 +261,18 @@ bool BaseYUV2RGBGLSLShader::OnEnabled()
{
// set shader attributes once enabled
glUniform1i(m_hYTex, 0);
glUniform1i(m_hUTex, 1);
glUniform1i(m_hVTex, 2);
switch (m_format)
{
//case RENDER_FMT_NV12:
case RENDER_FMT_Y_UV:
glUniform1i(m_hUTex, 1);
glUniform1i(m_hVTex, 1);
break;
default:
glUniform1i(m_hUTex, 1);
glUniform1i(m_hVTex, 2);
break;
}
glUniform1f(m_hStretch, m_stretch);
glUniform2f(m_hStep, 1.0 / m_width, 1.0 / m_height);

Expand Down

0 comments on commit 421a543

Please sign in to comment.