mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 16:41:02 +02:00
Add static consts for default skybox values
This commit is contained in:
parent
c47a5c5aad
commit
4c662b0d60
1 changed files with 9 additions and 4 deletions
|
@ -4264,13 +4264,18 @@ namespace render {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static const glm::vec3 DEFAULT_SKYBOX_COLOR { 255.0f / 255.0f, 220.0f / 255.0f, 194.0f / 255.0f };
|
||||||
|
static const float DEFAULT_SKYBOX_INTENSITY { 0.2f };
|
||||||
|
static const float DEFAULT_SKYBOX_AMBIENT_INTENSITY { 3.5f };
|
||||||
|
static const glm::vec3 DEFAULT_SKYBOX_DIRECTION { 0.0f, 0.0f, -1.0f };
|
||||||
|
|
||||||
auto scene = DependencyManager::get<SceneScriptingInterface>()->getStage();
|
auto scene = DependencyManager::get<SceneScriptingInterface>()->getStage();
|
||||||
auto sceneKeyLight = scene->getKeyLight();
|
auto sceneKeyLight = scene->getKeyLight();
|
||||||
scene->setSunModelEnable(false);
|
scene->setSunModelEnable(false);
|
||||||
sceneKeyLight->setColor(glm::vec3(255.0f / 255.0f, 220.0f / 255.0f, 194.0f / 255.0f) * 0.2f);
|
sceneKeyLight->setColor(DEFAULT_SKYBOX_COLOR);
|
||||||
sceneKeyLight->setIntensity(0.2f);
|
sceneKeyLight->setIntensity(DEFAULT_SKYBOX_INTENSITY);
|
||||||
sceneKeyLight->setAmbientIntensity(3.5f);
|
sceneKeyLight->setAmbientIntensity(DEFAULT_SKYBOX_AMBIENT_INTENSITY);
|
||||||
sceneKeyLight->setDirection({ 0.0f, 0.0f, -1.0f });
|
sceneKeyLight->setDirection(DEFAULT_SKYBOX_DIRECTION);
|
||||||
|
|
||||||
auto defaultSkyboxAmbientTexture = qApp->getDefaultSkyboxAmbientTexture();
|
auto defaultSkyboxAmbientTexture = qApp->getDefaultSkyboxAmbientTexture();
|
||||||
sceneKeyLight->setAmbientSphere(defaultSkyboxAmbientTexture->getIrradiance());
|
sceneKeyLight->setAmbientSphere(defaultSkyboxAmbientTexture->getIrradiance());
|
||||||
|
|
Loading…
Reference in a new issue