LiteFX::Rendering::ShaderRecordCollection::addShaderRecord¶
addShaderRecord overloads
Synopses¶
Declared in <litefx/rendering_api.hpp>
Adds a new shader record based on the name of a shader module in the parent shader program.
[[dllimport, dllexport]] void addShaderRecord(StringView shaderName);
Adds a new shader record to the shader record collection.
[[dllimport, dllexport]] void addShaderRecord(ShaderRecord<>::shader_group_type const& shaderGroup);
Adds a new shader record to the shader record collection.
[[dllimport, dllexport]] void addShaderRecord(UniquePtr<IShaderRecord const>&& record);
Adds a new shader record based on the name of a shader module in the parent shader program.
template<typename TLocalData>
requires (std::alignment_of_v<TLocalData> == SHADER_RECORD_LOCAL_DATA_ALIGNMENT)
void addShaderRecord(
StringView shaderName,
TLocalData payload);
Adds a new shader record to the shader record collection.
template<typename TLocalData>
requires (std::alignment_of_v<TLocalData> == SHADER_RECORD_LOCAL_DATA_ALIGNMENT)
void addShaderRecord(
ShaderRecord<TLocalData>::shader_group_type shaderGroup,
TLocalData payload);
Exceptions¶
| Name | Thrown on |
|---|---|
InvalidArgumentException | Thrown, if no shader module with the provided name was found in the parent shader program. |
ArgumentNotInitializedException | Thrown, if the shader record was not initialized. |
Template Parameters¶
| Name | Description |
|---|---|
| TLocalData | The type of the shader record local data. |
Parameters¶
| Name | Description |
|---|---|
| shaderName | The name of the shader module. |
| shaderGroup | The shader module or hit group. |
| record | The shader record to add to the shader record collection. |
| payload | The shader-local data of the shader record. |