mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #391 from raven02/master
Fix alpha blending for HW & SW transform
This commit is contained in:
commit
c484c5ebb4
2 changed files with 7 additions and 7 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;
|
||||
}
|
||||
|
|
|
@ -338,7 +338,7 @@ void GenerateVertexShader(int prim, char *buffer) {
|
|||
if (hasColor) {
|
||||
WRITE(p, " v_color0 = a_color0;\n");
|
||||
} else {
|
||||
WRITE(p, " v_color0 = u_matambientalpha;\n");
|
||||
WRITE(p, " v_color0 += vec4(u_matambientalpha.rgb, 0.0);\n");
|
||||
}
|
||||
if (lmode)
|
||||
WRITE(p, " v_color1 = vec3(0.0, 0.0, 0.0);\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue