You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
objVertices.size() - 1 is assigned to triangles.maxVertex. Since objVertices is a vector of floats instead of a vector of vertices, the size of objVertices indicates total number of floats (3x number of vertices).
maxVertex is the highest index of a vertex that will be addressed by a build command using this structure.
So objVertices.size() / 3 - 1 should be the correct value if I got it right.
BTW, it is also confusing that Vulkan uses highest index of a vertex instead of number of vertices, while the DirectX API uses VertexCount in D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC struct. Does anyone know why?
The text was updated successfully, but these errors were encountered:
Hi shiuang! I think you're correct - I've fixed this upstream, and this should be included in the next nvpro-samples bulk update (I'll close the issue then). I don't know about the VertexCount difference, unfortunately!
In
vk_mini_path_tracer/vk_mini_path_tracer/main.cpp
Line 143 in 6095e1d
objVertices.size() - 1 is assigned to triangles.maxVertex. Since objVertices is a vector of floats instead of a vector of vertices, the size of objVertices indicates total number of floats (3x number of vertices).
In Vulkan specs
So objVertices.size() / 3 - 1 should be the correct value if I got it right.
BTW, it is also confusing that Vulkan uses highest index of a vertex instead of number of vertices, while the DirectX API uses VertexCount in D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC struct. Does anyone know why?
The text was updated successfully, but these errors were encountered: