Expose camera position to shader
This commit is contained in:
@@ -147,7 +147,7 @@ namespace openVulkanoCpp::Vulkan
|
||||
vk::CommandBufferInheritanceInfo inheritance = { context.swapChainRenderPass.renderPass, 0, context.swapChainRenderPass.GetFrameBuffer()->GetCurrentFrameBuffer() };
|
||||
cmdHelper->cmdBuffer.begin(vk::CommandBufferBeginInfo{ vk::CommandBufferUsageFlagBits::eOneTimeSubmit | vk::CommandBufferUsageFlagBits::eRenderPassContinue, &inheritance });
|
||||
shader->Record(cmdHelper->cmdBuffer, currentImageId);
|
||||
cmdHelper->cmdBuffer.pushConstants(context.pipeline.pipelineLayout, vk::ShaderStageFlagBits::eVertex, 0, 3 * sizeof(Math::Matrix4f), &scene->GetCamera()->GetViewProjectionMatrix());
|
||||
cmdHelper->cmdBuffer.pushConstants(context.pipeline.pipelineLayout, vk::ShaderStageFlagBits::eVertex, 0, 3 * sizeof(Math::Matrix4f) + sizeof(Math::Vector4f), &scene->GetCamera()->GetViewProjectionMatrix());
|
||||
Scene::Drawable** drawablePointer;
|
||||
while((drawablePointer = jobQueue->Pop()) != nullptr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user