Update code structure

Co-Authored-By: Mat M. <[email protected]>
This commit is contained in:
Nguyen Dac NamandMat M. authored and GitHub committed 2020-02-19 01:23:08 +07:00
1 parent ba84f0988f
commit eaf60ca5d8
1 file changed
+7
@@ -26,6 +26,13 @@ static std::optional<vk::BorderColor> TryConvertBorderColor(std::array<float, 4>
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;