diff options
author | wwylele <wwylele@gmail.com> | 2017-06-22 16:22:45 +0200 |
---|---|---|
committer | wwylele <wwylele@gmail.com> | 2017-06-22 19:41:00 +0200 |
commit | 8978ecb09caa91424b7117a91d22e7f54040e701 (patch) | |
tree | 65fd8428d562473c9dbd2f7263de1f49898841a2 /src/video_core/swrasterizer/rasterizer.cpp | |
parent | gl_rasterizer: create the texture before applying the state (diff) | |
download | yuzu-8978ecb09caa91424b7117a91d22e7f54040e701.tar yuzu-8978ecb09caa91424b7117a91d22e7f54040e701.tar.gz yuzu-8978ecb09caa91424b7117a91d22e7f54040e701.tar.bz2 yuzu-8978ecb09caa91424b7117a91d22e7f54040e701.tar.lz yuzu-8978ecb09caa91424b7117a91d22e7f54040e701.tar.xz yuzu-8978ecb09caa91424b7117a91d22e7f54040e701.tar.zst yuzu-8978ecb09caa91424b7117a91d22e7f54040e701.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/swrasterizer/rasterizer.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/video_core/swrasterizer/rasterizer.cpp b/src/video_core/swrasterizer/rasterizer.cpp index cd7b6c39d..512e81c08 100644 --- a/src/video_core/swrasterizer/rasterizer.cpp +++ b/src/video_core/swrasterizer/rasterizer.cpp @@ -584,8 +584,7 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve float fog_i = MathUtil::Clamp(floorf(fog_index), 0.0f, 127.0f); float fog_f = fog_index - fog_i; const auto& fog_lut_entry = g_state.fog.lut[static_cast<unsigned int>(fog_i)]; - float fog_factor = (fog_lut_entry.value + fog_lut_entry.difference * fog_f) / - 2047.0f; // This is signed fixed point 1.11 + float fog_factor = fog_lut_entry.ToFloat() + fog_lut_entry.DiffToFloat() * fog_f; fog_factor = MathUtil::Clamp(fog_factor, 0.0f, 1.0f); // Blend the fog |