~ | Fixing fog lighting acne and denoising not clearing

This commit is contained in:
TheRedShip
2025-03-09 16:01:03 +01:00
committed by tomoron
parent debfa4ea7d
commit ac47d587e6
4 changed files with 12 additions and 7 deletions

View File

@ -200,7 +200,7 @@ void Window::imGuiNewFrame()
ImGui::NewFrame();
}
void Window::imGuiRender(ShaderProgram &raytracing_program)
void Window::imGuiRender(ShaderProgram &raytracing_program, std::vector<GLuint> &textures)
{
bool has_changed = false;
@ -298,7 +298,12 @@ void Window::imGuiRender(ShaderProgram &raytracing_program)
if (ImGui::CollapsingHeader("Denoiser"))
{
ImGui::Checkbox("Enable##1", (bool *)(&_scene->getDenoise().enabled));
if (ImGui::Checkbox("Enable##1", (bool *)(&_scene->getDenoise().enabled)))
{
//clear denoising texture
glClearTexImage(textures[3], 0, GL_RGBA, GL_FLOAT, nullptr);
glClearTexImage(textures[4], 0, GL_RGBA, GL_FLOAT, nullptr);
}
ImGui::Separator();
if (ImGui::SliderInt("Pass", &_scene->getDenoise().pass, 0, 8))
_scene->getDenoise().pass = (_scene->getDenoise().pass / 2) * 2; // make sure it's even