Skip to content

Commit

Permalink
[rendering] fixed tree flickering in the forest world
Browse files Browse the repository at this point in the history
  • Loading branch information
PanosK92 committed Dec 3, 2024
1 parent 031363b commit 9ad8f88
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion editor/Widgets/RenderOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ void RenderOptions::OnTickVisible()
// gi
{
// toggle
option_check_box("GI - Global illumination (WIP)", Renderer_Option::GlobalIllumination);
option_check_box("GI - Global illumination", Renderer_Option::GlobalIllumination);

// internal resolution
//float gi_value = Renderer::GetOption<float>(Renderer_Option::GlobalIllumination);
Expand Down
2 changes: 1 addition & 1 deletion runtime/Rendering/Font/Font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ namespace Spartan

void Font::AddText(const string& text, const Vector2& position_screen_percentage)
{
// early exit if the renderer isn't ready
// don't accumulate text if the renderer hasn't rendered a frame yet
if (Renderer::GetFrameNumber() < 1)
return;

Expand Down
6 changes: 6 additions & 0 deletions runtime/Rendering/Renderer_Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,12 @@ namespace Spartan

cmd_list->BeginTimeblock(is_transparent_pass ? "light_composition_transparent" : "light_composition");

// todo: see if this can be done in the shader (to avoid the barrier)
if (is_transparent_pass)
{
cmd_list->ClearTexture(tex_out, Color::standard_transparent);
}

// set pipeline state
static RHI_PipelineState pso;
pso.name = "light_composition_transparent";
Expand Down

0 comments on commit 9ad8f88

Please sign in to comment.