diff options
| author | bunnei <bunneidev@gmail.com> | 2015-11-13 22:52:20 -0500 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2016-02-05 17:17:29 -0500 |
| commit | e9af70eaf3e9d190b2c75c039b004beb71f0e436 (patch) | |
| tree | cf0703ef550c113c4689344ecc303a484fb97b9f /src/video_core/renderer_opengl/gl_rasterizer.h | |
| parent | afbef525163af1b28e5b7493e58383d442762228 (diff) | |
renderer_opengl: Implement HW fragment lighting LUTs within our default UBO.
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index 698ca5c4c..fa4a78cb1 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h @@ -242,10 +242,11 @@ private: std::array<GLfloat, 3> lighting_global_ambient; INSERT_PADDING_WORDS(1); LightSrc light_src[8]; + std::array<std::array<std::array<GLfloat, 4>, 256>, 6> lighting_lut; }; - static_assert(sizeof(UniformData) == 0x210, "The size of the UniformData structure has changed, update the structure in the shader"); - static_assert(sizeof(UniformData) < 16384, "UniformData structure must be less than 16kb as per the OpenGL spec"); + static_assert(sizeof(UniformData) == 0x6210, "The size of the UniformData structure has changed, update the structure in the shader"); + static_assert(sizeof(UniformData) < 32768, "UniformData structure must be less than 32kb"); /// Reconfigure the OpenGL color texture to use the given format and dimensions void ReconfigureColorTexture(TextureInfo& texture, Pica::Regs::ColorFormat format, u32 width, u32 height); @@ -295,6 +296,9 @@ private: /// Syncs the lighting global ambient color to match the PICA register void SyncGlobalAmbient(); + /// Syncs the lighting lookup tables + void SyncLightingLUT(unsigned index); + /// Syncs the specified light's diffuse color to match the PICA register void SyncLightDiffuse(int light_index); @@ -346,6 +350,7 @@ private: struct { UniformData data; + bool lut_dirty[24]; bool dirty; } uniform_block_data; |
