diff options
| author | wwylele <wwylele@gmail.com> | 2017-06-16 14:00:15 +0300 |
|---|---|---|
| committer | wwylele <wwylele@gmail.com> | 2017-06-21 23:13:06 +0300 |
| commit | ab60414122184851415a27ae8bcacb4aab0504b6 (patch) | |
| tree | f26b042d908ede118686e781eedfec24539ab299 /src/video_core/renderer_opengl/gl_state.cpp | |
| parent | d0888f85485c4e064371e03f34facc1990553114 (diff) | |
gl_rasterizer/lighting: fix LUT interpolation
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.cpp')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index bf837a7fb..40d7cee96 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -52,9 +52,7 @@ OpenGLState::OpenGLState() { texture_unit.sampler = 0; } - for (auto& lut : lighting_luts) { - lut.texture_1d = 0; - } + lighting_lut.texture_buffer = 0; fog_lut.texture_1d = 0; @@ -194,11 +192,9 @@ void OpenGLState::Apply() const { } // Lighting LUTs - for (unsigned i = 0; i < ARRAY_SIZE(lighting_luts); ++i) { - if (lighting_luts[i].texture_1d != cur_state.lighting_luts[i].texture_1d) { - glActiveTexture(GL_TEXTURE3 + i); - glBindTexture(GL_TEXTURE_1D, lighting_luts[i].texture_1d); - } + if (lighting_lut.texture_buffer != cur_state.lighting_lut.texture_buffer) { + glActiveTexture(GL_TEXTURE15); + glBindTexture(GL_TEXTURE_BUFFER, cur_state.lighting_lut.texture_buffer); } // Fog LUT |
