Skybox brightness hotfix

This commit is contained in:
2016-06-10 11:59:43 +02:00
parent 31c11f3e1f
commit 04fd3ac0e3
+6 -1
View File
@@ -124,10 +124,15 @@ void Skybox::update(float deltaTime, int curr, int max)
{
targetBrightness = 80 + ((255 - 80) / max) * curr;
if (targetBrightness > brightness)
if (targetBrightness > brightness + 2)
{
brightness += 20 * deltaTime;
}
if (targetBrightness < brightness - 2)
{
brightness -= 20 * deltaTime;
}
}
GLuint Skybox::loadTexture(const std::string & fileName) //load the filename named texture