From eaf60ca5d859ddd8a18fd4783e8e660987c27f2a Mon Sep 17 00:00:00 2001 From: Nguyen Dac Nam Date: Wed, 19 Feb 2020 01:23:08 +0700 Subject: Update code structure Co-Authored-By: Mat M. --- src/video_core/renderer_vulkan/vk_sampler_cache.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/video_core/renderer_vulkan') 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 TryConvertBorderColor(std::array if (color[0] + color[1] + color[2] > 1.35f) { // If color elements are brighter than roughly 0.5 average, use white border return vk::BorderColor::eFloatOpaqueWhite; + } + if (color[3] > 0.5f) { + return vk::BorderColor::eFloatOpaqueBlack; + } + return vk::BorderColor::eFloatTransparentBlack; + // If color elements are brighter than roughly 0.5 average, use white border + return vk::BorderColor::eFloatOpaqueWhite; } else { if (color[3] > 0.5f) { return vk::BorderColor::eFloatOpaqueBlack; -- cgit v1.2.3