Fixed UI Rendering #326
|
@ -92,11 +92,17 @@ namespace SHADE
|
|||
if (vertShader && fragShader && gfxSystem)
|
||||
{
|
||||
// - Retrieve pipeline from pipeline library
|
||||
auto renderPass = gfxSystem->GetPrimaryRenderpass();
|
||||
auto subPass = renderPass->GetSubpass(currentMatSpec->subpassName);
|
||||
auto pipeline = renderPass->GetOrCreatePipeline({ vertShader, fragShader }, subPass);
|
||||
// - Set Pipeline
|
||||
matHandle->SetPipeline(pipeline);
|
||||
auto subPass = gfxSystem->GetUsableSubpass(currentMatSpec->subpassName);
|
||||
if (subPass)
|
||||
{
|
||||
// Set Pipeline if valid
|
||||
auto pipeline = subPass->GetParentNode()->GetOrCreatePipeline({vertShader, fragShader}, subPass);
|
||||
matHandle->SetPipeline(pipeline);
|
||||
}
|
||||
else
|
||||
{
|
||||
SHLOG_ERROR("[SHMaterialInspector] Failed to find material subpass of type \"{}\"", currentMatSpec->subpassName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -474,7 +474,7 @@ namespace SHADE
|
|||
|
||||
*/
|
||||
/***************************************************************************/
|
||||
Handle<SHRenderGraphNode> const& SHSubpass::GetParentNode(void) const noexcept
|
||||
Handle<SHRenderGraphNode> SHSubpass::GetParentNode(void) const noexcept
|
||||
{
|
||||
return parentNode;
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ namespace SHADE
|
|||
/*-----------------------------------------------------------------------*/
|
||||
void SetCompanionSubpass (Handle<SHSubpass> companion, Handle<SHVkPipeline> pipeline) noexcept;
|
||||
|
||||
Handle<SHRenderGraphNode> const& GetParentNode(void) const noexcept;
|
||||
Handle<SHRenderGraphNode> GetParentNode(void) const noexcept;
|
||||
SHSubPassIndex GetIndex() const noexcept;
|
||||
Handle<SHSuperBatch> GetSuperBatch(void) const noexcept;
|
||||
std::vector<vk::AttachmentReference> const& GetColorAttachmentReferences (void) const noexcept;
|
||||
|
|
|
@ -270,14 +270,8 @@ namespace SHADE
|
|||
return {};
|
||||
}
|
||||
|
||||
// Grab subpass from worldRenderer
|
||||
auto renderPass = gfxSystem->GetPrimaryRenderpass();
|
||||
if (!renderPass)
|
||||
{
|
||||
SHLOG_ERROR("[SHResourceManager] Failed to load material as RenderPass could not be found.");
|
||||
return {};
|
||||
}
|
||||
auto subPass = renderPass->GetSubpass(assetData.subpassName);
|
||||
// Grab subpass
|
||||
auto subPass = gfxSystem->GetUsableSubpass(assetData.subpassName);
|
||||
if (!subPass)
|
||||
{
|
||||
SHLOG_ERROR("[SHResourceManager] Failed to load material as SubPass could not be found.");
|
||||
|
|
Loading…
Reference in New Issue