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:
Diffstat (limited to 'source/blender/editors/screen/glutil.c')
-rw-r--r--source/blender/editors/screen/glutil.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 8df1172dda1..27e5a53a526 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -495,16 +495,15 @@ float bglPolygonOffsetCalc(const float winmat[16], float viewdist, float dist)
UNUSED_VARS(viewdist);
#endif
}
- else {
- /* This adjustment effectively results in reducing the Z value by 0.25%.
- *
- * winmat[14] actually evaluates to `-2 * far * near / (far - near)`,
- * is very close to -0.2 with default clip range,
- * and is used as the coefficient multiplied by `w / z`,
- * thus controlling the z dependent part of the depth value.
- */
- return winmat[14] * -0.0025f * dist;
- }
+
+ /* This adjustment effectively results in reducing the Z value by 0.25%.
+ *
+ * winmat[14] actually evaluates to `-2 * far * near / (far - near)`,
+ * is very close to -0.2 with default clip range,
+ * and is used as the coefficient multiplied by `w / z`,
+ * thus controlling the z dependent part of the depth value.
+ */
+ return winmat[14] * -0.0025f * dist;
}
/**
@@ -752,9 +751,7 @@ int ED_draw_imbuf_method(ImBuf *ibuf)
return (size > threshold) ? IMAGE_DRAW_METHOD_2DTEXTURE : IMAGE_DRAW_METHOD_GLSL;
}
- else {
- return U.image_draw_method;
- }
+ return U.image_draw_method;
}
/* don't move to GPU_immediate_util.h because this uses user-prefs