RT fix (#1069)
* Create bin directory * Fix values for maxVertex Fixes #1068
This commit is contained in:
parent
bb81bbd535
commit
1447348e09
7 changed files with 11 additions and 119 deletions
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Renders a complex scene doing recursion inside the shaders for creating reflections
|
||||
*
|
||||
* Copyright (C) 2019-2020 by Sascha Willems - www.saschawillems.de
|
||||
* Copyright (C) 2019-2023 by Sascha Willems - www.saschawillems.de
|
||||
*
|
||||
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
||||
*/
|
||||
|
|
@ -84,7 +84,6 @@ public:
|
|||
indexBufferDeviceAddress.deviceAddress = getBufferDeviceAddress(scene.indices.buffer);
|
||||
|
||||
uint32_t numTriangles = static_cast<uint32_t>(scene.indices.count) / 3;
|
||||
uint32_t maxVertex = scene.vertices.count;
|
||||
|
||||
// Build
|
||||
VkAccelerationStructureGeometryKHR accelerationStructureGeometry = vks::initializers::accelerationStructureGeometryKHR();
|
||||
|
|
@ -93,7 +92,7 @@ public:
|
|||
accelerationStructureGeometry.geometry.triangles.sType = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR;
|
||||
accelerationStructureGeometry.geometry.triangles.vertexFormat = VK_FORMAT_R32G32B32_SFLOAT;
|
||||
accelerationStructureGeometry.geometry.triangles.vertexData = vertexBufferDeviceAddress;
|
||||
accelerationStructureGeometry.geometry.triangles.maxVertex = maxVertex;
|
||||
accelerationStructureGeometry.geometry.triangles.maxVertex = scene.vertices.count - 1;
|
||||
accelerationStructureGeometry.geometry.triangles.vertexStride = sizeof(vkglTF::Vertex);
|
||||
accelerationStructureGeometry.geometry.triangles.indexType = VK_INDEX_TYPE_UINT32;
|
||||
accelerationStructureGeometry.geometry.triangles.indexData = indexBufferDeviceAddress;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue