diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-11-29 17:51:25 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-11-29 17:51:43 +0300 |
commit | e6605d5f3746c1610b4f6e976c7e29074e82c3cd (patch) | |
tree | 494f2a9bdcb4bf39c3ee06969772eb65e44b2e4d /source/blender/draw/modes/shaders/paint_wire_vert.glsl | |
parent | 4c2a3b47014c086ad2856524ee3d542d5ba1d245 (diff) |
Fix depth offset in paint mode wireframe.
The original offset was wrong because it applied a constant to
homogenous coordinates (the actual depth is z/w), which broke
totally if near clip distance was reduced.
A correct depth offset has to take slope into account like
glPolygonOffset in order to avoid dotted lines caused by
interpolation precision variations. When drawing wire lines
however only the slope of the line itself is accessible, so
also generally increase the offset when the object is close.
Diffstat (limited to 'source/blender/draw/modes/shaders/paint_wire_vert.glsl')
-rw-r--r-- | source/blender/draw/modes/shaders/paint_wire_vert.glsl | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/source/blender/draw/modes/shaders/paint_wire_vert.glsl b/source/blender/draw/modes/shaders/paint_wire_vert.glsl index 6a800e56d94..253c21745e2 100644 --- a/source/blender/draw/modes/shaders/paint_wire_vert.glsl +++ b/source/blender/draw/modes/shaders/paint_wire_vert.glsl @@ -10,8 +10,5 @@ void main() { gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0); - /* Temp hack for william to start using blender 2.8 for icons. Will be removed by T54910 */ - gl_Position.z -= 0.0001; - finalFlag = data; } |