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/paint_weight_vert.glsl
parent6006f86e07c5732f72015d500ce3e066464e2baa (diff)
Overlays: Use common_view_lib.glsl
This removes ModelViewProjectionMatrix usage
Diffstat (limited to 'source/blender/draw/modes/shaders/paint_weight_vert.glsl')
-rw-r--r--source/blender/draw/modes/shaders/paint_weight_vert.glsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/modes/shaders/paint_weight_vert.glsl b/source/blender/draw/modes/shaders/paint_weight_vert.glsl
index e95b116df79..fb0e6c535d1 100644
--- a/source/blender/draw/modes/shaders/paint_weight_vert.glsl
+++ b/source/blender/draw/modes/shaders/paint_weight_vert.glsl
@@ -1,5 +1,4 @@
-uniform mat4 ModelViewProjectionMatrix;
uniform mat4 ModelMatrix;
in float weight;
@@ -9,12 +8,13 @@ out vec2 weight_interp; /* (weight, alert) */
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);
/* Separate actual weight and alerts for independent interpolation */
weight_interp = max(vec2(weight, -weight), 0.0);
#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
}