fix(vfx): classify hardwareless particle emitters once
This commit is contained in:
parent
921712f412
commit
5b3fb17775
8 changed files with 374 additions and 18 deletions
|
|
@ -176,8 +176,29 @@ public sealed class ParticleSystem : IParticleSystem
|
|||
ParticleRenderPass renderPass,
|
||||
ParticleVisibilityPolicy visibilityPolicy,
|
||||
out int handle)
|
||||
=> TrySpawnEmitterById(
|
||||
emitterId,
|
||||
anchor,
|
||||
rot,
|
||||
attachedObjectId,
|
||||
attachedPartIndex,
|
||||
renderPass,
|
||||
visibilityPolicy,
|
||||
out handle,
|
||||
out _);
|
||||
|
||||
public bool TrySpawnEmitterById(
|
||||
uint emitterId,
|
||||
Vector3 anchor,
|
||||
Quaternion? rot,
|
||||
uint attachedObjectId,
|
||||
int attachedPartIndex,
|
||||
ParticleRenderPass renderPass,
|
||||
ParticleVisibilityPolicy visibilityPolicy,
|
||||
out int handle,
|
||||
out EmitterDescResolutionFailure failure)
|
||||
{
|
||||
if (!_registry.TryGet(emitterId, out EmitterDesc? desc))
|
||||
if (!_registry.TryGet(emitterId, out EmitterDesc? desc, out failure))
|
||||
{
|
||||
handle = 0;
|
||||
return false;
|
||||
|
|
@ -191,6 +212,7 @@ public sealed class ParticleSystem : IParticleSystem
|
|||
attachedPartIndex,
|
||||
renderPass,
|
||||
visibilityPolicy);
|
||||
failure = EmitterDescResolutionFailure.None;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue