mirror of https://github.com/PCSX2/pcsx2.git
GS/HW: Don't drop fractional colour before modulating
Fixes banding in Xenosaga, Tales of the Abyss, Beyond Good and Evil.
This commit is contained in:
parent
df32a32d99
commit
784118e9c1
|
@ -661,7 +661,7 @@ float4 sample_color(float2 st, float uv_w)
|
||||||
float4 tfx(float4 T, float4 C)
|
float4 tfx(float4 T, float4 C)
|
||||||
{
|
{
|
||||||
float4 C_out;
|
float4 C_out;
|
||||||
float4 FxT = trunc(trunc(C) * T / 128.0f);
|
float4 FxT = trunc((C * T) / 128.0f);
|
||||||
|
|
||||||
#if (PS_TFX == 0)
|
#if (PS_TFX == 0)
|
||||||
C_out = FxT;
|
C_out = FxT;
|
||||||
|
|
|
@ -614,7 +614,7 @@ vec4 sample_color(vec2 st)
|
||||||
vec4 tfx(vec4 T, vec4 C)
|
vec4 tfx(vec4 T, vec4 C)
|
||||||
{
|
{
|
||||||
vec4 C_out;
|
vec4 C_out;
|
||||||
vec4 FxT = trunc(trunc(C) * T / 128.0f);
|
vec4 FxT = trunc((C * T) / 128.0f);
|
||||||
|
|
||||||
#if (PS_TFX == 0)
|
#if (PS_TFX == 0)
|
||||||
C_out = FxT;
|
C_out = FxT;
|
||||||
|
|
|
@ -849,7 +849,7 @@ vec4 sample_color(vec2 st)
|
||||||
vec4 tfx(vec4 T, vec4 C)
|
vec4 tfx(vec4 T, vec4 C)
|
||||||
{
|
{
|
||||||
vec4 C_out;
|
vec4 C_out;
|
||||||
vec4 FxT = trunc(trunc(C) * T / 128.0f);
|
vec4 FxT = trunc((C * T) / 128.0f);
|
||||||
|
|
||||||
#if (PS_TFX == 0)
|
#if (PS_TFX == 0)
|
||||||
C_out = FxT;
|
C_out = FxT;
|
||||||
|
|
|
@ -730,7 +730,7 @@ struct PSMain
|
||||||
float4 tfx(float4 T, float4 C)
|
float4 tfx(float4 T, float4 C)
|
||||||
{
|
{
|
||||||
float4 C_out;
|
float4 C_out;
|
||||||
float4 FxT = trunc(trunc(C) * T / 128.f);
|
float4 FxT = trunc((C * T) / 128.f);
|
||||||
if (PS_TFX == 0)
|
if (PS_TFX == 0)
|
||||||
C_out = FxT;
|
C_out = FxT;
|
||||||
else if (PS_TFX == 1)
|
else if (PS_TFX == 1)
|
||||||
|
|
|
@ -15,4 +15,4 @@
|
||||||
|
|
||||||
/// Version number for GS and other shaders. Increment whenever any of the contents of the
|
/// Version number for GS and other shaders. Increment whenever any of the contents of the
|
||||||
/// shaders change, to invalidate the cache.
|
/// shaders change, to invalidate the cache.
|
||||||
static constexpr u32 SHADER_CACHE_VERSION = 28;
|
static constexpr u32 SHADER_CACHE_VERSION = 29;
|
||||||
|
|
Loading…
Reference in New Issue