[Bf-blender-cvs] [04992a6ffc7] blender2.8: Object Mode Engine: Fix spot cone shader.

Clément Foucault noreply at git.blender.org
Sat Jun 3 01:43:42 CEST 2017


Commit: 04992a6ffc7062cecb9e9b92c1a00b8b915830a1
Author: Clément Foucault
Date:   Fri Jun 2 12:30:01 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB04992a6ffc7062cecb9e9b92c1a00b8b915830a1

Object Mode Engine: Fix spot cone shader.

===================================================================

M	source/blender/gpu/shaders/gpu_shader_instance_edges_variying_color_vert.glsl

===================================================================

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 {




More information about the Bf-blender-cvs mailing list