Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Rendering::ImageBasedLightingResources Class Reference

#include <IBLResources.h>

Public Member Functions

 ImageBasedLightingResources ()=default
void createPlaceholders (Core::ApplicationContext *context, VkCommandPool commandPool)
 Initializes placeholder (1x1 black cubemap + 1x1 white BRDF LUT) so that descriptor sets are always valid even without an environment map.
void generateBrdfLut (Core::ApplicationContext *context, VkCommandPool commandPool, VkPipeline brdfLutComputePipeline, VkPipelineLayout brdfLutPipelineLayout, VkDescriptorSet brdfLutDescriptorSet)
 Generates the BRDF integration LUT via compute shader dispatch.
const VkDescriptorImageInfo & getCubemapDescriptorInfo () const
const VkDescriptorImageInfo & getBrdfLutDescriptorInfo () const
void setCubemapDescriptorInfo (const VkDescriptorImageInfo &descriptorInfo)
VkImageView getBrdfLutImageView () const
VkImage getBrdfLutImage () const
void cleanup (VkDevice device)

Private Member Functions

void createBrdfLutImage (VkDevice device, VkPhysicalDevice physicalDevice)
void createSamplers (VkDevice device)
void updateDescriptorInfos ()

Private Attributes

VkImage placeholderCubemapImage_ = VK_NULL_HANDLE
VkDeviceMemory placeholderCubemapMemory_ = VK_NULL_HANDLE
VkImageView placeholderCubemapView_ = VK_NULL_HANDLE
VkSampler cubemapSampler_ = VK_NULL_HANDLE
VkImage brdfLutImage_ = VK_NULL_HANDLE
VkDeviceMemory brdfLutMemory_ = VK_NULL_HANDLE
VkImageView brdfLutView_ = VK_NULL_HANDLE
VkSampler brdfLutSampler_ = VK_NULL_HANDLE
VkDescriptorImageInfo cubemapDescriptorInfo_ {}
VkDescriptorImageInfo brdfLutDescriptorInfo_ {}

Static Private Attributes

static constexpr uint32_t BRDF_LUT_SIZE = 512

Detailed Description

Definition at line 21 of file IBLResources.h.

Constructor & Destructor Documentation

◆ ImageBasedLightingResources()

Engine::Rendering::ImageBasedLightingResources::ImageBasedLightingResources ( )
default

Member Function Documentation

◆ cleanup()

void Engine::Rendering::ImageBasedLightingResources::cleanup ( VkDevice device)

◆ createBrdfLutImage()

void Engine::Rendering::ImageBasedLightingResources::createBrdfLutImage ( VkDevice device,
VkPhysicalDevice physicalDevice )
private

◆ createPlaceholders()

void Engine::Rendering::ImageBasedLightingResources::createPlaceholders ( Core::ApplicationContext * context,
VkCommandPool commandPool )

Initializes placeholder (1x1 black cubemap + 1x1 white BRDF LUT) so that descriptor sets are always valid even without an environment map.

◆ createSamplers()

void Engine::Rendering::ImageBasedLightingResources::createSamplers ( VkDevice device)
private

◆ generateBrdfLut()

void Engine::Rendering::ImageBasedLightingResources::generateBrdfLut ( Core::ApplicationContext * context,
VkCommandPool commandPool,
VkPipeline brdfLutComputePipeline,
VkPipelineLayout brdfLutPipelineLayout,
VkDescriptorSet brdfLutDescriptorSet )

Generates the BRDF integration LUT via compute shader dispatch.

Parameters
contextApplication context
commandPoolCommand pool for one-time command buffer
brdfLutComputePipelinePre-created compute pipeline for BrdfLut.comp
brdfLutPipelineLayoutPipeline layout for the BRDF LUT compute pass
brdfLutDescriptorSetDescriptor set bound to the BRDF LUT storage image

◆ getBrdfLutDescriptorInfo()

const VkDescriptorImageInfo & Engine::Rendering::ImageBasedLightingResources::getBrdfLutDescriptorInfo ( ) const
inlinenodiscard

Definition at line 49 of file IBLResources.h.

References brdfLutDescriptorInfo_.

◆ getBrdfLutImage()

VkImage Engine::Rendering::ImageBasedLightingResources::getBrdfLutImage ( ) const
inlinenodiscard

Definition at line 54 of file IBLResources.h.

References brdfLutImage_.

◆ getBrdfLutImageView()

VkImageView Engine::Rendering::ImageBasedLightingResources::getBrdfLutImageView ( ) const
inlinenodiscard

Definition at line 53 of file IBLResources.h.

References brdfLutView_.

◆ getCubemapDescriptorInfo()

const VkDescriptorImageInfo & Engine::Rendering::ImageBasedLightingResources::getCubemapDescriptorInfo ( ) const
inlinenodiscard

Definition at line 48 of file IBLResources.h.

References cubemapDescriptorInfo_.

◆ setCubemapDescriptorInfo()

void Engine::Rendering::ImageBasedLightingResources::setCubemapDescriptorInfo ( const VkDescriptorImageInfo & descriptorInfo)

◆ updateDescriptorInfos()

void Engine::Rendering::ImageBasedLightingResources::updateDescriptorInfos ( )
private

Member Data Documentation

◆ BRDF_LUT_SIZE

uint32_t Engine::Rendering::ImageBasedLightingResources::BRDF_LUT_SIZE = 512
staticconstexprprivate

Definition at line 66 of file IBLResources.h.

◆ brdfLutDescriptorInfo_

VkDescriptorImageInfo Engine::Rendering::ImageBasedLightingResources::brdfLutDescriptorInfo_ {}
private

Definition at line 74 of file IBLResources.h.

Referenced by getBrdfLutDescriptorInfo().

◆ brdfLutImage_

VkImage Engine::Rendering::ImageBasedLightingResources::brdfLutImage_ = VK_NULL_HANDLE
private

Definition at line 67 of file IBLResources.h.

Referenced by getBrdfLutImage().

◆ brdfLutMemory_

VkDeviceMemory Engine::Rendering::ImageBasedLightingResources::brdfLutMemory_ = VK_NULL_HANDLE
private

Definition at line 68 of file IBLResources.h.

◆ brdfLutSampler_

VkSampler Engine::Rendering::ImageBasedLightingResources::brdfLutSampler_ = VK_NULL_HANDLE
private

Definition at line 70 of file IBLResources.h.

◆ brdfLutView_

VkImageView Engine::Rendering::ImageBasedLightingResources::brdfLutView_ = VK_NULL_HANDLE
private

Definition at line 69 of file IBLResources.h.

Referenced by getBrdfLutImageView().

◆ cubemapDescriptorInfo_

VkDescriptorImageInfo Engine::Rendering::ImageBasedLightingResources::cubemapDescriptorInfo_ {}
private

Definition at line 73 of file IBLResources.h.

Referenced by getCubemapDescriptorInfo().

◆ cubemapSampler_

VkSampler Engine::Rendering::ImageBasedLightingResources::cubemapSampler_ = VK_NULL_HANDLE
private

Definition at line 63 of file IBLResources.h.

◆ placeholderCubemapImage_

VkImage Engine::Rendering::ImageBasedLightingResources::placeholderCubemapImage_ = VK_NULL_HANDLE
private

Definition at line 60 of file IBLResources.h.

◆ placeholderCubemapMemory_

VkDeviceMemory Engine::Rendering::ImageBasedLightingResources::placeholderCubemapMemory_ = VK_NULL_HANDLE
private

Definition at line 61 of file IBLResources.h.

◆ placeholderCubemapView_

VkImageView Engine::Rendering::ImageBasedLightingResources::placeholderCubemapView_ = VK_NULL_HANDLE
private

Definition at line 62 of file IBLResources.h.


The documentation for this class was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Renderer/IBLResources.h