HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
pipeline_SDF_push_constants.hpp
1// Copyright Take Vos 2020-2021.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5#pragma once
6
7#include "../rapid/sfloat_rg32.hpp"
8#include <vulkan/vulkan.hpp>
9
10namespace hi::inline v1::pipeline_SDF {
11
12struct push_constants {
13 sfloat_rg32 window_extent = extent2{0.0, 0.0};
14 sfloat_rg32 viewport_scale = scale2{0.0, 0.0};
15 sfloat_rg32 red_subpixel_offset = vector2{0.0, 0.0};
16 sfloat_rg32 blue_subpixel_offset = vector2{0.0, 0.0};
17 VkBool32 has_subpixels = false;
18
19 static std::vector<vk::PushConstantRange> pushConstantRanges()
20 {
21 return {{vk::ShaderStageFlagBits::eVertex | vk::ShaderStageFlagBits::eFragment, 0, sizeof(push_constants)}};
22 }
23};
24
25} // namespace hi::inline v1::pipeline_SDF
DOXYGEN BUG.
Definition algorithm.hpp:15