Debug Draw fixes

This commit is contained in:
Kah Wei 2022-11-01 20:32:35 +08:00
parent 2108d9e1f6
commit 0096bc4975
2 changed files with 14 additions and 0 deletions

View File

@ -26,6 +26,11 @@ of DigiPen Institute of Technology is prohibited.
namespace SHADE
{
/*---------------------------------------------------------------------------------*/
/* Forward Declarations */
/*---------------------------------------------------------------------------------*/
class SHVkBuffer;
/*---------------------------------------------------------------------------------*/
/* Type Definitions */
/*---------------------------------------------------------------------------------*/

View File

@ -131,6 +131,9 @@ namespace SHADE
shaderSourceLibrary.LoadShader(4, "DebugDrawVs.glsl", SH_SHADER_TYPE::VERTEX, true);
shaderSourceLibrary.LoadShader(5, "DebugDrawFs.glsl", SH_SHADER_TYPE::FRAGMENT, true);
shaderSourceLibrary.LoadShader(3, "DebugDrawVs.glsl", SH_SHADER_TYPE::VERTEX, true);
shaderSourceLibrary.LoadShader(4, "DebugDrawFs.glsl", SH_SHADER_TYPE::FRAGMENT, true);
shaderModuleLibrary.ImportFromSourceLibrary(device, shaderSourceLibrary);
auto cubeVS = shaderModuleLibrary.GetShaderModule("TestCubeVs.glsl");
auto cubeFS = shaderModuleLibrary.GetShaderModule("TestCubeFs.glsl");
@ -214,6 +217,11 @@ namespace SHADE
auto dummySubpass = dummyNode->AddSubpass("Dummy Subpass");
dummySubpass->AddInput("Scene");
// Set up Debug Draw Pass
auto debugDrawNode = worldRenderGraph->AddNode("Debug Draw", { "Scene" }, {"G-Buffer"});
auto debugDrawSubpass = debugDrawNode->AddSubpass("Debug Draw");
debugDrawSubpass->AddColorOutput("Scene");
// Generate world render graph
worldRenderGraph->Generate();
@ -223,6 +231,7 @@ namespace SHADE
worldRenderer->SetCameraDirector(cameraSystem->CreateDirector());
// Create default material
auto cubeVS = shaderModuleLibrary.GetShaderModule("TestCubeVs.glsl");
auto cubeFS = shaderModuleLibrary.GetShaderModule("TestCubeFs.glsl");