diff options
| author | 2016-05-23 19:09:28 +0200 | |
|---|---|---|
| committer | 2016-05-23 23:28:13 +0200 | |
| commit | 6a28f46844e697b8e33f0ec14fa2fa0938d6a075 (patch) | |
| tree | cb21e713ed5afe8e0dfb4edae76ccc525a77ad59 /src | |
| parent | Pica: Name LightSrc.config register (diff) | |
| download | yuzu-6a28f46844e697b8e33f0ec14fa2fa0938d6a075.tar.gz yuzu-6a28f46844e697b8e33f0ec14fa2fa0938d6a075.tar.xz yuzu-6a28f46844e697b8e33f0ec14fa2fa0938d6a075.zip | |
OpenGL: Set shader_dirty on lighting changes
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index a2a314c6b..931c34a37 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -380,6 +380,17 @@ void RasterizerOpenGL::NotifyPicaRegisterChanged(u32 id) { | |||
| 380 | SyncCombinerColor(); | 380 | SyncCombinerColor(); |
| 381 | break; | 381 | break; |
| 382 | 382 | ||
| 383 | // Fragment lighting switches | ||
| 384 | case PICA_REG_INDEX(lighting.disable): | ||
| 385 | case PICA_REG_INDEX(lighting.num_lights): | ||
| 386 | case PICA_REG_INDEX(lighting.config0): | ||
| 387 | case PICA_REG_INDEX(lighting.config1): | ||
| 388 | case PICA_REG_INDEX(lighting.abs_lut_input): | ||
| 389 | case PICA_REG_INDEX(lighting.lut_input): | ||
| 390 | case PICA_REG_INDEX(lighting.lut_scale): | ||
| 391 | case PICA_REG_INDEX(lighting.light_enable): | ||
| 392 | break; | ||
| 393 | |||
| 383 | // Fragment lighting specular 0 color | 394 | // Fragment lighting specular 0 color |
| 384 | case PICA_REG_INDEX_WORKAROUND(lighting.light[0].specular_0, 0x140 + 0 * 0x10): | 395 | case PICA_REG_INDEX_WORKAROUND(lighting.light[0].specular_0, 0x140 + 0 * 0x10): |
| 385 | SyncLightSpecular0(0); | 396 | SyncLightSpecular0(0); |
| @@ -518,6 +529,18 @@ void RasterizerOpenGL::NotifyPicaRegisterChanged(u32 id) { | |||
| 518 | SyncLightPosition(7); | 529 | SyncLightPosition(7); |
| 519 | break; | 530 | break; |
| 520 | 531 | ||
| 532 | // Fragment lighting light source config | ||
| 533 | case PICA_REG_INDEX_WORKAROUND(lighting.light[0].config, 0x149 + 0 * 0x10): | ||
| 534 | case PICA_REG_INDEX_WORKAROUND(lighting.light[1].config, 0x149 + 1 * 0x10): | ||
| 535 | case PICA_REG_INDEX_WORKAROUND(lighting.light[2].config, 0x149 + 2 * 0x10): | ||
| 536 | case PICA_REG_INDEX_WORKAROUND(lighting.light[3].config, 0x149 + 3 * 0x10): | ||
| 537 | case PICA_REG_INDEX_WORKAROUND(lighting.light[4].config, 0x149 + 4 * 0x10): | ||
| 538 | case PICA_REG_INDEX_WORKAROUND(lighting.light[5].config, 0x149 + 5 * 0x10): | ||
| 539 | case PICA_REG_INDEX_WORKAROUND(lighting.light[6].config, 0x149 + 6 * 0x10): | ||
| 540 | case PICA_REG_INDEX_WORKAROUND(lighting.light[7].config, 0x149 + 7 * 0x10): | ||
| 541 | shader_dirty = true; | ||
| 542 | break; | ||
| 543 | |||
| 521 | // Fragment lighting distance attenuation bias | 544 | // Fragment lighting distance attenuation bias |
| 522 | case PICA_REG_INDEX_WORKAROUND(lighting.light[0].dist_atten_bias, 0x014A + 0 * 0x10): | 545 | case PICA_REG_INDEX_WORKAROUND(lighting.light[0].dist_atten_bias, 0x014A + 0 * 0x10): |
| 523 | SyncLightDistanceAttenuationBias(0); | 546 | SyncLightDistanceAttenuationBias(0); |