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
9 changes: 8 additions & 1 deletion Core/Libraries/Source/WWVegas/WW3D2/pointgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,12 @@ void PointGroupClass::Render(RenderInfoClass &rinfo)
DX8Wrapper::Set_Texture(0,Texture);

// 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());
// TheSuperHackers @bugfix stephanmeesters 30/06/2026 However, do not apply sorting to ground-aligned particles.
// This improves performance and resolves rendering artifacts caused by clipping between ground-aligned particles and billboard particles.
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 Expand Up @@ -1836,6 +1841,8 @@ void PointGroupClass::RenderVolumeParticle(RenderInfoClass &rinfo, unsigned int
DX8Wrapper::Set_Texture(0,Texture);

// Enable sorting if the primitives are translucent and alpha testing is not enabled.
// TheSuperHackers @info Volumetric particles, both billboarded and ground-aligned, must have sorting enabled to
// ensure accurate alpha-blending because these particles have stacked layers that don't face the camera straight on.
const bool sort = (Shader.Get_Dst_Blend_Func() != ShaderClass::DSTBLEND_ZERO) && (Shader.Get_Alpha_Test() == ShaderClass::ALPHATEST_DISABLE) && (WW3D::Is_Sorting_Enabled());
Comment thread
greptile-apps[bot] marked this conversation as resolved.

IndexBufferClass *indexbuffer;
Expand Down
Loading