2#include "../bench/foray_bench_declares.hpp"
3#include "../core/foray_context.hpp"
4#include "../core/foray_shadermodule.hpp"
5#include "../scene/foray_scene.hpp"
34 virtual void Resize(
const VkExtent2D& extent)
override;
Context used for render processes. This object is rebuilt for every frame. /.
Definition foray_framerenderinfo.hpp:14
A device benchmark based on Vulkans DeviceQuery Api. Timestamps are recorded in milliseconds....
Definition foray_devicebenchmark.hpp:13
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
Provides registries and methods as the anchor of a component based scene.
Definition foray_scene.hpp:17
Utilizes rasterization to render a GBuffer output.
Definition foray_gbuffer.hpp:22
virtual void RecordFrame(VkCommandBuffer cmdBuffer, base::FrameRenderInfo &renderInfo) override
Records a frame to cmdBuffer.
static const char * TIMESTAMP_FRAG_BEGIN
Definition foray_gbuffer.hpp:95
static const char * TIMESTAMP_FRAG_END
Definition foray_gbuffer.hpp:96
static const char * TIMESTAMP_VERT_END
Definition foray_gbuffer.hpp:94
bench::DeviceBenchmark * mBenchmark
Definition foray_gbuffer.hpp:91
static constexpr std::string_view NormalOutputName
Definition foray_gbuffer.hpp:52
static constexpr std::string_view LinearZOutputName
Definition foray_gbuffer.hpp:57
std::string mVertexShaderPath
Definition foray_gbuffer.hpp:75
virtual void Resize(const VkExtent2D &extent) override
Default implementation accesses mImageOutputs and calls ManagedImage::Resize(extent) on any set image...
static constexpr std::string_view MaterialIdxOutputName
Definition foray_gbuffer.hpp:55
static constexpr std::string_view PositionOutputName
Definition foray_gbuffer.hpp:51
virtual void Destroy() override
Destroy the render stage. Finalizes all components.
core::ShaderModule mVertexShaderModule
Definition foray_gbuffer.hpp:78
core::ManagedImage * GetImageEOutput(EOutput output, bool noThrow=false)
static constexpr std::string_view AlbedoOutputName
Definition foray_gbuffer.hpp:53
static constexpr std::string_view MotionOutputName
Definition foray_gbuffer.hpp:54
virtual void CreateDescriptorSets() override
virtual void CreatePipelineLayout() override
EOutput
Definition foray_gbuffer.hpp:39
virtual void Init(core::Context *context, scene::Scene *scene, std::string_view vertexShaderPath="", std::string_view fragmentShaderPath="", bench::DeviceBenchmark *benchmark=nullptr)
std::string mFragmentShaderPath
Definition foray_gbuffer.hpp:76
std::array< PerImageInfo,(size_t) EOutput::MaxEnum > mImageInfos
Definition foray_gbuffer.hpp:73
virtual void SetupDescriptors() override
core::ShaderModule mFragmentShaderModule
Definition foray_gbuffer.hpp:79
virtual void DestroyFrameBufferAndRenderpass()
static constexpr std::string_view DepthOutputName
Definition foray_gbuffer.hpp:58
static constexpr std::string_view MeshInstanceIdOutputName
Definition foray_gbuffer.hpp:56
static const char * TIMESTAMP_VERT_BEGIN
Definition foray_gbuffer.hpp:93
scene::Scene * mScene
Definition foray_gbuffer.hpp:64
Base class for rasterized render stages (no built-in functionality)
Definition foray_rasterizedRenderStage.hpp:9
#define FORAY_GETTER_CR(member)
Return constant reference.
Definition foray_basics.hpp:60
Definition foray_blitstage.hpp:4
Non owning context object.
Definition foray_context.hpp:16
Definition foray_gbuffer.hpp:67
VkClearValue ClearValue
Definition foray_gbuffer.hpp:70
EOutput Output
Definition foray_gbuffer.hpp:68
core::ManagedImage Image
Definition foray_gbuffer.hpp:69