Fix regression in particles
This commit is contained in:
@@ -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++)
|
||||||
|
|||||||
@@ -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");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user