diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp index d05ece2e..376f19a7 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp @@ -321,18 +321,19 @@ namespace SHADE viewports.erase(iter); } - Handle SHGraphicsSystem::AddMaterial(Handle vertShader, Handle fragShader) + Handle SHGraphicsSystem::AddMaterial(Handle vertShader, Handle fragShader, Handle subpass) { // Retrieve pipeline from pipeline storage or create if unavailable auto shaderPair = std::make_pair(vertShader, fragShader); Handle pipeline = pipelineLibrary.GetDrawPipline(shaderPair); if (!pipeline) - { - /*pipeline = pipelineLibrary.CreateDrawPipeline + { + pipeline = pipelineLibrary.CreateDrawPipeline ( shaderPair, - - );*/ + subpass->GetParentNode()->GetRenderpass(), + subpass->GetIndex() + ); } // Create material diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h index 7dcf12c0..8dad518f 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h @@ -25,11 +25,10 @@ of DigiPen Institute of Technology is prohibited. #include "ECS_Base/System/SHSystemRoutine.h" #include "Graphics/Descriptors/SHVkDescriptorPool.h" #include "Graphics/MiddleEnd/Pipeline/SHPipelineLibrary.h" +#include "Graphics/RenderGraph/SHRenderGraph.h" namespace SHADE { - - /*---------------------------------------------------------------------------------*/ /* Forward Declarations */ /*---------------------------------------------------------------------------------*/ @@ -112,7 +111,7 @@ namespace SHADE /*-----------------------------------------------------------------------------*/ /* Material Creation Functions */ /*-----------------------------------------------------------------------------*/ - Handle AddMaterial(Handle vertShader, Handle fragShader); + Handle AddMaterial(Handle vertShader, Handle fragShader, Handle subpass); void RemoveMaterial(Handle material);; Handle AddMaterialInstance(Handle material); void RemoveMaterialInstance(Handle materialInstance); diff --git a/SHADE_Engine/src/Graphics/RenderGraph/SHRenderGraph.h b/SHADE_Engine/src/Graphics/RenderGraph/SHRenderGraph.h index fb843bc2..377d4a76 100644 --- a/SHADE_Engine/src/Graphics/RenderGraph/SHRenderGraph.h +++ b/SHADE_Engine/src/Graphics/RenderGraph/SHRenderGraph.h @@ -105,6 +105,7 @@ namespace SHADE /* GETTERS AND SETTERS */ /*-----------------------------------------------------------------------*/ Handle const& GetParentNode (void) const noexcept; + SHSubPassIndex GetIndex() const noexcept { return 0; } // TODO private: /*---------------------------------------------------------------------*/