The Joe Engine
Joe's engine programming playground
JoeEngine::JEShadowShader Class Reference

The JEShadowShader. More...

#include <VulkanShader.h>

Inheritance diagram for JoeEngine::JEShadowShader:
JoeEngine::JEVulkanShader JoeEngine::JEShader

Public Member Functions

 JEShadowShader ()=delete
 Default constructor (deleted). More...
 
 JEShadowShader (const MaterialComponent &materialComponent, uint32_t numSourceTextures, VkDevice device, VkPhysicalDevice physicalDevice, VkExtent2D extent, VkRenderPass renderPass, const std::string &vertPath, const std::string &fragPath)
 Constructor. More...
 
void BindPushConstants_ViewProj (VkCommandBuffer commandBuffer, const glm::mat4 &viewProj) const
 Bind the view-projection matrix push constant. More...
 
void BindPushConstants_InstancedData (VkCommandBuffer commandBuffer, const std::array< uint32_t, 4 > &instancedData) const
 Bind the instanced data push constant. More...
 
- Public Member Functions inherited from JoeEngine::JEVulkanShader
 JEVulkanShader ()=delete
 Default constructor (deleted). More...
 
 JEVulkanShader (VkDevice device, const std::string &vertPath, const std::string &fragPath)
 Constructor. More...
 
virtual ~JEVulkanShader ()=default
 Destructor (default) (deleted). More...
 
void Cleanup () override
 Vulkan API-specific cleanup function. More...
 
virtual void UpdateUniformBuffers (VkDevice device, uint32_t currentImage) override
 Default shader data buffer update function. More...
 
VkPipeline GetPipeline () const
 
VkPipelineLayout GetPipelineLayout () const
 
VkDescriptorSetLayout GetDescriptorSetLayout (uint32_t index) const
 Get descriptor set layout object. More...
 
- Public Member Functions inherited from JoeEngine::JEShader
 JEShader ()=delete
 Delete constructor (deleted). More...
 
 JEShader (const std::string &vertPath, const std::string &fragPath)
 Constructor. More...
 
virtual ~JEShader ()=default
 Destructor (default) (virtual). More...
 

Additional Inherited Members

- Protected Member Functions inherited from JoeEngine::JEVulkanShader
virtual void CreateDescriptorSetLayouts (VkDevice device, uint32_t numSourceTextures, uint32_t numUniformBuffers, uint32_t numStorageBuffers)
 Base class version of descriptor set layout creation. More...
 
- Protected Attributes inherited from JoeEngine::JEVulkanShader
VkPipeline m_graphicsPipeline = VK_NULL_HANDLE
 Graphics pipeline object. More...
 
VkPipelineLayout m_pipelineLayout = VK_NULL_HANDLE
 Pipeline layout object. More...
 
std::vector< VkDescriptorSetLayout > m_descriptorSetLayouts
 List of descriptor set layouts (number of elements dependent on the purpose of the derived shader). More...
 
const VkDevice m_device
 Reference to the Vulkan logical device. More...
 
- Protected Attributes inherited from JoeEngine::JEShader
const std::string m_vertPath
 Path to vertex shader source file. More...
 
const std::string m_fragPath
 Path to fragment shader source file. More...
 

Detailed Description

The JEShadowShader.

Vulkan shader class variant for shadow pass rendering.

See also
JEShader, JEVulkanShader

Constructor & Destructor Documentation

◆ JEShadowShader() [1/2]

JoeEngine::JEShadowShader::JEShadowShader ( )
delete

Default constructor (deleted).

◆ JEShadowShader() [2/2]

JoeEngine::JEShadowShader::JEShadowShader ( const MaterialComponent materialComponent,
uint32_t  numSourceTextures,
VkDevice  device,
VkPhysicalDevice  physicalDevice,
VkExtent2D  extent,
VkRenderPass  renderPass,
const std::string &  vertPath,
const std::string &  fragPath 
)
inline

Constructor.

Loads the specified shader files from the source paths and creates the Vulkan objects based on the material properties.

Member Function Documentation

◆ BindPushConstants_InstancedData()

void JoeEngine::JEShadowShader::BindPushConstants_InstancedData ( VkCommandBuffer  commandBuffer,
const std::array< uint32_t, 4 > &  instancedData 
) const

Bind the instanced data push constant.

Parameters
commandBufferthe command buffer to record the bind command to.
instancedDataper-geometry-instance data to provide to the shader.

◆ BindPushConstants_ViewProj()

void JoeEngine::JEShadowShader::BindPushConstants_ViewProj ( VkCommandBuffer  commandBuffer,
const glm::mat4 &  viewProj 
) const

Bind the view-projection matrix push constant.

Parameters
commandBufferthe command buffer to record the bind command to.
viewProjthe view projection matrix to provide to the shader.

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