mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 06:42:57 +02:00
don't render particles without textures
This commit is contained in:
parent
130e8dfbe9
commit
1ec481922c
1 changed files with 2 additions and 6 deletions
|
@ -310,7 +310,7 @@ void ParticleEffectEntityRenderer::stepSimulation() {
|
|||
}
|
||||
|
||||
void ParticleEffectEntityRenderer::doRender(RenderArgs* args) {
|
||||
if (!_visible) {
|
||||
if (!_visible || !(_networkTexture && _networkTexture->isLoaded())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -318,11 +318,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