Skip to content

Commit 69ba991

Browse files
Merge pull request #193 from Devsh-Graphics-Programming/asset_conv_ray_query_geom
Added using tlas/blas asset converter
2 parents 825c73d + c2023df commit 69ba991

File tree

3 files changed

+330
-499
lines changed

3 files changed

+330
-499
lines changed

67_RayQueryGeometry/app_resources/common.hlsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ struct SGeomInfo
1414
uint32_t vertexStride : 29;
1515
uint32_t indexType : 2; // 16 bit, 32 bit or none
1616
uint32_t smoothNormals : 1; // flat for cube, rectangle, disk
17+
uint32_t padding;
1718
};
1819

1920
struct SPushConstants

67_RayQueryGeometry/app_resources/render.comp.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ void main(uint32_t3 threadID : SV_DispatchThreadID)
125125
const int primID = spirv::rayQueryGetIntersectionPrimitiveIndexKHR(query, true);
126126

127127
// TODO: candidate for `bda::__ptr<SGeomInfo>`
128-
const SGeomInfo geom = vk::RawBufferLoad<SGeomInfo>(pc.geometryInfoBuffer + instID * sizeof(SGeomInfo));
129-
128+
const SGeomInfo geom = vk::RawBufferLoad<SGeomInfo>(pc.geometryInfoBuffer + instID * sizeof(SGeomInfo),8);
129+
130130
float3 normals;
131131
if (jit::device_capabilities::rayTracingPositionFetch)
132132
{

0 commit comments

Comments
 (0)