From 281bc90ad2afe16853178a56e0127cff8b53eb14 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 12 Sep 2015 18:56:12 -0400 Subject: pica: Implement fragment lighting LUTs. --- src/video_core/pica.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/video_core/pica.h') diff --git a/src/video_core/pica.h b/src/video_core/pica.h index 81a568e88..b09484de4 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h @@ -1156,6 +1156,25 @@ struct State { ShaderSetup vs; ShaderSetup gs; + struct { + union LutEntry { + // Used for raw access + u32 raw; + + // LUT value, encoded as 12-bit fixed point, with 12 fraction bits + BitField< 0, 12, u32> value; + + // Used by HW for efficient interpolation, Citra does not use these + BitField<12, 12, u32> difference; + + float ToFloat() { + return static_cast(value) / 4095.f; + } + }; + + std::array luts[24]; + } lighting; + /// Current Pica command list struct { const u32* head_ptr; -- cgit v1.2.3