From ab60414122184851415a27ae8bcacb4aab0504b6 Mon Sep 17 00:00:00 2001 From: wwylele Date: Fri, 16 Jun 2017 14:00:15 +0300 Subject: gl_rasterizer/lighting: fix LUT interpolation --- src/video_core/renderer_opengl/gl_state.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/video_core/renderer_opengl/gl_state.h') diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index 7dcc03bd5..d524d0625 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h @@ -64,8 +64,8 @@ public: } texture_units[3]; struct { - GLuint texture_1d; // GL_TEXTURE_BINDING_1D - } lighting_luts[6]; + GLuint texture_buffer; // GL_TEXTURE_BINDING_BUFFER + } lighting_lut; struct { GLuint texture_1d; // GL_TEXTURE_BINDING_1D -- cgit v1.2.3 From be9e952bdc33b6763618ee66046ce84c0ff18a34 Mon Sep 17 00:00:00 2001 From: wwylele Date: Fri, 16 Jun 2017 16:16:28 +0300 Subject: gl_rasterizer: manage texture ids in one place --- src/video_core/renderer_opengl/gl_state.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/video_core/renderer_opengl/gl_state.h') diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index d524d0625..bb0218708 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h @@ -6,6 +6,29 @@ #include +namespace TextureUnits { + +struct TextureUnit { + GLint id; + constexpr GLenum Enum() const { + return static_cast(GL_TEXTURE0 + id); + } +}; + +constexpr TextureUnit PicaTexture(int unit) { + return TextureUnit{unit}; +} + +constexpr TextureUnit LightingLUT{3}; +constexpr TextureUnit FogLUT{4}; +constexpr TextureUnit ProcTexNoiseLUT{5}; +constexpr TextureUnit ProcTexColorMap{6}; +constexpr TextureUnit ProcTexAlphaMap{7}; +constexpr TextureUnit ProcTexLUT{8}; +constexpr TextureUnit ProcTexDiffLUT{9}; + +} // namespace TextureUnits + class OpenGLState { public: struct { -- cgit v1.2.3