mirror of https://github.com/PCSX2/pcsx2.git
GS: Don't do blend_mix on HDR
This commit is contained in:
parent
1b18e02fe0
commit
5447da0588
|
@ -743,7 +743,7 @@ void ps_color_clamp_wrap(inout float3 C)
|
||||||
C = clamp(C, (float3)0.0f, (float3)255.0f);
|
C = clamp(C, (float3)0.0f, (float3)255.0f);
|
||||||
|
|
||||||
// In 16 bits format, only 5 bits of color are used. It impacts shadows computation of Castlevania
|
// In 16 bits format, only 5 bits of color are used. It impacts shadows computation of Castlevania
|
||||||
if (PS_DFMT == FMT_16 && (PS_HDR == 1 || PS_BLEND_MIX == 0))
|
if (PS_DFMT == FMT_16 && PS_BLEND_MIX == 0)
|
||||||
C = (float3)((int3)C & (int3)0xF8);
|
C = (float3)((int3)C & (int3)0xF8);
|
||||||
else if (PS_COLCLIP == 1 && PS_HDR == 0)
|
else if (PS_COLCLIP == 1 && PS_HDR == 0)
|
||||||
C = (float3)((int3)C & (int3)0xFF);
|
C = (float3)((int3)C & (int3)0xFF);
|
||||||
|
|
|
@ -679,7 +679,7 @@ void ps_color_clamp_wrap(inout vec3 C)
|
||||||
// Warning: normally blending equation is mult(A, B) = A * B >> 7. GPU have the full accuracy
|
// Warning: normally blending equation is mult(A, B) = A * B >> 7. GPU have the full accuracy
|
||||||
// GS: Color = 1, Alpha = 255 => output 1
|
// GS: Color = 1, Alpha = 255 => output 1
|
||||||
// GPU: Color = 1/255, Alpha = 255/255 * 255/128 => output 1.9921875
|
// GPU: Color = 1/255, Alpha = 255/255 * 255/128 => output 1.9921875
|
||||||
#if PS_DFMT == FMT_16 && (PS_HDR == 1 || PS_BLEND_MIX == 0)
|
#if PS_DFMT == FMT_16 && PS_BLEND_MIX == 0
|
||||||
// In 16 bits format, only 5 bits of colors are used. It impacts shadows computation of Castlevania
|
// In 16 bits format, only 5 bits of colors are used. It impacts shadows computation of Castlevania
|
||||||
C = vec3(ivec3(C) & ivec3(0xF8));
|
C = vec3(ivec3(C) & ivec3(0xF8));
|
||||||
#elif PS_COLCLIP == 1 && PS_HDR == 0
|
#elif PS_COLCLIP == 1 && PS_HDR == 0
|
||||||
|
|
|
@ -980,7 +980,7 @@ void ps_color_clamp_wrap(inout vec3 C)
|
||||||
// Warning: normally blending equation is mult(A, B) = A * B >> 7. GPU have the full accuracy
|
// Warning: normally blending equation is mult(A, B) = A * B >> 7. GPU have the full accuracy
|
||||||
// GS: Color = 1, Alpha = 255 => output 1
|
// GS: Color = 1, Alpha = 255 => output 1
|
||||||
// GPU: Color = 1/255, Alpha = 255/255 * 255/128 => output 1.9921875
|
// GPU: Color = 1/255, Alpha = 255/255 * 255/128 => output 1.9921875
|
||||||
#if PS_DFMT == FMT_16 && (PS_HDR == 1 || PS_BLEND_MIX == 0)
|
#if PS_DFMT == FMT_16 && PS_BLEND_MIX == 0
|
||||||
// In 16 bits format, only 5 bits of colors are used. It impacts shadows computation of Castlevania
|
// In 16 bits format, only 5 bits of colors are used. It impacts shadows computation of Castlevania
|
||||||
C = vec3(ivec3(C) & ivec3(0xF8));
|
C = vec3(ivec3(C) & ivec3(0xF8));
|
||||||
#elif PS_COLCLIP == 1 && PS_HDR == 0
|
#elif PS_COLCLIP == 1 && PS_HDR == 0
|
||||||
|
|
|
@ -2612,6 +2612,7 @@ void GSRendererHW::EmulateBlending(bool& DATE_PRIMID, bool& DATE_BARRIER, bool&
|
||||||
// A fast algo that requires 2 passes
|
// A fast algo that requires 2 passes
|
||||||
GL_INS("COLCLIP Fast HDR mode ENABLED");
|
GL_INS("COLCLIP Fast HDR mode ENABLED");
|
||||||
m_conf.ps.hdr = 1;
|
m_conf.ps.hdr = 1;
|
||||||
|
blend_mix = false;
|
||||||
sw_blending = true; // Enable sw blending for the HDR algo
|
sw_blending = true; // Enable sw blending for the HDR algo
|
||||||
}
|
}
|
||||||
else if (sw_blending)
|
else if (sw_blending)
|
||||||
|
|
|
@ -708,7 +708,7 @@ struct PSMain
|
||||||
// Warning: normally blending equation is mult(A, B) = A * B >> 7. GPU have the full accuracy
|
// Warning: normally blending equation is mult(A, B) = A * B >> 7. GPU have the full accuracy
|
||||||
// GS: Color = 1, Alpha = 255 => output 1
|
// GS: Color = 1, Alpha = 255 => output 1
|
||||||
// GPU: Color = 1/255, Alpha = 255/255 * 255/128 => output 1.9921875
|
// GPU: Color = 1/255, Alpha = 255/255 * 255/128 => output 1.9921875
|
||||||
if (PS_DFMT == FMT_16 && (PS_HDR || PS_BLEND_MIX == 0))
|
if (PS_DFMT == FMT_16 && PS_BLEND_MIX == 0)
|
||||||
// In 16 bits format, only 5 bits of colors are used. It impacts shadows computation of Castlevania
|
// In 16 bits format, only 5 bits of colors are used. It impacts shadows computation of Castlevania
|
||||||
C.rgb = float3(short3(C.rgb) & 0xF8);
|
C.rgb = float3(short3(C.rgb) & 0xF8);
|
||||||
else if (PS_COLCLIP && !PS_HDR)
|
else if (PS_COLCLIP && !PS_HDR)
|
||||||
|
|
Loading…
Reference in New Issue