instance transform
This commit is contained in:
parent
642cef78b1
commit
83bb8ebd61
4 changed files with 17 additions and 10 deletions
|
|
@ -28,14 +28,6 @@ using namespace Crafter;
|
|||
std::vector<RenderingElement3DVulkan> RenderingElement3DVulkan::elements;
|
||||
|
||||
RenderingElement3DVulkan::RenderingElement3DVulkan(Mesh& mesh) {
|
||||
VkTransformMatrixKHR identity{};
|
||||
float tmp[3][4] = {
|
||||
{1.f, 0.f, 0.f, 0.f},
|
||||
{0.f, 1.f, 0.f, 0.f},
|
||||
{0.f, 0.f, 1.f, 0.f}
|
||||
};
|
||||
std::memcpy(identity.matrix, tmp, sizeof(tmp));
|
||||
|
||||
VkAccelerationStructureDeviceAddressInfoKHR addrInfo {
|
||||
.sType = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR,
|
||||
.accelerationStructure = mesh.accelerationStructure
|
||||
|
|
@ -43,7 +35,6 @@ RenderingElement3DVulkan::RenderingElement3DVulkan(Mesh& mesh) {
|
|||
VkDeviceAddress blasDeviceAddr = VulkanDevice::vkGetAccelerationStructureDeviceAddressKHR(VulkanDevice::device, &addrInfo);
|
||||
|
||||
instance = {
|
||||
.transform = identity,
|
||||
.instanceCustomIndex = 0,
|
||||
.mask = 0xFF,
|
||||
.instanceShaderBindingTableRecordOffset = 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue