Merge pull request #626 from VZout/master
Cleaned up the createShaderBindingTable for the raytracing examples
This commit is contained in:
commit
cb50a95547
3 changed files with 5 additions and 9 deletions
|
|
@ -412,7 +412,6 @@ public:
|
|||
VkDeviceSize copyShaderIdentifier(uint8_t* data, const uint8_t* shaderHandleStorage, uint32_t groupIndex) {
|
||||
const uint32_t shaderGroupHandleSize = rayTracingProperties.shaderGroupHandleSize;
|
||||
memcpy(data, shaderHandleStorage + groupIndex * shaderGroupHandleSize, shaderGroupHandleSize);
|
||||
data += shaderGroupHandleSize;
|
||||
return shaderGroupHandleSize;
|
||||
}
|
||||
|
||||
|
|
@ -434,7 +433,6 @@ public:
|
|||
VK_CHECK_RESULT(vkGetRayTracingShaderGroupHandlesNV(device, pipeline, 0, NUM_SHADER_GROUPS, sbtSize, shaderHandleStorage));
|
||||
auto* data = static_cast<uint8_t*>(shaderBindingTable.mapped);
|
||||
// Copy the shader identifiers to the shader binding table
|
||||
VkDeviceSize offset = 0;
|
||||
data += copyShaderIdentifier(data, shaderHandleStorage, INDEX_RAYGEN);
|
||||
data += copyShaderIdentifier(data, shaderHandleStorage, INDEX_MISS);
|
||||
data += copyShaderIdentifier(data, shaderHandleStorage, INDEX_SHADOW_MISS);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue