mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 21:29:33 +02:00
Avoid light prop copies when setting globalLight
This commit is contained in:
parent
1817b8ef2f
commit
20bfdba14b
1 changed files with 1 additions and 7 deletions
|
@ -560,13 +560,7 @@ static void loadLightProgram(const char* vertSource, const char* fragSource, boo
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeferredLightingEffect::setGlobalLight(const model::LightPointer& light, const gpu::TexturePointer& skyboxTexture) {
|
void DeferredLightingEffect::setGlobalLight(const model::LightPointer& light, const gpu::TexturePointer& skyboxTexture) {
|
||||||
auto globalLight = _allocatedLights.front();
|
_allocatedLights.front() = light;
|
||||||
globalLight->setDirection(light->getDirection());
|
|
||||||
globalLight->setColor(light->getColor());
|
|
||||||
globalLight->setIntensity(light->getIntensity());
|
|
||||||
globalLight->setAmbientIntensity(light->getAmbientIntensity());
|
|
||||||
globalLight->setAmbientSphere(light->getAmbientSphere());
|
|
||||||
|
|
||||||
_skyboxTexture = skyboxTexture;
|
_skyboxTexture = skyboxTexture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue