mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Merge pull request #14124 from SamGondelman/particle
Don't render particles without textures
This commit is contained in:
commit
7b226aa559
1 changed files with 2 additions and 6 deletions
|
@ -320,7 +320,7 @@ void ParticleEffectEntityRenderer::stepSimulation() {
|
|||
}
|
||||
|
||||
void ParticleEffectEntityRenderer::doRender(RenderArgs* args) {
|
||||
if (!_visible) {
|
||||
if (!_visible || !(_networkTexture && _networkTexture->isLoaded())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -328,11 +328,7 @@ void ParticleEffectEntityRenderer::doRender(RenderArgs* args) {
|
|||
stepSimulation();
|
||||
|
||||
gpu::Batch& batch = *args->_batch;
|
||||
if (_networkTexture && _networkTexture->isLoaded()) {
|
||||
batch.setResourceTexture(0, _networkTexture->getGPUTexture());
|
||||
} else {
|
||||
batch.setResourceTexture(0, DependencyManager::get<TextureCache>()->getWhiteTexture());
|
||||
}
|
||||
batch.setResourceTexture(0, _networkTexture->getGPUTexture());
|
||||
|
||||
Transform transform;
|
||||
// The particles are in world space, so the transform is unused, except for the rotation, which we use
|
||||
|
|
Loading…
Reference in a new issue