diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-06 02:33:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-06 02:34:09 +0300 |
commit | 8996e26116f063ce28a9784899fc36d87f31dabe (patch) | |
tree | 5085a8fdfec51ef1c807142859393d963efe10d3 /source/blender/gpu/shaders | |
parent | dbd7f36da8ec3ac1c2898aee346beecb86aac8a2 (diff) |
Fix T61196: Mesh select ignores clipping
Select clipping now works when x-ray is disabled.
Diffstat (limited to 'source/blender/gpu/shaders')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_3D_selection_id_vert.glsl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_selection_id_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_selection_id_vert.glsl index 9c6be69efce..aa544ea82ee 100644 --- a/source/blender/gpu/shaders/gpu_shader_3D_selection_id_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_3D_selection_id_vert.glsl @@ -20,5 +20,11 @@ void main() (((color + offset) >> 24) ) * (1.0f / 255.0f)); #endif - gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0); + vec4 pos_4d = vec4(pos, 1.0); + gl_Position = ModelViewProjectionMatrix * pos_4d; + +#ifdef USE_WORLD_CLIP_PLANES + /* Warning: ModelMatrix is typically used but select drawing is different. */ + world_clip_planes_calc_clip_distance(pos); +#endif } |