Object Mode Engine: Fix spot cone shader.

This commit is contained in:
Clément Foucault 2017-06-02 12:30:01 +02:00
parent 68e5c082b8
commit 04992a6ffc
1 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@
// shader to resolve this properly.
uniform mat4 ViewMatrix;
uniform mat4 ProjectionMatrix;
in vec3 pos;
in vec3 N1, N2; // normals of faces this edge joins (object coords)
@ -43,7 +44,7 @@ void main()
NormalMatrix = transpose(inverse(mat3(ModelViewMatrix)));
/* if persp */
if (ViewMatrix[3][3] == 0.0) {
if (ProjectionMatrix[3][3] == 0.0) {
eye = normalize(-MV_pos.xyz);
}
else {