Skip to content

Commit 7dc00bc

Browse files
committed
[renderer] moved skysphere after all geometry passes
1 parent ca1feae commit 7dc00bc

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

runtime/Rendering/Renderer_Passes.cpp

+6-11
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,6 @@ namespace spartan
377377
RHI_Texture* rt_output = GetRenderTarget(Renderer_RenderTarget::frame_output);
378378

379379
Pass_VariableRateShading(cmd_list_graphics);
380-
Pass_Skysphere(cmd_list_graphics);
381380

382381
// light integration
383382
{
@@ -401,19 +400,15 @@ namespace spartan
401400
Pass_Depth_Prepass(cmd_list_graphics);
402401
Pass_GBuffer(cmd_list_graphics, is_transparent);
403402

404-
// shadows
403+
// shadow maps
404+
Pass_ShadowMaps(cmd_list_graphics, false);
405+
if (mesh_index_transparent != -1)
405406
{
406-
// shadow maps
407-
Pass_ShadowMaps(cmd_list_graphics, false);
408-
if (mesh_index_transparent != -1)
409-
{
410-
Pass_ShadowMaps(cmd_list_graphics, true);
411-
}
412-
413-
// screen space
414-
Pass_Sss(cmd_list_graphics);
407+
Pass_ShadowMaps(cmd_list_graphics, true);
415408
}
416409

410+
Pass_Skysphere(cmd_list_graphics);
411+
Pass_Sss(cmd_list_graphics);
417412
Pass_Ssr(cmd_list_graphics);
418413
Pass_Ssao(cmd_list_graphics);
419414
Pass_Light(cmd_list_graphics, is_transparent); // compute diffuse and specular buffers

runtime/World/Components/PhysicsBody.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -879,11 +879,8 @@ namespace spartan
879879

880880
case PhysicsShape::Mesh:
881881
{
882-
// get common prerequisites for certain shapes
883-
884-
shared_ptr<Renderable> renderable = GetEntity()->GetComponent<Renderable>();
885-
886882
// get renderable
883+
shared_ptr<Renderable> renderable = GetEntity()->GetComponent<Renderable>();
887884
if (!renderable)
888885
{
889886
SP_LOG_WARNING("PhysicsShape::Mesh requires a renderable component to be present");
@@ -931,7 +928,7 @@ namespace spartan
931928
}
932929
else
933930
{
934-
geometry_processing::simplify(m_indices, m_vertices, static_cast<size_t>((m_indices.size() / 3) * 0.2f));
931+
geometry_processing::simplify(m_indices, m_vertices, static_cast<size_t>((m_indices.size() / 3) * 0.05f));
935932

936933
// create a btTriangleIndexVertexArray using indices and vertices
937934
btTriangleIndexVertexArray* index_vertex_array = new btTriangleIndexVertexArray(

0 commit comments

Comments
 (0)