mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-29 07:19:28 -05:00
Fix bug with incorrect lighting for RenderableModels
This commit is contained in:
@@ -217,7 +217,7 @@ void RenderableModel::render(const RenderData& data, RendererTasks&) {
|
||||
_sunPos - data.modelTransform.translation
|
||||
);
|
||||
const glm::vec3 directionToSunViewSpace =
|
||||
glm::mat3(data.camera.combinedViewMatrix()) * directionToSun;
|
||||
glm::normalize(glm::mat3(data.camera.combinedViewMatrix()) * directionToSun);
|
||||
|
||||
_programObject->setUniform(
|
||||
_uniformCache.directionToSunViewSpace,
|
||||
|
||||
Reference in New Issue
Block a user