LiteFX 0.3.1.2022
Computer Graphics Engine
|
The interface for a shader program. More...
#include <rendering_api.hpp>
Inherited by LiteFX::Rendering::ShaderProgram< DirectX12ShaderModule >, LiteFX::Rendering::ShaderProgram< VulkanShaderModule >, and LiteFX::Rendering::ShaderProgram< TShaderModule >.
Public Member Functions | |
virtual | ~IShaderProgram () noexcept=default |
Array< const IShaderModule * > | modules () const noexcept |
Returns the modules, the shader program is build from. More... | |
SharedPtr< IPipelineLayout > | reflectPipelineLayout () const |
Uses shader reflection to extract the pipeline layout of a shader. May not be available in all backends. More... | |
The interface for a shader program.
|
virtualdefaultnoexcept |
|
inlinenoexcept |
Returns the modules, the shader program is build from.
|
inline |
Uses shader reflection to extract the pipeline layout of a shader. May not be available in all backends.
Note that shader reflection may not yield different results than you would expect, especially when using DirectX 12. For more information on how to use shader reflection and how to write portable shaders, refer to the shader development guide in the wiki.
In particular, shader reflection is not able to restore:
DescriptorType::Texture
. This is usually not a problem, since DirectX does not have a concept of render pass outputs/inputs anyway. However, keep this in mind, if you want to filter descriptors based on their type, for example. Immutable sampler states in Vulkan. Those are only restored in DirectX, if an explicit root signature has been provided. For this reason, it is best not to use them, if you want to use shader reflection.