mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
ColorDouble needs to be in the fragment shader ID
This commit is contained in:
parent
c1a2ee51ab
commit
e3f183bc28
1 changed files with 3 additions and 2 deletions
|
@ -81,10 +81,11 @@ void ComputeFragmentShaderID(FragmentShaderID *id) {
|
||||||
// We only need one clear shader, so let's ignore the rest of the bits.
|
// We only need one clear shader, so let's ignore the rest of the bits.
|
||||||
id->d[0] = 1;
|
id->d[0] = 1;
|
||||||
} else {
|
} else {
|
||||||
|
int lmode = (gstate.lmode & 1) && gstate.isLightingEnabled();
|
||||||
bool enableFog = gstate.isFogEnabled() && !gstate.isModeThrough();
|
bool enableFog = gstate.isFogEnabled() && !gstate.isModeThrough();
|
||||||
bool enableAlphaTest = gstate.isAlphaTestEnabled() && !IsAlphaTestTriviallyTrue();
|
bool enableAlphaTest = gstate.isAlphaTestEnabled() && !IsAlphaTestTriviallyTrue();
|
||||||
bool enableColorTest = gstate.isColorTestEnabled() && !IsColorTestTriviallyTrue();
|
bool enableColorTest = gstate.isColorTestEnabled() && !IsColorTestTriviallyTrue();
|
||||||
int lmode = (gstate.lmode & 1) && gstate.isLightingEnabled();
|
bool enableColorDoubling = (gstate.texfunc & 0x10000) != 0;
|
||||||
bool doTextureProjection = gstate.getUVGenMode() == 1;
|
bool doTextureProjection = gstate.getUVGenMode() == 1;
|
||||||
|
|
||||||
// id->d[0] |= (gstate.clearmode & 1);
|
// id->d[0] |= (gstate.clearmode & 1);
|
||||||
|
@ -103,6 +104,7 @@ void ComputeFragmentShaderID(FragmentShaderID *id) {
|
||||||
id->d[0] |= (gstate.colortest & 0x3) << 13; // color test func
|
id->d[0] |= (gstate.colortest & 0x3) << 13; // color test func
|
||||||
id->d[0] |= (enableFog & 1) << 15;
|
id->d[0] |= (enableFog & 1) << 15;
|
||||||
id->d[0] |= (doTextureProjection & 1) << 16;
|
id->d[0] |= (doTextureProjection & 1) << 16;
|
||||||
|
id->d[0] |= (enableColorDoubling & 1) << 17;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,7 +228,6 @@ void GenerateFragmentShader(char *buffer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enableColorTest) {
|
if (enableColorTest) {
|
||||||
// TODO: There are some colortestmasks we could handle.
|
|
||||||
int colorTestFunc = gstate.colortest & 3;
|
int colorTestFunc = gstate.colortest & 3;
|
||||||
const char *colorTestFuncs[] = { "#", "#", " != ", " == " }; // never/always don't make sense
|
const char *colorTestFuncs[] = { "#", "#", " != ", " == " }; // never/always don't make sense
|
||||||
int colorTestMask = gstate.colormask;
|
int colorTestMask = gstate.colormask;
|
||||||
|
|
Loading…
Add table
Reference in a new issue