summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorHuw Pascoe <huw.pascoe@gmail.com>2017-09-17 16:42:45 +0200
committerHuw Pascoe <huw.pascoe@gmail.com>2017-09-17 16:56:36 +0200
commita234e4c2009b08039d0698cbbcc8595a1f04a615 (patch)
treed36bdada9d659281efc206f26bfb03615e68c238 /src/video_core
parentMerge pull request #2906 from Subv/ns_new_framework (diff)
downloadyuzu-a234e4c2009b08039d0698cbbcc8595a1f04a615.tar
yuzu-a234e4c2009b08039d0698cbbcc8595a1f04a615.tar.gz
yuzu-a234e4c2009b08039d0698cbbcc8595a1f04a615.tar.bz2
yuzu-a234e4c2009b08039d0698cbbcc8595a1f04a615.tar.lz
yuzu-a234e4c2009b08039d0698cbbcc8595a1f04a615.tar.xz
yuzu-a234e4c2009b08039d0698cbbcc8595a1f04a615.tar.zst
yuzu-a234e4c2009b08039d0698cbbcc8595a1f04a615.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/shader/shader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/shader/shader.cpp b/src/video_core/shader/shader.cpp
index e9063e616..2857d2829 100644
--- a/src/video_core/shader/shader.cpp
+++ b/src/video_core/shader/shader.cpp
@@ -52,7 +52,8 @@ OutputVertex OutputVertex::FromAttributeBuffer(const RasterizerRegs& regs,
// The hardware takes the absolute and saturates vertex colors like this, *before* doing
// interpolation
for (unsigned i = 0; i < 4; ++i) {
- ret.color[i] = float24::FromFloat32(std::fmin(std::fabs(ret.color[i].ToFloat32()), 1.0f));
+ float c = std::fabs(ret.color[i].ToFloat32());
+ ret.color[i] = float24::FromFloat32(c < 1.0f ? c : 1.0f);
}
LOG_TRACE(HW_GPU, "Output vertex: pos(%.2f, %.2f, %.2f, %.2f), quat(%.2f, %.2f, %.2f, %.2f), "