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/paint_vertex_vert.glsl | |
parent | 6006f86e07c5732f72015d500ce3e066464e2baa (diff) |
Overlays: Use common_view_lib.glsl
This removes ModelViewProjectionMatrix usage
Diffstat (limited to 'source/blender/draw/modes/shaders/paint_vertex_vert.glsl')
-rw-r--r-- | source/blender/draw/modes/shaders/paint_vertex_vert.glsl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/modes/shaders/paint_vertex_vert.glsl b/source/blender/draw/modes/shaders/paint_vertex_vert.glsl index 54f6d1a4aea..871f52b9df3 100644 --- a/source/blender/draw/modes/shaders/paint_vertex_vert.glsl +++ b/source/blender/draw/modes/shaders/paint_vertex_vert.glsl @@ -1,5 +1,4 @@ -uniform mat4 ModelViewProjectionMatrix; uniform mat4 ModelMatrix; in vec3 pos; @@ -17,11 +16,12 @@ vec3 srgb_to_linear_attr(vec3 c) void main() { - gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0); + vec3 world_pos = point_object_to_world(pos); + gl_Position = point_world_to_ndc(world_pos); finalColor = srgb_to_linear_attr(c); #ifdef USE_WORLD_CLIP_PLANES - world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz); + world_clip_planes_calc_clip_distance(world_pos); #endif } |