diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-05-25 06:37:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-25 06:37:42 +0200 |
commit | bae3799bd5208d08bb52546ad0723103c94cada3 (patch) | |
tree | e4c921df6bf28cdeb50f48d1b7aa4d7a0bc002ed /src/video_core/renderer_opengl/gl_rasterizer.h | |
parent | Merge pull request #2683 from bunnei/telemetry-framework (diff) | |
parent | gl_rasterizer: implement procedural texture (diff) | |
download | yuzu-bae3799bd5208d08bb52546ad0723103c94cada3.tar yuzu-bae3799bd5208d08bb52546ad0723103c94cada3.tar.gz yuzu-bae3799bd5208d08bb52546ad0723103c94cada3.tar.bz2 yuzu-bae3799bd5208d08bb52546ad0723103c94cada3.tar.lz yuzu-bae3799bd5208d08bb52546ad0723103c94cada3.tar.xz yuzu-bae3799bd5208d08bb52546ad0723103c94cada3.tar.zst yuzu-bae3799bd5208d08bb52546ad0723103c94cada3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.h | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index 3e1770d77..a9ad7d660 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h @@ -143,6 +143,9 @@ private: GLint scissor_x2; GLint scissor_y2; alignas(16) GLvec3 fog_color; + alignas(8) GLvec2 proctex_noise_f; + alignas(8) GLvec2 proctex_noise_a; + alignas(8) GLvec2 proctex_noise_p; alignas(16) GLvec3 lighting_global_ambient; LightSrc light_src[8]; alignas(16) GLvec4 const_color[6]; // A vec4 color for each of the six tev stages @@ -150,7 +153,7 @@ private: }; static_assert( - sizeof(UniformData) == 0x3C0, + sizeof(UniformData) == 0x3E0, "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"); @@ -180,6 +183,16 @@ private: void SyncFogColor(); void SyncFogLUT(); + /// Sync the procedural texture noise configuration to match the PICA register + void SyncProcTexNoise(); + + /// Sync the procedural texture lookup tables + void SyncProcTexNoiseLUT(); + void SyncProcTexColorMap(); + void SyncProcTexAlphaMap(); + void SyncProcTexLUT(); + void SyncProcTexDiffLUT(); + /// Syncs the alpha test states to match the PICA register void SyncAlphaTest(); @@ -248,6 +261,11 @@ private: UniformData data; bool lut_dirty[6]; bool fog_lut_dirty; + bool proctex_noise_lut_dirty; + bool proctex_color_map_dirty; + bool proctex_alpha_map_dirty; + bool proctex_lut_dirty; + bool proctex_diff_lut_dirty; bool dirty; } uniform_block_data = {}; @@ -262,4 +280,19 @@ private: OGLTexture fog_lut; std::array<GLuint, 128> fog_lut_data{}; + + OGLTexture proctex_noise_lut; + std::array<GLvec2, 128> proctex_noise_lut_data{}; + + OGLTexture proctex_color_map; + std::array<GLvec2, 128> proctex_color_map_data{}; + + OGLTexture proctex_alpha_map; + std::array<GLvec2, 128> proctex_alpha_map_data{}; + + OGLTexture proctex_lut; + std::array<GLvec4, 256> proctex_lut_data{}; + + OGLTexture proctex_diff_lut; + std::array<GLvec4, 256> proctex_diff_lut_data{}; }; |