Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-05-10 02:57:42 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-05-10 13:25:16 +0300
commit632e0725d27271f95073f668a24bcf06f603f001 (patch)
tree6980992db3d05f25aff27646bad1e3a01827153b /source/blender/draw/modes/shaders/edit_curve_overlay_normals_vert.glsl
parent6006f86e07c5732f72015d500ce3e066464e2baa (diff)
Overlays: Use common_view_lib.glsl
This removes ModelViewProjectionMatrix usage
Diffstat (limited to 'source/blender/draw/modes/shaders/edit_curve_overlay_normals_vert.glsl')
-rw-r--r--source/blender/draw/modes/shaders/edit_curve_overlay_normals_vert.glsl8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/draw/modes/shaders/edit_curve_overlay_normals_vert.glsl b/source/blender/draw/modes/shaders/edit_curve_overlay_normals_vert.glsl
index 02244086711..b746c8d0a74 100644
--- a/source/blender/draw/modes/shaders/edit_curve_overlay_normals_vert.glsl
+++ b/source/blender/draw/modes/shaders/edit_curve_overlay_normals_vert.glsl
@@ -1,6 +1,6 @@
/* Draw Curve Normals */
-uniform mat4 ModelViewProjectionMatrix;
uniform mat4 ModelMatrix;
+
uniform float normalSize;
in vec3 pos;
@@ -18,10 +18,10 @@ void main()
final_pos += normalSize * rad * (flip * nor - tan);
}
- vec4 final_pos_4d = vec4(final_pos, 1.0);
- gl_Position = ModelViewProjectionMatrix * final_pos_4d;
+ vec3 world_pos = point_object_to_world(final_pos);
+ gl_Position = point_world_to_ndc(world_pos);
#ifdef USE_WORLD_CLIP_PLANES
- world_clip_planes_calc_clip_distance((ModelMatrix * final_pos_4d).xyz);
+ world_clip_planes_calc_clip_distance(world_pos);
#endif
}