Castor3D 0.16.0
Multiplatform 3D engine
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
castor3d::SssProfileBuffer Class Reference

#include <SssProfileBuffer.hpp>

Classes

struct  Data
 
struct  SssProfileData
 
struct  SssProfileDataPtr
 

Public Types

using SssProfilesData = castor::ArrayView< SssProfileData >
 

Public Member Functions

C3D_API SssProfileBuffer (Engine &engine, RenderDevice const &device, uint32_t count)
 Constructor.
 
C3D_API uint32_t addPass (SubsurfaceScatteringComponent &component)
 Adds a pass to the buffer.
 
C3D_API void removePass (SubsurfaceScatteringComponent &component) noexcept
 Removes a pass from the buffer.
 
C3D_API void update (UploadData &uploader)
 Updates the passes buffer.
 
C3D_API VkDescriptorSetLayoutBinding createLayoutBinding (uint32_t binding, VkShaderStageFlags stages=(VK_SHADER_STAGE_FRAGMENT_BIT|VK_SHADER_STAGE_GEOMETRY_BIT|VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT|VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT|VK_SHADER_STAGE_VERTEX_BIT)) const
 Creates the descriptor set layout binding.
 
C3D_API void createPassBinding (crg::FramePass &pass, uint32_t binding) const
 Creates a frame pass binding.
 
C3D_API ashes::WriteDescriptorSet getBinding (uint32_t binding) const
 Creates the descriptor write for this buffer.
 
C3D_API void createBinding (ashes::DescriptorSet &descriptorSet, VkDescriptorSetLayoutBinding const &binding) const
 Creates the descriptor set binding at given point.
 
C3D_API SssProfileDataPtr getData (uint32_t profileID)
 
uint8_t * getPtr ()
 

Static Public Attributes

static constexpr uint32_t DataSize = sizeof( SssProfileData )
 

Member Typedef Documentation

◆ SssProfilesData

Constructor & Destructor Documentation

◆ SssProfileBuffer()

C3D_API castor3d::SssProfileBuffer::SssProfileBuffer ( Engine & engine,
RenderDevice const & device,
uint32_t count )

Constructor.

Parameters
[in]engineThe engine.
[in]deviceThe GPU device.
[in]countThe max configurations count.

Member Function Documentation

◆ addPass()

C3D_API uint32_t castor3d::SssProfileBuffer::addPass ( SubsurfaceScatteringComponent & component)

Adds a pass to the buffer.

Parameters
[in]componentThe subsurface scattering component.

◆ createBinding()

C3D_API void castor3d::SssProfileBuffer::createBinding ( ashes::DescriptorSet & descriptorSet,
VkDescriptorSetLayoutBinding const & binding ) const

Creates the descriptor set binding at given point.

Parameters
[in]descriptorSetThe descriptor set that receives the binding.
[in]bindingThe descriptor set layout binding.

◆ createLayoutBinding()

C3D_API VkDescriptorSetLayoutBinding castor3d::SssProfileBuffer::createLayoutBinding ( uint32_t binding,
VkShaderStageFlags stages = (VK_SHADER_STAGE_FRAGMENT_BIT|VK_SHADER_STAGE_GEOMETRY_BIT|VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT|VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT|VK_SHADER_STAGE_VERTEX_BIT) ) const

Creates the descriptor set layout binding.

◆ createPassBinding()

C3D_API void castor3d::SssProfileBuffer::createPassBinding ( crg::FramePass & pass,
uint32_t binding ) const

Creates a frame pass binding.

◆ getBinding()

C3D_API ashes::WriteDescriptorSet castor3d::SssProfileBuffer::getBinding ( uint32_t binding) const

Creates the descriptor write for this buffer.

◆ getData()

C3D_API SssProfileDataPtr castor3d::SssProfileBuffer::getData ( uint32_t profileID)
Returns
The pointer to the data for given profile ID.

◆ getPtr()

uint8_t * castor3d::SssProfileBuffer::getPtr ( )
inline
Returns
The pointer to the buffer.

References castor3d::ShaderBuffer::getPtr().

Here is the call graph for this function:

◆ removePass()

C3D_API void castor3d::SssProfileBuffer::removePass ( SubsurfaceScatteringComponent & component)
noexcept

Removes a pass from the buffer.

Parameters
[in]componentThe subsurface scattering component.

◆ update()

C3D_API void castor3d::SssProfileBuffer::update ( UploadData & uploader)

Updates the passes buffer.

Member Data Documentation

◆ DataSize

constexpr uint32_t castor3d::SssProfileBuffer::DataSize = sizeof( SssProfileData )
staticconstexpr

The documentation for this class was generated from the following file: