]> git.localhorst.tv Git - blobs.git/commitdiff
old glm? or maybe compiler?
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 10 Dec 2017 17:03:38 +0000 (18:03 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 10 Dec 2017 17:03:38 +0000 (18:03 +0100)
src/app/states.cpp

index 5e3642b6bb4433cd7073df99daa22c9f163641d9..68c66f2f3d29d6c3ac9c35cf1f83206d30646d03 100644 (file)
@@ -190,9 +190,9 @@ void MasterState::OnRender(graphics::Viewport &viewport) {
                // TODO: source sun's light color and strength
                glm::vec3 pos(cam.View() * cam.Model(*sun)[3]);
                assets.shaders.planet_surface.Activate();
-               assets.shaders.planet_surface.SetLight(num_lights, pos, sun->Color(), sun->Luminosity());
+               assets.shaders.planet_surface.SetLight(num_lights, pos, glm::vec3(sun->Color()), float(sun->Luminosity()));
                assets.shaders.creature_skin.Activate();
-               assets.shaders.creature_skin.SetLight(num_lights, pos, sun->Color(), sun->Luminosity());
+               assets.shaders.creature_skin.SetLight(num_lights, pos, glm::vec3(sun->Color()), float(sun->Luminosity()));
                ++num_lights;
                if (num_lights >= graphics::PlanetSurface::MAX_LIGHTS || num_lights >= graphics::CreatureSkin::MAX_LIGHTS) {
                        break;