This commit is contained in:
halx99 2021-01-27 12:03:42 +08:00
parent 53bbf7368c
commit 472266c25c
1 changed files with 2 additions and 1 deletions

View File

@ -540,7 +540,8 @@ void ParticleBatchNode::setTexture(Texture2D* texture)
void ParticleBatchNode::updateProgramStateTexture()
{
auto texture = _textureAtlas->getTexture();
assert(texture != nullptr);
if (!texture)
return;
auto programState = _customCommand.getPipelineDescriptor().programState;
programState->setTexture(texture->getBackendTexture());
// If the new texture has No premultiplied alpha, AND the blendFunc hasn't been changed, then update it