Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e3d2484 authored by Martin Storsjo's avatar Martin Storsjo Committed by Mathias Agopian
Browse files

Calculate specular lighting correctly

Since the lighting calculations are done in object space, the vector
from the object to the viewer also needs to be transformed to object
space.
parent 1beb760d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -287,6 +287,7 @@ struct light_t {
    vec4_t      normalizedObjPosition;
    vec4_t      spotDir;
    vec4_t      normalizedSpotDir;
    vec4_t      objViewer;
    GLfixed     spotExp;
    GLfixed     spotCutoff;
    GLfixed     spotCutoffCosine;