Fix shader warning

This commit is contained in:
Wojtek Figat
2025-11-15 22:13:22 +01:00
parent 2f670495ac
commit ac3b2c0ef2

View File

@@ -32,8 +32,8 @@ struct BVHHit
float3 LoadVertexBVH(BVHBuffers bvh, uint index)
{
index = bvh.IndexBuffer.Load(index << 2u);
return asfloat(bvh.VertexBuffer.Load3(index * bvh.VertexStride));
uint vertexIndex = bvh.IndexBuffer.Load(index << 2u);
return asfloat(bvh.VertexBuffer.Load3(vertexIndex * bvh.VertexStride));
}
// [https://tavianator.com/2011/ray_box.html]