mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 22:57:22 +00:00
Update code structure
Co-Authored-By: Mat M. <mathew1800@gmail.com>
This commit is contained in:
parent
ba84f0988f
commit
eaf60ca5d8
1 changed files with 7 additions and 0 deletions
|
@ -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[0] + color[1] + color[2] > 1.35f) {
|
||||||
// If color elements are brighter than roughly 0.5 average, use white border
|
// If color elements are brighter than roughly 0.5 average, use white border
|
||||||
return vk::BorderColor::eFloatOpaqueWhite;
|
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 {
|
} else {
|
||||||
if (color[3] > 0.5f) {
|
if (color[3] > 0.5f) {
|
||||||
return vk::BorderColor::eFloatOpaqueBlack;
|
return vk::BorderColor::eFloatOpaqueBlack;
|
||||||
|
|
Loading…
Reference in a new issue