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:
authorCampbell Barton <ideasman42@gmail.com>2019-02-14 05:50:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-14 07:22:58 +0300
commit7280d9d1e41df9596608af77dc206573ed2d3e7a (patch)
tree7e077949d705f1408632c400801f673fe2b15922 /source/blender/draw
parentc12b29e8849f9e29486e29bad2597b82e502c277 (diff)
DRW: Increase weight paint wire depth bias
By default wire would z-fight against the surface. Increase the bias, also don't adjust the 'w' component since it causes bias that depends on the view direction.
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/modes/shaders/paint_wire_vert.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/modes/shaders/paint_wire_vert.glsl b/source/blender/draw/modes/shaders/paint_wire_vert.glsl
index 7acd4fa6c1f..64b58fb3673 100644
--- a/source/blender/draw/modes/shaders/paint_wire_vert.glsl
+++ b/source/blender/draw/modes/shaders/paint_wire_vert.glsl
@@ -19,7 +19,7 @@ void main()
gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
/* Add offset in Z to avoid zfighting and render selected wires on top. */
/* TODO scale this bias using znear and zfar range. */
- gl_Position.zw -= exp2(-20.0) * (is_select ? 2.0 : 1.0);
+ gl_Position.z -= (is_select ? 2e-4 : 1e-4);
if (is_hidden) {
gl_Position = vec4(-2.0, -2.0, -2.0, 1.0);