Description

This problem looks like the following parameters are not defined correctly. The correct parameter is Engine_Emitter_NumParticles.
Engine_Emitter_NumParticles and PREV_Engine_Emitter_NumParticles

.\Engine\Plugins\FX\Niagara\Source\NiagaraShader\Public\NiagaraShader.h

SHADER_PARAMETER(int32, Engine_Emitter_NumParticle)
SHADER_PARAMETER(int32, PREV_Engine_Emitter_NumParticle) 

Changing to the following will work correctly.

SHADER_PARAMETER(int32, Engine_Emitter_NumParticles)
SHADER_PARAMETER(int32, PREV_Engine_Emitter_NumParticles) 

[Image Removed]

 

Steps to Reproduce
  1. Create a Niagara System that Gets Engine.Emitter.NumParticles.
    [Image Removed]
    Below is a project to reproduce.
    https://udn.unrealengine.com/s/contentdocument/0694z00000QWV6RAAX
  2. Check the values in the Attribute Spreadsheet.
    0 is output with GPU Compute Sim.
    [Image Removed]
    For CPU Sim it can get the correct value.
    [Image Removed]

Have Comments or More Details?

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

1
Login to Vote

Fixed
ComponentUE - Niagara
Affects Versions5.2
Target Fix5.4
Fix Commit28359800
Main Commit28359812
CreatedJul 27, 2023
ResolvedSep 29, 2023
UpdatedOct 13, 2023