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:
-rw-r--r--source/blender/draw/intern/draw_manager_exec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c
index e69a1026815..c7ec905bc56 100644
--- a/source/blender/draw/intern/draw_manager_exec.c
+++ b/source/blender/draw/intern/draw_manager_exec.c
@@ -492,7 +492,14 @@ static void draw_clipping_setup_from_view(void)
/* Extract Clipping Planes */
BoundBox bbox;
+#if 0 /* does not currently work for all casses. */
draw_frustum_boundbox_calc(projmat, viewinv, &bbox);
+#else
+ BKE_boundbox_init_from_minmax(&bbox, (const float[3]){-1.0f, -1.0f, -1.0f}, (const float[3]){1.0f, 1.0f, 1.0f});
+ for (int i = 0; i < 8; i++) {
+ mul_project_m4_v3(DST.view_data.matstate.mat[DRW_MAT_PERSINV], bbox.vec[i]);
+ }
+#endif
/* Compute clip planes using the world space frustum corners. */
for (int p = 0; p < 6; p++) {