Skip to content

Commit

Permalink
[Renderer] Fixed a bug where the BRDF specular lut would not always g…
Browse files Browse the repository at this point in the history
…enerate on engine startup, therefore causing surfaces to have zero specular energy, which resulted in them having no reflections
  • Loading branch information
PanosK92 committed Dec 19, 2023
1 parent 0507c52 commit 920ac30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/Rendering/Renderer_Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ namespace Spartan
if (!m_brdf_specular_lut_rendered)
{
Pass_BrdfSpecularLut(cmd_list);
m_brdf_specular_lut_rendered = true;
}

if (shared_ptr<Camera> camera = GetCamera())
Expand Down Expand Up @@ -2361,6 +2360,8 @@ namespace Spartan
cmd_list->Dispatch(thread_group_count_x(tex_brdf_specular_lut), thread_group_count_y(tex_brdf_specular_lut));

cmd_list->EndTimeblock();

m_brdf_specular_lut_rendered = true;
}

void Renderer::Pass_GenerateMips(RHI_CommandList* cmd_list, RHI_Texture* texture)
Expand Down

0 comments on commit 920ac30

Please sign in to comment.