[Scummvm-git-logs] scummvm master -> 8caf5a04c015a56e888291a8a9446c98bb71c7d3

aquadran aquadran at gmail.com
Mon Oct 18 05:33:10 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8caf5a04c0 STARK: Fixed light direction in OpenGL renderer


Commit: 8caf5a04c015a56e888291a8a9446c98bb71c7d3
    https://github.com/scummvm/scummvm/commit/8caf5a04c015a56e888291a8a9446c98bb71c7d3
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2021-10-18T07:33:05+02:00

Commit Message:
STARK: Fixed light direction in OpenGL renderer

Changed paths:
    engines/stark/gfx/opengl.cpp


diff --git a/engines/stark/gfx/opengl.cpp b/engines/stark/gfx/opengl.cpp
index 954a1d6d9d..d407257f1b 100644
--- a/engines/stark/gfx/opengl.cpp
+++ b/engines/stark/gfx/opengl.cpp
@@ -150,9 +150,9 @@ void OpenGLDriver::setupLights(const LightEntryArray &lights) {
 				lightColor[0] = (GLfloat)l->color.x();
 				lightColor[1] = (GLfloat)l->color.y();
 				lightColor[2] = (GLfloat)l->color.z();
-				lightPos[0] = -(GLfloat)eyeDirection.x();
-				lightPos[1] = -(GLfloat)eyeDirection.y();
-				lightPos[2] = -(GLfloat)eyeDirection.z();
+				lightPos[0] = (GLfloat)eyeDirection.x();
+				lightPos[1] = (GLfloat)eyeDirection.y();
+				lightPos[2] = (GLfloat)eyeDirection.z();
 				lightPos[3] = 0;
 				break;
 			case LightEntry::kSpot:
@@ -162,9 +162,9 @@ void OpenGLDriver::setupLights(const LightEntryArray &lights) {
 				lightPos[0] = (GLfloat)eyePosition.x();
 				lightPos[1] = (GLfloat)eyePosition.y();
 				lightPos[2] = (GLfloat)eyePosition.z();
-				lightDir[0] = -(GLfloat)eyeDirection.x();
-				lightDir[1] = -(GLfloat)eyeDirection.y();
-				lightDir[2] = -(GLfloat)eyeDirection.z();
+				lightDir[0] = (GLfloat)eyeDirection.x();
+				lightDir[1] = (GLfloat)eyeDirection.y();
+				lightDir[2] = (GLfloat)eyeDirection.z();
 				// FIXME
 				l_attenuation = 0.0000001f;
 				q_attenuation = 0.0000001f;




More information about the Scummvm-git-logs mailing list