2
3
4
5
16 RendererPassBuilder{
"ViewportGrid",
this }
18 .AddColorAttachment(
"SceneColor",
TextureType::Texture2D, [](
bool& isEnableBlend, VkAttachmentDescription& description) {
20 description.format = VK_FORMAT_R16G16B16A16_SFLOAT;
31 DescriptorSetBuilder{
"ViewportGrid",
this }
38 VkPipelineLayout& layout ,
44 PipelineBuilder{ subPass, material,
this }
46 .NullBindingDescriptions()
47 .NullAttributeDescriptions()
50 .SetPipelineLayout(layout)
51 .SetCullMode(VK_CULL_MODE_NONE)
52 .SetColorAttachments()
64 builder.BindDescriptorSet(DescriptorSetManager::GetByName(
"PreRenderer"));
66 builder.BindDescriptorSet(DescriptorSetManager::GetByName({ m_Pass->GetName(),
"ViewportGrid" }));
68 builder.BindPipeline(
"ViewportGridRenderer.ViewportGrid.Default");
70 builder.UpdatePushConstant<uint64_t>([&](
auto& push) {
71 push = GetDefaultMaterial(
"ViewportGrid")->GetMaterialParamsAddress();
74 builder.DrawFullScreenTriangle();
#define SPICES_PROFILE_ZONE
uint32_t m_FrameIndex
FrameIndex, varying during 0 - (MaxFrameInFlight - 1). Used almost anywhere.
uint32_t m_ImageIndex
ImageIndex, varying during 0 - (MaxFrameInFlight - 1). Used in swapchain index and framebuffer index.
FrameInfo Class. This class defines the FrameInfo data.
Material Class. This class contains a branch of parameter and shader, also descriptor.
This Class Combines some data relative to sub pass. Usually as a member variable of RendererPass.
DescriptorSetBuilder & AddPushConstant(uint32_t size)
Set VkPushConstantRange by a specific push constant struct.
virtual void BeginRenderPass()
Begin this Renderer's RenderPass.
virtual void EndRenderPass()
End this Renderer's RenderPass.
This class helps to bind pipeline and bind buffer. Only instanced during Render().
RendererPassBuilder & EndSubPass()
End recording a sub pass.
void Build() const
Build the RendererPass.
RendererPassBuilder & AddSubPass(const std::string &subPassName, Querier::StatisticsFlags flags=Querier::ALL)
Add a new SubPass to Renderer Pass.
This Class handles our engine time step during frames. Global Unique.
virtual void CreateDescriptorSet() override
The interface is inherited from Renderer. Create specific descriptor set for sub pass.
virtual void Render(TimeStep &ts, FrameInfo &frameInfo) override
The interface is inherited from Renderer.
virtual void CreateRendererPass() override
The interface is inherited from Renderer. Create specific render pass.
virtual void CreatePipeline(std::shared_ptr< Material > material, VkPipelineLayout &layout, std::shared_ptr< RendererSubPass > subPass) override
The interface is inherited from Renderer. Create Material Specific Pipeline.
ViewportGridRenderer Class. This class defines ViewportGrid render behaves.
TextureType
The enum of all Texture Type.