15 #include <vsg/core/Array.h>
16 #include <vsg/core/Value.h>
17 #include <vsg/raytracing/AccelerationStructure.h>
18 #include <vsg/raytracing/BottomLevelAccelerationStructure.h>
29 uint32_t instanceId : 24;
31 uint32_t instanceOffset : 24;
33 uint64_t accelerationStructureHandle;
49 inst.instanceOffset = shaderOffset;
51 inst.accelerationStructureHandle = accelerationStructure->handle();
53 inst.transform[0] = transform[0][0];
54 inst.transform[1] = transform[1][0];
55 inst.transform[2] = transform[2][0];
56 inst.transform[3] = transform[3][0];
58 inst.transform[4] = transform[0][1];
59 inst.transform[5] = transform[1][1];
60 inst.transform[6] = transform[2][1];
61 inst.transform[7] = transform[3][1];
63 inst.transform[8] = transform[0][2];
64 inst.transform[9] = transform[1][2];
65 inst.transform[10] = transform[2][2];
66 inst.transform[11] = transform[3][2];
74 uint32_t shaderOffset;
80 using GeometryInstances = std::vector<ref_ptr<GeometryInstance>>;
88 void compile(
Context& context)
override;
90 GeometryInstances geometryInstances;
Device encapsulates VkDevice, a logical handle to the PhysicalDevice with capabilities specified duri...
Definition: Device.h:37
GeometryInstance is an instance of a bottom level acceleration structure reference by a top level acc...
Definition: TopLevelAccelerationStructure.h:40
TopLevelAccelerationStructure encapsulates the set up of the top level acceleration structure contain...
Definition: TopLevelAccelerationStructure.h:84
Definition: TopLevelAccelerationStructure.h:27