summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-09-19 19:18:35 +0200
committerGitHub <noreply@github.com>2017-09-19 19:18:35 +0200
commit6fc123d67c628ede43e1b970d19fde15c20f61f2 (patch)
tree42dece098356a39423e8f526b4981d12db132763 /src
parentMerge pull request #2936 from B3n30/system_curl_linux (diff)
parentImproved performance of FromAttributeBuffer (diff)
downloadyuzu-6fc123d67c628ede43e1b970d19fde15c20f61f2.tar
yuzu-6fc123d67c628ede43e1b970d19fde15c20f61f2.tar.gz
yuzu-6fc123d67c628ede43e1b970d19fde15c20f61f2.tar.bz2
yuzu-6fc123d67c628ede43e1b970d19fde15c20f61f2.tar.lz
yuzu-6fc123d67c628ede43e1b970d19fde15c20f61f2.tar.xz
yuzu-6fc123d67c628ede43e1b970d19fde15c20f61f2.tar.zst
yuzu-6fc123d67c628ede43e1b970d19fde15c20f61f2.zip
Diffstat (limited to 'src')
-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), "