mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 01:03:58 +02: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) {
|
void ParticleEffectEntityRenderer::doRender(RenderArgs* args) {
|
||||||
if (!_visible) {
|
if (!_visible || !(_networkTexture && _networkTexture->isLoaded())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,11 +328,7 @@ void ParticleEffectEntityRenderer::doRender(RenderArgs* args) {
|
||||||
stepSimulation();
|
stepSimulation();
|
||||||
|
|
||||||
gpu::Batch& batch = *args->_batch;
|
gpu::Batch& batch = *args->_batch;
|
||||||
if (_networkTexture && _networkTexture->isLoaded()) {
|
|
||||||
batch.setResourceTexture(0, _networkTexture->getGPUTexture());
|
batch.setResourceTexture(0, _networkTexture->getGPUTexture());
|
||||||
} else {
|
|
||||||
batch.setResourceTexture(0, DependencyManager::get<TextureCache>()->getWhiteTexture());
|
|
||||||
}
|
|
||||||
|
|
||||||
Transform transform;
|
Transform transform;
|
||||||
// The particles are in world space, so the transform is unused, except for the rotation, which we use
|
// The particles are in world space, so the transform is unused, except for the rotation, which we use
|
||||||
|
|
Loading…
Reference in a new issue