diff options
| author | 2020-02-19 01:23:08 +0700 | |
|---|---|---|
| committer | 2020-02-19 01:23:08 +0700 | |
| commit | eaf60ca5d859ddd8a18fd4783e8e660987c27f2a (patch) | |
| tree | 7545988450ce7f30773be855dd08a11fe7e18ff7 | |
| parent | renderer_vulkan: Add the rest of case for TryConvertBorderColor (diff) | |
| download | yuzu-eaf60ca5d859ddd8a18fd4783e8e660987c27f2a.tar.gz yuzu-eaf60ca5d859ddd8a18fd4783e8e660987c27f2a.tar.xz yuzu-eaf60ca5d859ddd8a18fd4783e8e660987c27f2a.zip | |
Update code structure
Co-Authored-By: Mat M. <mathew1800@gmail.com>
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_sampler_cache.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_sampler_cache.cpp b/src/video_core/renderer_vulkan/vk_sampler_cache.cpp index 839cfc1c3..cbad25015 100644 --- a/src/video_core/renderer_vulkan/vk_sampler_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_sampler_cache.cpp | |||
| @@ -26,6 +26,13 @@ static std::optional<vk::BorderColor> TryConvertBorderColor(std::array<float, 4> | |||
| 26 | if (color[0] + color[1] + color[2] > 1.35f) { | 26 | if (color[0] + color[1] + color[2] > 1.35f) { |
| 27 | // If color elements are brighter than roughly 0.5 average, use white border | 27 | // If color elements are brighter than roughly 0.5 average, use white border |
| 28 | return vk::BorderColor::eFloatOpaqueWhite; | 28 | return vk::BorderColor::eFloatOpaqueWhite; |
| 29 | } | ||
| 30 | if (color[3] > 0.5f) { | ||
| 31 | return vk::BorderColor::eFloatOpaqueBlack; | ||
| 32 | } | ||
| 33 | return vk::BorderColor::eFloatTransparentBlack; | ||
| 34 | // If color elements are brighter than roughly 0.5 average, use white border | ||
| 35 | return vk::BorderColor::eFloatOpaqueWhite; | ||
| 29 | } else { | 36 | } else { |
| 30 | if (color[3] > 0.5f) { | 37 | if (color[3] > 0.5f) { |
| 31 | return vk::BorderColor::eFloatOpaqueBlack; | 38 | return vk::BorderColor::eFloatOpaqueBlack; |