Don't skip lights that are being used for shade mapping when generating vertex shader IDs

This commit is contained in:
Henrik Rydgard committed 2015-10-14 18:01:40 +02:00
1 parent f4d50feacb
commit 09cc80f413
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -58,7 +58,7 @@ struct ShaderID {
return true;
}
int Bit(int bit) const {
bool Bit(int bit) const {
return (d[bit >> 5] >> (bit & 31)) & 1;
}
// Does not handle crossing 32-bit boundaries
+1 -1
View File
@@ -140,7 +140,7 @@ void ComputeVertexShaderID(ShaderID *id_out, u32 vertType, bool useHWTransform)
if (gstate.isLightingEnabled() || doShadeMapping) {
// Light bits
for (int i = 0; i < 4; i++) {
if (gstate.isLightChanEnabled(i)) {
if (gstate.isLightChanEnabled(i) || (doShadeMapping && (gstate.getUVLS0() == i || gstate.getUVLS1() == i))) {
id.SetBits(BIT_LIGHT0_COMP + 4 * i, 2, gstate.getLightComputation(i));
id.SetBits(BIT_LIGHT0_TYPE + 4 * i, 2, gstate.getLightType(i));
}