Faster gizmos update

This commit is contained in:
Enrico Turri committed 2018-06-21 08:37:04 +02:00
commit 550f6e307f
40 files changed
+1414 -752

No files matched your search

+4 -3
View File
@@ -14,6 +14,8 @@ const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
#define INTENSITY_AMBIENT 0.3
uniform mat4 volume_world_matrix;
// x = tainted, y = specular;
varying vec2 intensity;
@@ -38,9 +40,8 @@ void main()
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
// Scaled to widths of the Z texture.
object_z = gl_Vertex.z;
// Scaled to widths of the Z texture.
object_z = (volume_world_matrix * gl_Vertex).z;
gl_Position = ftransform();
}