Try to fix directional lights
This commit is contained in:
parent
0d0beface3
commit
8ef04be966
|
@ -279,11 +279,7 @@ void _glCalculateLightingContribution(const GLint light, const GLfloat* pos, con
|
||||||
l->position[2]
|
l->position[2]
|
||||||
};
|
};
|
||||||
|
|
||||||
if(l->is_directional) {
|
if(!l->is_directional) {
|
||||||
L.x *= -1.0f;
|
|
||||||
L.y *= -1.0f;
|
|
||||||
L.z *= -1.0f;
|
|
||||||
} else {
|
|
||||||
L.x -= pos[0];
|
L.x -= pos[0];
|
||||||
L.y -= pos[1];
|
L.y -= pos[1];
|
||||||
L.z -= pos[2];
|
L.z -= pos[2];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user