diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-07-19 14:27:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-07-19 14:27:13 +0300 |
commit | 8c90910dcc3ac56ecaa3f0d0ed1a43a423ff687f (patch) | |
tree | 713ac786e3470efe7f3e04625e5b4945d274f042 /source/blender/gpu/GPU_matrix.h | |
parent | ccd2af43b3ab83dc873010faade1b2916553291a (diff) |
Fix T66937: Blank view on navigation with auto-deph & large clip-end
Diffstat (limited to 'source/blender/gpu/GPU_matrix.h')
-rw-r--r-- | source/blender/gpu/GPU_matrix.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/gpu/GPU_matrix.h b/source/blender/gpu/GPU_matrix.h index 56d640ea0e4..eabfb5d2dc3 100644 --- a/source/blender/gpu/GPU_matrix.h +++ b/source/blender/gpu/GPU_matrix.h @@ -102,11 +102,15 @@ struct GPUMatrixUnproject_Precalc { float model_inverted[4][4]; float view[4]; bool is_persp; - /** Result of 'projmat_dimensions'. */ + /** + * Result of #projmat_dimensions_db. + * Using double precision here is important as far clipping ranges + * can cause divide-by-zero when using float, see: T66937. + */ struct { - float xmin, xmax; - float ymin, ymax; - float zmin, zmax; + double xmin, xmax; + double ymin, ymax; + double zmin, zmax; } dims; }; |