Skip to content

Commit

Permalink
[renderer] moved skysphere after all geometry passes
Browse files Browse the repository at this point in the history
  • Loading branch information
PanosK92 committed Jan 12, 2025
1 parent 63a0fa0 commit 31ca5b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
17 changes: 6 additions & 11 deletions runtime/Rendering/Renderer_Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,6 @@ namespace spartan
RHI_Texture* rt_output = GetRenderTarget(Renderer_RenderTarget::frame_output);

Pass_VariableRateShading(cmd_list_graphics);
Pass_Skysphere(cmd_list_graphics);

// light integration
{
Expand All @@ -401,19 +400,15 @@ namespace spartan
Pass_Depth_Prepass(cmd_list_graphics);
Pass_GBuffer(cmd_list_graphics, is_transparent);

// shadows
// shadow maps
Pass_ShadowMaps(cmd_list_graphics, false);
if (mesh_index_transparent != -1)
{
// shadow maps
Pass_ShadowMaps(cmd_list_graphics, false);
if (mesh_index_transparent != -1)
{
Pass_ShadowMaps(cmd_list_graphics, true);
}

// screen space
Pass_Sss(cmd_list_graphics);
Pass_ShadowMaps(cmd_list_graphics, true);
}

Pass_Skysphere(cmd_list_graphics);
Pass_Sss(cmd_list_graphics);
Pass_Ssr(cmd_list_graphics);
Pass_Ssao(cmd_list_graphics);
Pass_Light(cmd_list_graphics, is_transparent); // compute diffuse and specular buffers
Expand Down
7 changes: 2 additions & 5 deletions runtime/World/Components/PhysicsBody.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,11 +879,8 @@ namespace spartan

case PhysicsShape::Mesh:
{
// get common prerequisites for certain shapes

shared_ptr<Renderable> renderable = GetEntity()->GetComponent<Renderable>();

// get renderable
shared_ptr<Renderable> renderable = GetEntity()->GetComponent<Renderable>();
if (!renderable)
{
SP_LOG_WARNING("PhysicsShape::Mesh requires a renderable component to be present");
Expand Down Expand Up @@ -931,7 +928,7 @@ namespace spartan
}
else
{
geometry_processing::simplify(m_indices, m_vertices, static_cast<size_t>((m_indices.size() / 3) * 0.2f));
geometry_processing::simplify(m_indices, m_vertices, static_cast<size_t>((m_indices.size() / 3) * 0.05f));

// create a btTriangleIndexVertexArray using indices and vertices
btTriangleIndexVertexArray* index_vertex_array = new btTriangleIndexVertexArray(
Expand Down

0 comments on commit 31ca5b5

Please sign in to comment.