Skybox brightness hotfix
This commit is contained in:
+6
-1
@@ -124,10 +124,15 @@ void Skybox::update(float deltaTime, int curr, int max)
|
|||||||
{
|
{
|
||||||
targetBrightness = 80 + ((255 - 80) / max) * curr;
|
targetBrightness = 80 + ((255 - 80) / max) * curr;
|
||||||
|
|
||||||
if (targetBrightness > brightness)
|
if (targetBrightness > brightness + 2)
|
||||||
{
|
{
|
||||||
brightness += 20 * deltaTime;
|
brightness += 20 * deltaTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (targetBrightness < brightness - 2)
|
||||||
|
{
|
||||||
|
brightness -= 20 * deltaTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GLuint Skybox::loadTexture(const std::string & fileName) //load the filename named texture
|
GLuint Skybox::loadTexture(const std::string & fileName) //load the filename named texture
|
||||||
|
|||||||
Reference in New Issue
Block a user