diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-06-20 17:50:08 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-06-21 10:47:03 +0300 |
commit | a3a6cda8fb678432e0552d23b0226e8617f26e5f (patch) | |
tree | 7e23565133d47288eee38cf65151b5c9350991f6 /source/blender/draw/modes/shaders | |
parent | 0c538fc923803c8611c3c7c7af9ca51fc5293b75 (diff) |
Fix T65745: Bone Selection X-Ray Drawing.
The Pose Bone Selection used normal matric multiplication, but that
mismatched the Depth buffer from all draw engines. They used the
optimized matrices from common_view_lib.
This change will use the optimized version, so the depth buffer matches
and the render artifacts would be correct.
Please note that bone selection is not using shcfg and therefore render clipping is still off.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D5100
Diffstat (limited to 'source/blender/draw/modes/shaders')
-rw-r--r-- | source/blender/draw/modes/shaders/pose_selection_vert.glsl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/draw/modes/shaders/pose_selection_vert.glsl b/source/blender/draw/modes/shaders/pose_selection_vert.glsl new file mode 100644 index 00000000000..2dd84c0a060 --- /dev/null +++ b/source/blender/draw/modes/shaders/pose_selection_vert.glsl @@ -0,0 +1,12 @@ + +in vec3 pos; + +void main() +{ + vec3 world_pos = point_object_to_world(pos); + gl_Position = point_world_to_ndc(world_pos); + +#ifdef USE_WORLD_CLIP_PLANES + world_clip_planes_calc_clip_distance(world_pos); +#endif +} |