fix for emitter without material #1225
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user