Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Core/Libraries/Source/WWVegas/WW3D2/pointgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -926,8 +926,14 @@ void PointGroupClass::Render(RenderInfoClass &rinfo)
DX8Wrapper::Set_Shader(Shader);
DX8Wrapper::Set_Texture(0,Texture);

// TheSuperHackers @perf stephanmeesters 27/06/2026
// Enable sorting if the primitives are translucent and alpha testing is not enabled.
const bool sort = (Shader.Get_Dst_Blend_Func() != ShaderClass::DSTBLEND_ZERO) && (Shader.Get_Alpha_Test() == ShaderClass::ALPHATEST_DISABLE) && (WW3D::Is_Sorting_Enabled());
// However, do not apply sorting for ground-aligned (i.e. non-billboard) particles.
// This is for performance reasons and because ground-aligned particles do not generally benefit from back-to-front sorting.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also mention the visual improvement?

const bool sort = Billboard &&
Shader.Get_Dst_Blend_Func() != ShaderClass::DSTBLEND_ZERO &&
Shader.Get_Alpha_Test() == ShaderClass::ALPHATEST_DISABLE &&
WW3D::Is_Sorting_Enabled();

IndexBufferClass *indexbuffer;
int verticesperprimitive;/// lorenzen fixed
Expand Down
Loading