Description

Starting with UE 5.4, function FNiagaraRendererRibbons::GenerateDynamicData() from file [NiagaraRendererRibbons.cpp] attempts to calculate DynamicData->MaxAllocatedCountEstimate as such:

DynamicData->MaxAllocationCount = Emitter->GetParticleData().GetMaxAllocationCount();

DynamicData->MaxAllocatedCountEstimate = 0;

if (FVersionedNiagaraEmitterData* EmitterData = Emitter->GetVersionedEmitter().GetEmitterData())

{ DynamicData->MaxAllocatedCountEstimate = FMath::Min<uint32>(EmitterData->GetMaxParticleCountEstimate(), DynamicData->MaxAllocatedCountEstimate); }

Since DynamicData->MaxAllocatedCountEstimate is reset to 0, the result of FMath::Min() below will also be always 0. It is possible (but not verified) that the author meant to use DynamicData->MaxAllocationCount as the second parameter to FMath::Min() instead. Note that this computation was changed by CL 30362379 in ue5-main on December 2023.

The affected variable is used by function FNiagaraRendererRibbons::GenerateIndexBufferForView() as follows:

RenderingViewResources->IndexBuffer = GpuRibbonsDataManager.GetOrAllocateIndexBuffer(RHICmdList, GeneratedData.TotalNumIndices, FMath::Max(GeneratedData.TotalNumIndices, DynamicDataRibbon->MaxAllocatedCountEstimate));

Steps to Reproduce

This bug can be verified by inspecting the code in method FNiagaraRendererRibbons::GenerateDynamicData() from file [NiagaraRendererRibbons.cpp] (see Description).

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-370824 in the post.

0
Login to Vote

Fixed
ComponentUE - Niagara
Affects Versions5.45.8
Target Fix5.8
Fix Commit52103990
Main Commit52104001
CreatedMar 20, 2026
ResolvedMar 24, 2026
UpdatedJun 3, 2026
View Jira Issue