diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-05-29 12:14:10 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-05-29 12:59:40 +0300 |
commit | 1d2b89304ac33993c29f53ebdd41cc84056982d1 (patch) | |
tree | 4f06b12b57a0011c2bfef5da907c9eadf4d7d0e7 /source/blender/draw/engines/overlay/shaders/extra_vert.glsl | |
parent | ff1040c6fefc4c54fef243635a915edf3f40355a (diff) |
Fix T77130: Visually broken/stepped wireframe in object mode (regression)
Create a new shader for the selection fix.
Differential Revision: https://developer.blender.org/D7873
Diffstat (limited to 'source/blender/draw/engines/overlay/shaders/extra_vert.glsl')
-rw-r--r-- | source/blender/draw/engines/overlay/shaders/extra_vert.glsl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/draw/engines/overlay/shaders/extra_vert.glsl b/source/blender/draw/engines/overlay/shaders/extra_vert.glsl index 1662e6519c7..2168d8065fc 100644 --- a/source/blender/draw/engines/overlay/shaders/extra_vert.glsl +++ b/source/blender/draw/engines/overlay/shaders/extra_vert.glsl @@ -221,10 +221,12 @@ void main() /* Convert to screen position [0..sizeVp]. */ edgePos = edgeStart = ((gl_Position.xy / gl_Position.w) * 0.5 + 0.5) * sizeViewport.xy; +#ifdef SELECT_EDGES /* HACK: to avoid loosing sub pixel object in selections, we add a bit of randomness to the * wire to at least create one fragment that will pass the occlusion query. */ /* TODO(fclem) Limit this workaround to selection. It's not very noticeable but still... */ gl_Position.xy += sizeViewportInv.xy * gl_Position.w * ((gl_VertexID % 2 == 0) ? -1.0 : 1.0); +#endif #ifdef USE_WORLD_CLIP_PLANES world_clip_planes_calc_clip_distance(world_pos); |