diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-04-28 18:18:32 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-04-28 18:18:32 +0300 |
commit | 7615498e6dfe2902e265f49c2d1605fe81dcf99c (patch) | |
tree | 695fd2b8a478956caba5eff8d3ca6fc733e9ec75 /source/blender/editors/screen/glutil.c | |
parent | be228d33f165b10327b06ae77bb21ab1a437a16a (diff) |
Alleviate somewhat the issue of T44505
Issue is zfighting with wire of mesh when parts of the mesh are close
together. We can make this slightly better by reducing the offset,
however this offset is calculated pre-perspective division and can vary
greatly with distance. Correct approach would be using polygon offset,
however we draw mesh wireframes as lines, (not polygons with polygon
mode line) so this approach will not work.
Alternatively, we could set an offset in a shader, however we don't have
code for that either.
Diffstat (limited to 'source/blender/editors/screen/glutil.c')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 6001534e88d..618d6906b76 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -1008,7 +1008,7 @@ void bglPolygonOffset(float viewdist, float dist) /* dist is from camera to center point */ if (winmat[15] > 0.5f) offs = 0.00001f * dist * viewdist; // ortho tweaking - else offs = 0.0005f * dist; // should be clipping value or so... + else offs = 0.0001f * dist; // should be clipping value or so... winmat[14] -= offs; offset += offs; |