diff options
author | Subv <subv2112@gmail.com> | 2017-06-28 19:35:35 +0200 |
---|---|---|
committer | wwylele <wwylele@gmail.com> | 2017-07-11 18:39:15 +0200 |
commit | b8229a768434ab9b47123359669761c05ecdd6b0 (patch) | |
tree | e5ca7862ea6ae36e0228b6c857cc96ae675ac006 /src/video_core/swrasterizer/rasterizer.cpp | |
parent | SwRasterizer/Lighting: Do not use global state in LookupLightingLut. (diff) | |
download | yuzu-b8229a768434ab9b47123359669761c05ecdd6b0.tar yuzu-b8229a768434ab9b47123359669761c05ecdd6b0.tar.gz yuzu-b8229a768434ab9b47123359669761c05ecdd6b0.tar.bz2 yuzu-b8229a768434ab9b47123359669761c05ecdd6b0.tar.lz yuzu-b8229a768434ab9b47123359669761c05ecdd6b0.tar.xz yuzu-b8229a768434ab9b47123359669761c05ecdd6b0.tar.zst yuzu-b8229a768434ab9b47123359669761c05ecdd6b0.zip |
Diffstat (limited to 'src/video_core/swrasterizer/rasterizer.cpp')
-rw-r--r-- | src/video_core/swrasterizer/rasterizer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/swrasterizer/rasterizer.cpp b/src/video_core/swrasterizer/rasterizer.cpp index b69f7b692..d2d77e8b0 100644 --- a/src/video_core/swrasterizer/rasterizer.cpp +++ b/src/video_core/swrasterizer/rasterizer.cpp @@ -129,8 +129,8 @@ static float LookupLightingLut(const Pica::State::Lighting& lighting, size_t lut } std::tuple<Math::Vec4<u8>, Math::Vec4<u8>> ComputeFragmentsColors( - const Math::Quaternion<float>& normquat, const Math::Vec3<float>& view) { - const auto& lighting = g_state.regs.lighting; + const Pica::LightingRegs& lighting, const Math::Quaternion<float>& normquat, + const Math::Vec3<float>& view) { if (lighting.disable) return {Math::MakeVec<u8>(0, 0, 0, 0), Math::MakeVec<u8>(0, 0, 0, 0)}; @@ -732,7 +732,7 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve Math::Vec4<u8> secondary_fragment_color; std::tie(primary_fragment_color, secondary_fragment_color) = - ComputeFragmentsColors(normquat, fragment_position); + ComputeFragmentsColors(g_state.regs.lighting, normquat, fragment_position); for (unsigned tev_stage_index = 0; tev_stage_index < tev_stages.size(); ++tev_stage_index) { |