diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-10 02:57:42 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-10 13:25:16 +0300 |
commit | 632e0725d27271f95073f668a24bcf06f603f001 (patch) | |
tree | 6980992db3d05f25aff27646bad1e3a01827153b /source/blender/draw/modes/shaders/edit_curve_overlay_loosevert_vert.glsl | |
parent | 6006f86e07c5732f72015d500ce3e066464e2baa (diff) |
Overlays: Use common_view_lib.glsl
This removes ModelViewProjectionMatrix usage
Diffstat (limited to 'source/blender/draw/modes/shaders/edit_curve_overlay_loosevert_vert.glsl')
-rw-r--r-- | source/blender/draw/modes/shaders/edit_curve_overlay_loosevert_vert.glsl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/draw/modes/shaders/edit_curve_overlay_loosevert_vert.glsl b/source/blender/draw/modes/shaders/edit_curve_overlay_loosevert_vert.glsl index 4718f11db65..16975187176 100644 --- a/source/blender/draw/modes/shaders/edit_curve_overlay_loosevert_vert.glsl +++ b/source/blender/draw/modes/shaders/edit_curve_overlay_loosevert_vert.glsl @@ -1,6 +1,6 @@ /* Draw Curve Vertices */ -uniform mat4 ModelViewProjectionMatrix; uniform mat4 ModelMatrix; + uniform vec2 viewportSize; in vec3 pos; @@ -22,10 +22,10 @@ void main() finalColor = colorVertex; } - vec4 pos_4d = vec4(pos, 1.0); - gl_Position = ModelViewProjectionMatrix * pos_4d; + vec3 world_pos = point_object_to_world(pos); + gl_Position = point_world_to_ndc(world_pos); gl_PointSize = sizeVertex * 2.0; #ifdef USE_WORLD_CLIP_PLANES - world_clip_planes_calc_clip_distance((ModelMatrix * pos_4d).xyz); + world_clip_planes_calc_clip_distance(world_pos); #endif } |