ADD: Docs and shader optim

This commit is contained in:
2025-12-25 22:09:02 +09:00
parent 0172996e12
commit d6216b20fc
16 changed files with 1178 additions and 60 deletions

View File

@@ -195,6 +195,12 @@ void TransparentPass::draw_transparent(VkCommandBuffer cmd,
}
GPUDrawPushConstants push{};
push.worldMatrix = r.transform;
{
const glm::mat3 n = glm::transpose(glm::inverse(glm::mat3(r.transform)));
push.normalMatrix[0] = glm::vec4(n[0], 0.0f);
push.normalMatrix[1] = glm::vec4(n[1], 0.0f);
push.normalMatrix[2] = glm::vec4(n[2], 0.0f);
}
push.vertexBuffer = r.vertexBufferAddress;
push.objectID = r.objectID;
vkCmdPushConstants(cmd, r.material->pipeline->layout,