mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Fixed wrong camera being used + materials
This commit is contained in:
@@ -118,7 +118,6 @@ void SceneRenderPipeline::Render(PassRenderContext& ctx)
|
||||
// ... other passes
|
||||
};
|
||||
|
||||
ctx.cameraID = CurrentCameraID;
|
||||
GBufferPipeline.Execute(ctx, pipelineInputs);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,12 +27,12 @@ namespace Nuake
|
||||
// This is what is present on the shader as a structured buffer
|
||||
struct MaterialBufferStruct
|
||||
{
|
||||
bool HasAlbedo;
|
||||
int HasAlbedo;
|
||||
Vector3 AlbedoColor;
|
||||
bool HasNormal;
|
||||
bool HasMetalness;
|
||||
bool HasRoughness;
|
||||
bool HasAO;
|
||||
int HasNormal;
|
||||
int HasMetalness;
|
||||
int HasRoughness;
|
||||
int HasAO;
|
||||
float MetalnessValue;
|
||||
float RoughnessValue;
|
||||
float AoValue;
|
||||
|
||||
@@ -320,6 +320,7 @@ void GPUResources::RecreateBindlessCameras()
|
||||
|
||||
void GPUResources::UpdateBuffers()
|
||||
{
|
||||
// Tranforms
|
||||
{
|
||||
void* mappedData;
|
||||
vmaMapMemory(VulkanAllocator::Get().GetAllocator(), (VkRenderer::Get().GetCurrentFrame().ModelStagingBuffer->GetAllocation()), &mappedData);
|
||||
|
||||
@@ -119,7 +119,7 @@ void VkSceneRenderer::BeginScene(RenderContext inContext)
|
||||
}
|
||||
}
|
||||
|
||||
// All transforms & materials
|
||||
// All transforms & materials`
|
||||
{
|
||||
uint32_t currentIndex = 0;
|
||||
uint32_t currentMaterialIndex = 0;
|
||||
@@ -290,9 +290,10 @@ void VkSceneRenderer::BeginScene(RenderContext inContext)
|
||||
}
|
||||
}
|
||||
|
||||
//passCtx.cameraID = GPUResources::Get().GetBindlessCameraID(Context.CameraID);
|
||||
//GBufferPipeline.Execute(passCtx);
|
||||
|
||||
// Set back the camera ID to the actual desired camera.
|
||||
passCtx.cameraID = GPUResources::Get().GetBindlessCameraID(inContext.CameraID);
|
||||
sceneRenderPipeline->Render(passCtx);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user