Fixed too bright Bink decoding in HDR mode

This commit is contained in:
Robert Beckebans 2018-10-13 19:46:31 +02:00
parent 0d58f44f30
commit b8ffe6f6c0
2 changed files with 17 additions and 4 deletions

View file

@ -54,7 +54,10 @@ void main( PS_IN fragment, out PS_OUT result ) {
float3 p = ( YScalar * Y );
p += ( crc * Cr ) + ( crb * Cb ) + adj;
result.color.xyz = p;
result.color.w = 1.0;
result.color *= rpColor;
float4 color;
color.xyz = p;
color.w = 1.0;
color *= rpColor;
result.color = sRGBAToLinearRGBA( color );
}

View file

@ -576,12 +576,22 @@ void idRenderBackend::BindVariableStageImage( const textureStage_t* texture, con
{
GL_SelectTexture( 0 );
cin.imageY->Bind();
GL_SelectTexture( 1 );
cin.imageCr->Bind();
GL_SelectTexture( 2 );
cin.imageCb->Bind();
// DG: imageY is only used for bink videos (with libbinkdec), so the bink shader must be used
renderProgManager.BindShader_Bink();
if( viewDef->is2Dgui )
{
renderProgManager.BindShader_BinkGUI();
}
else
{
renderProgManager.BindShader_Bink();
}
}
else if( cin.image != NULL )
{