2#include "../core/foray_samplercollection.hpp"
3#include "../foray_glm.hpp"
14 inline static constexpr std::string_view
OutputName =
"Comparer.Out";
24 virtual void Resize(
const VkExtent2D& extent)
override;
43 glm::vec4
Scale = glm::vec4(1.f);
45 VkImageAspectFlags
Aspect = VkImageAspectFlagBits::VK_IMAGE_ASPECT_COLOR_BIT;
Context used for render processes. This object is rebuilt for every frame. /.
Definition foray_framerenderinfo.hpp:14
Wraps an image + sampler combination.
Definition foray_samplercollection.hpp:61
Helps with the creation of a VkDescriptorSetLayout and VkDescriptorSet.
Definition foray_descriptorset.hpp:15
Wraps allocation and lifetime functionality of a VkBuffer.
Definition foray_managedbuffer.hpp:12
Wraps allocation and lifetime functionality of VkImage.
Definition foray_managedimage.hpp:13
Wraps shader code driver handle (VkShaderModule). See ShaderManager for compiling shaders dynamically...
Definition foray_shadermodule.hpp:11
Base class for operating system events.
Definition foray_event.hpp:13
Displays two images of any type next to each other, and get a "pipette" readout at the mouse location...
Definition foray_comparerstage.hpp:11
void CreateSubStage(SubStage &substage)
void DispatchSubStage(SubStage &substage, VkCommandBuffer buffer, base::FrameRenderInfo &renderInfo)
PipetteValue mPipetteValue
Definition foray_comparerstage.hpp:103
virtual void Resize(const VkExtent2D &extent) override
Default implementation accesses mImageOutputs and calls ManagedImage::Resize(extent) on any set image...
core::ManagedImage mOutput
Definition foray_comparerstage.hpp:99
static constexpr std::string_view OutputName
Image output name.
Definition foray_comparerstage.hpp:14
virtual void RecordFrame(VkCommandBuffer cmdBuffer, base::FrameRenderInfo &renderInfo) override
Pipeline barriers and compute shader dispatches.
std::array< SubStage, 2 > mSubStages
Definition foray_comparerstage.hpp:97
virtual void Destroy() override
Destroy the render stage. Finalizes all components.
bool mFlipY
Definition foray_comparerstage.hpp:109
std::array< core::ShaderModule, 3 > mShaders
Definition foray_comparerstage.hpp:105
core::ManagedBuffer mPipetteBuffer
Definition foray_comparerstage.hpp:100
fp32_t mMixValue
Definition foray_comparerstage.hpp:107
virtual void Init(core::Context *context, bool flipY)
Inits the comparer stage. SetInput() calls afterwards are required for function.
virtual void SetInput(uint32_t index, const InputInfo &input)
Set the input.
virtual void HandleEvent(const osi::Event *event)
If called the comparer stage will filter for MouseMoved events to update the pipette value returned.
void * mPipetteMap
Definition foray_comparerstage.hpp:101
glm::ivec2 mMousePos
Definition foray_comparerstage.hpp:108
void DestroySubStage(SubStage &substage, bool final)
EInputType
Definition foray_comparerstage.hpp:29
void CreatePipetteBuffer()
Render stage base class giving a common interface for rendering processes.
Definition foray_renderstage.hpp:15
Class that holds memory ownership of a vulkan pipeline layout.
Definition foray_pipelinelayout.hpp:12
#define FORAY_GETTER_CR(member)
Return constant reference.
Definition foray_basics.hpp:60
#define FORAY_PROPERTY_V(member)
Getter+Setter shorthand for value types.
Definition foray_basics.hpp:81
Definition foray_blitstage.hpp:4
float fp32_t
stdint.h style 32 bit floating point type alias (float)
Definition foray_basics.hpp:13
Non owning context object.
Definition foray_context.hpp:16
Definition foray_comparerstage.hpp:51
glm::ivec2 TexelPos
Definition foray_comparerstage.hpp:54
glm::vec2 UvPos
Definition foray_comparerstage.hpp:53
glm::vec4 Value
Definition foray_comparerstage.hpp:52
Definition foray_comparerstage.hpp:88
uint32_t Channels
Definition foray_comparerstage.hpp:91
glm::ivec2 MousePos
Definition foray_comparerstage.hpp:90
glm::vec4 Scale
Definition foray_comparerstage.hpp:89
VkBool32 WriteLeft
Definition foray_comparerstage.hpp:94
fp32_t Mix
Definition foray_comparerstage.hpp:92
uint32_t WriteOffset
Definition foray_comparerstage.hpp:93
Value between 0...1 defining the split value.
Definition foray_comparerstage.hpp:68
util::PipelineLayout PipelineLayout
Definition foray_comparerstage.hpp:74
VkPipeline Pipeline
Definition foray_comparerstage.hpp:75
core::DescriptorSet DescriptorSet
Definition foray_comparerstage.hpp:73
InputInfo Input
Definition foray_comparerstage.hpp:70
core::CombinedImageSampler InputSampled
Definition foray_comparerstage.hpp:71
uint32_t Index
Definition foray_comparerstage.hpp:69
core::ShaderModule * Shader
Definition foray_comparerstage.hpp:72