mirror of https://github.com/PCSX2/pcsx2.git
GSdx-DX: Modified shader slightly as some bits were incorrect.
This commit is contained in:
parent
7ee3dbd615
commit
af09d7e063
|
@ -714,32 +714,37 @@ PS_OUTPUT ps_main(PS_INPUT input)
|
|||
|
||||
PS_OUTPUT output;
|
||||
|
||||
#if PS_SHUFFLE
|
||||
int4 denorm_c = int4(c * 255.0f + 0.5f);
|
||||
int2 denorm_TA = int2(int2(TA.xy) * 255.0f + 0.5f);
|
||||
if (PS_SHUFFLE){
|
||||
uint4 denorm_c = uint4(c * 255.0f + 0.5f);
|
||||
uint2 denorm_TA = uint2(float2(TA.xy) * 255.0f + 0.5f);
|
||||
|
||||
// Mask will take care of the correct destination
|
||||
#if PS_READ_BA
|
||||
c.rb = c.bb;
|
||||
#else
|
||||
c.rb = c.rr;
|
||||
#endif
|
||||
|
||||
#if PS_READ_BA
|
||||
if (denorm_c.a & 0x80)
|
||||
c.ga = int2(float((denorm_c.a & 0x7Fu) | (denorm_TA.y & 0x80u)) / 255.0f);
|
||||
else
|
||||
c.ga = int2(float((denorm_c.a & 0x7Fu) | (denorm_TA.x & 0x80u)) / 255.0f);
|
||||
#else
|
||||
if (denorm_c.g & 0x80)
|
||||
c.a = float((denorm_c.g & 0x7Fu) | (denorm_TA.y & 0x80u)) / 255.0f;
|
||||
else
|
||||
c.a = float((denorm_c.g & 0x7Fu) | (denorm_TA.x & 0x80u)) / 255.0f;
|
||||
#endif
|
||||
//Probably not right :/
|
||||
c.g = c.b;
|
||||
|
||||
#endif
|
||||
// Mask will take care of the correct destination
|
||||
if (PS_READ_BA){
|
||||
c.rb = c.bb;
|
||||
}
|
||||
else {
|
||||
c.rb = c.rr;
|
||||
}
|
||||
c.g = c.a;
|
||||
if (PS_READ_BA){
|
||||
if (denorm_c.a & 0x80)
|
||||
c.a = float((denorm_c.a & 0x7Fu) | (denorm_TA.y & 0x80u)) / 255.0f;
|
||||
else
|
||||
c.a = float((denorm_c.a & 0x7Fu) | (denorm_TA.x & 0x80u)) / 255.0f;
|
||||
|
||||
//c.g = c.a;
|
||||
}
|
||||
else {
|
||||
if (denorm_c.g & 0x80)
|
||||
c.a = float((denorm_c.g & 0x7Fu) | (denorm_TA.y & 0x80u)) / 255.0f;
|
||||
else
|
||||
c.a = float((denorm_c.g & 0x7Fu) | (denorm_TA.x & 0x80u)) / 255.0f;
|
||||
|
||||
//c.g = c.a;
|
||||
}
|
||||
//Probably not right :/
|
||||
//c.g = c.b;
|
||||
}
|
||||
|
||||
output.c1 = c.a * 2; // used for alpha blending
|
||||
|
||||
|
|
Loading…
Reference in New Issue