Merge pull request #2476 from yuriks/shader-refactor3

Oh No! More shader changes!
This commit is contained in:
Yuri Kunde Schlesner 2017-02-04 13:02:48 -08:00 committed by GitHub
commit 97e06b0a0d
20 changed files with 184 additions and 180 deletions

View file

@ -467,7 +467,7 @@ void RasterizerOpenGL::NotifyPicaRegisterChanged(u32 id) {
// Fragment lighting switches
case PICA_REG_INDEX(lighting.disable):
case PICA_REG_INDEX(lighting.num_lights):
case PICA_REG_INDEX(lighting.max_light_index):
case PICA_REG_INDEX(lighting.config0):
case PICA_REG_INDEX(lighting.config1):
case PICA_REG_INDEX(lighting.abs_lut_input):

View file

@ -84,7 +84,7 @@ union PicaShaderConfig {
// Fragment lighting
state.lighting.enable = !regs.lighting.disable;
state.lighting.src_num = regs.lighting.num_lights + 1;
state.lighting.src_num = regs.lighting.max_light_index + 1;
for (unsigned light_index = 0; light_index < state.lighting.src_num; ++light_index) {
unsigned num = regs.lighting.light_enable.GetNum(light_index);