Fix alpha blending for SW transform
This commit is contained in:
parent
79c9c29251
commit
4e683911c7
1 changed files with 6 additions and 6 deletions
|
@ -384,9 +384,9 @@ void TransformDrawEngine::SoftwareTransformAndDraw(
|
|||
c1[j] = 0.0f;
|
||||
}
|
||||
} else {
|
||||
c0[0] = ((gstate.materialambient >> 16) & 0xFF) / 255.f;
|
||||
c0[0] = (gstate.materialambient & 0xFF) / 255.f;
|
||||
c0[1] = ((gstate.materialambient >> 8) & 0xFF) / 255.f;
|
||||
c0[2] = (gstate.materialambient & 0xFF) / 255.f;
|
||||
c0[2] = ((gstate.materialambient >> 16) & 0xFF) / 255.f;
|
||||
c0[3] = (gstate.materialalpha & 0xFF) / 255.f;
|
||||
}
|
||||
|
||||
|
@ -443,9 +443,9 @@ void TransformDrawEngine::SoftwareTransformAndDraw(
|
|||
if (reader.hasColor0()) {
|
||||
reader.ReadColor0(unlitColor);
|
||||
} else {
|
||||
unlitColor[0] = ((gstate.materialambient >> 16) & 0xFF) / 255.f;
|
||||
unlitColor[0] = (gstate.materialambient & 0xFF) / 255.f;
|
||||
unlitColor[1] = ((gstate.materialambient >> 8) & 0xFF) / 255.f;
|
||||
unlitColor[2] = (gstate.materialambient & 0xFF) / 255.f;
|
||||
unlitColor[2] = ((gstate.materialambient >> 16) & 0xFF) / 255.f;
|
||||
unlitColor[3] = (gstate.materialalpha & 0xFF) / 255.f;
|
||||
}
|
||||
float litColor0[4];
|
||||
|
@ -474,8 +474,8 @@ void TransformDrawEngine::SoftwareTransformAndDraw(
|
|||
c1[j] = 0.0f;
|
||||
}
|
||||
} else {
|
||||
c0[0] = ((gstate.materialambient >> 16) & 0xFF) / 255.f;
|
||||
c0[1] = ((gstate.materialambient >> 8) & 0xFF) / 255.f;
|
||||
c0[0] = ((gstate.materialambient >> 8) & 0xFF) / 255.f;
|
||||
c0[1] = (gstate.materialambient & 0xFF) / 255.f;
|
||||
c0[2] = (gstate.materialambient & 0xFF) / 255.f;
|
||||
c0[3] = (gstate.materialalpha & 0xFF) / 255.f;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue