Merge remote-tracking branch 'origin/master' into 1.11

# Conflicts:
#	Source/Engine/Particles/Particles.cpp
This commit is contained in:
Wojtek Figat
2025-07-14 18:35:53 +02:00
17 changed files with 394 additions and 119 deletions

View File

@@ -936,6 +936,7 @@ void Particles::DrawParticles(RenderContext& renderContext, ParticleEffect* effe
if (drawModes == DrawPass::None || SpriteRenderer.Init())
return;
PROFILE_MEM(Particles);
ConcurrentSystemLocker::ReadScope systemScope(SystemLocker);
Matrix worlds[2];
Matrix::Translation(-renderContext.View.Origin, worlds[0]); // World
renderContext.View.GetWorldMatrix(effect->GetTransform(), worlds[1]); // Local
@@ -1068,6 +1069,28 @@ void Particles::DrawParticles(RenderContext& renderContext, ParticleEffect* effe
}
}
#if USE_EDITOR
void Particles::DebugDraw(ParticleEffect* effect)
{
PROFILE_CPU_NAMED("Particles.DrawDebug");
ConcurrentSystemLocker::ReadScope systemScope(SystemLocker);
// Draw all emitters
for (auto& emitterData : effect->Instance.Emitters)
{
const auto buffer = emitterData.Buffer;
if (!buffer)
continue;
auto emitter = buffer->Emitter;
if (!emitter || !emitter->IsLoaded())
continue;
emitter->GraphExecutorCPU.DrawDebug(emitter, effect, emitterData);
}
}
#endif
#if COMPILE_WITH_GPU_PARTICLES
void UpdateGPU(RenderTask* task, GPUContext* context)