Cel Shading [WIP]

+ Cel shading shader
+ Shader Manager window
This commit is contained in:
2024-09-24 12:16:22 +02:00
parent d9c9a8f0b5
commit eea4518a0a
13 changed files with 632 additions and 0 deletions

View File

@@ -111,6 +111,17 @@ void imguiManager::WidgetAddObject(ApplicationClass* app)
}
}
void imguiManager::WidgetShaderWindow(ApplicationClass* app)
{
ImGui::Begin("Shader Manager");
// Checkbox for toggling cel shading globally in the application class by calling the SetCelShading function in the application class when the checkbox state changes
ImGui::Checkbox("Enable Cel Shading", &m_EnableCelShading);
app->SetCelShading(m_EnableCelShading);
ImGui::End();
}
void imguiManager::WidgetObjectWindow(ApplicationClass* app)
{
ImGui::Begin("Objects", &showObjectWindow);
@@ -300,6 +311,11 @@ bool imguiManager::ImGuiWidgetRenderer(ApplicationClass* app)
showLightWindow = true;
}
if (ImGui::Button("Open Shader Window"))
{
showShaderWindow = true;
}
ImGui::End();
// Show windows if their corresponding variables are true
@@ -318,6 +334,11 @@ bool imguiManager::ImGuiWidgetRenderer(ApplicationClass* app)
WidgetLightWindow(app);
}
if (showShaderWindow)
{
WidgetShaderWindow(app);
}
//render imgui
Render();