mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Fixed too bright Bink decoding in HDR mode
This commit is contained in:
parent
0d58f44f30
commit
b8ffe6f6c0
2 changed files with 17 additions and 4 deletions
|
@ -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 );
|
||||
}
|
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue