LiteFX::Rendering::ShaderRecordCollection::addMeshGeometryShaderHitGroupRecord¶
Adds a new mesh geometry hit group record based on names of the shader modules.
Synopses¶
Declared in <litefx/rendering_api.hpp>
Adds a new mesh geometry hit group record based on names of the shader modules.
[[dllimport, dllexport]] void addMeshGeometryShaderHitGroupRecord(
std::optional<StringView> anyHitShaderName,
std::optional<StringView> closestHitShaderName);
Adds a new mesh geometry hit group record based on names of the shader modules.
template<typename TLocalData>
requires (std::alignment_of_v<TLocalData> == SHADER_RECORD_LOCAL_DATA_ALIGNMENT)
void addMeshGeometryShaderHitGroupRecord(
std::optional<StringView> anyHitShaderName,
std::optional<StringView> closestHitShaderName,
TLocalData payload);
Exceptions¶
| Name | Thrown on |
|---|---|
InvalidArgumentException | Thrown, if both provided shader names are empty or not found, the shaders are not of the right type or do not belong to the parent shader program. |
Template Parameters¶
| Name | Description |
|---|---|
| TLocalData | The type of the shader record local data. |
Parameters¶
| Name | Description |
|---|---|
| anyHitShaderName | The name of the any hit shader module. |
| closestHitShaderName | The name of the closest hit shader module. |
| payload | The shader-local data of the shader record. |