fix for emitter without material #1225

This commit is contained in:
Turánszki János
2025-09-27 10:22:38 +02:00
parent bc87457265
commit 80d0acf2ff
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -5946,15 +5946,17 @@ void DrawSoftParticles(
const uint32_t emitterIndex = vis.visibleEmitters[emitterSortingHashes[i] & 0x0000FFFF];
const wi::EmittedParticleSystem& emitter = vis.scene->emitters[emitterIndex];
const Entity entity = vis.scene->emitters.GetEntity(emitterIndex);
const MaterialComponent& material = *vis.scene->materials.GetComponent(entity);
const MaterialComponent* material = vis.scene->materials.GetComponent(entity);
if (material == nullptr)
continue;
if (distortion && emitter.shaderType == wi::EmittedParticleSystem::SOFT_DISTORTION)
{
emitter.Draw(material, cmd);
emitter.Draw(*material, cmd);
}
else if (!distortion && (emitter.shaderType == wi::EmittedParticleSystem::SOFT || emitter.shaderType == wi::EmittedParticleSystem::SOFT_LIGHTING || emitter.shaderType == wi::EmittedParticleSystem::SIMPLE || IsWireRender()))
{
emitter.Draw(material, cmd);
emitter.Draw(*material, cmd);
}
}
}
+1 -1
View File
@@ -9,7 +9,7 @@ namespace wi::version
// minor features, major updates, breaking compatibility changes
const int minor = 71;
// minor bug fixes, alterations, refactors, updates
const int revision = 829;
const int revision = 830;
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);