diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-06-02 13:30:01 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-06-03 01:54:01 +0300 |
commit | 04992a6ffc7062cecb9e9b92c1a00b8b915830a1 (patch) | |
tree | 023a547033e0283d3220355b87d6d387e1028a1d /source/blender/gpu | |
parent | 68e5c082b8dc0472dc7c9d870c68497d88bc4f19 (diff) |
Object Mode Engine: Fix spot cone shader.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_instance_edges_variying_color_vert.glsl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_instance_edges_variying_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_instance_edges_variying_color_vert.glsl index 5d1e949c1d4..94cd960872a 100644 --- a/source/blender/gpu/shaders/gpu_shader_instance_edges_variying_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_instance_edges_variying_color_vert.glsl @@ -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 { |