SpiecsEngine
 
Loading...
Searching...
No Matches

◆ CreateRendererPass()

void Spices::SceneComposeRenderer::CreateRendererPass ( )
overrideprivatevirtual

The interface is inherited from Renderer. Create specific render pass.

Implements Spices::Renderer.

Definition at line 32 of file SceneComposeRenderer.cpp.

33 {
35
36 RendererPassBuilder{ "SceneCompose", this }
37 .AddSubPass("SceneCompose")
38 .AddColorAttachment("SceneColor", TextureType::Texture2D, [](bool& isEnableBlend, VkAttachmentDescription& description) {
39 description.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
40 description.loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
41 description.format = VK_FORMAT_R16G16B16A16_SFLOAT;
42 })
43 .AddInputAttachment("Albedo", TextureType::Texture2D, [](VkAttachmentDescription& description) {
44 description.finalLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
45 description.format = VK_FORMAT_R16G16B16A16_SFLOAT;
46 })
47 .AddInputAttachment("Normal", TextureType::Texture2D, [](VkAttachmentDescription& description) {
48 description.finalLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
49 description.format = VK_FORMAT_R16G16B16A16_SFLOAT;
50 })
51 .AddInputAttachment("Roughness", TextureType::Texture2D, [](VkAttachmentDescription& description) {
52 description.finalLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
53 description.format = VK_FORMAT_R16G16B16A16_SFLOAT;
54 })
55 .AddInputAttachment("Metallic", TextureType::Texture2D, [](VkAttachmentDescription& description) {
56 description.finalLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
57 description.format = VK_FORMAT_R16G16B16A16_SFLOAT;
58 })
59 .AddInputAttachment("Position", TextureType::Texture2D, [](VkAttachmentDescription& description) {
60 description.finalLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
61 description.format = VK_FORMAT_R32G32B32A32_SFLOAT;
62 })
63 .EndSubPass()
64 .Build();
65 }
#define SPICES_PROFILE_ZONE
friend class RendererPassBuilder
Definition Renderer.h:2053

References Spices::Renderer::RendererPassBuilder::AddSubPass(), Spices::Renderer::RendererPassBuilder::Build(), Spices::Renderer::RendererPassBuilder::EndSubPass(), and Spices::Texture2D.