Fix regression in particles

This commit is contained in:
Wojtek Figat
2025-01-11 22:45:04 +01:00
parent 647d74af0d
commit b71f803554
2 changed files with 6 additions and 9 deletions

View File

@@ -424,15 +424,12 @@ Asset::LoadResult ParticleSystem::load()
Emitters[i]->WaitForLoaded(); Emitters[i]->WaitForLoaded();
} }
if (version <= 3) // Load parameters overrides
{ int32 overridesCount = 0;
// [Deprecated on 03.09.2021 expires on 03.09.2023] if (stream.CanRead())
}
else
{
// Load parameters overrides
int32 overridesCount = 0;
stream.ReadInt32(&overridesCount); stream.ReadInt32(&overridesCount);
if (overridesCount != 0)
{
EmitterParameterOverrideKey key; EmitterParameterOverrideKey key;
Variant value; Variant value;
for (int32 i = 0; i < overridesCount; i++) for (int32 i = 0; i < overridesCount; i++)

View File

@@ -620,7 +620,7 @@ void DrawEmitterGPU(RenderContext& renderContext, ParticleBuffer* buffer, DrawCa
auto emitter = buffer->Emitter; auto emitter = buffer->Emitter;
// Check if need to perform any particles sorting // Check if need to perform any particles sorting
if (emitter->Graph.SortModules.HasItems() && renderContext.View.Pass != DrawPass::Depth) if (emitter->Graph.SortModules.HasItems() && renderContext.View.Pass != DrawPass::Depth && buffer->GPU.ParticlesCountMax != 0)
{ {
PROFILE_GPU_CPU_NAMED("Sort Particles"); PROFILE_GPU_CPU_NAMED("Sort Particles");