Fix T89812: 'Snap_Utilities_Line' - Projection error in orthographic view
This commit is contained in:
parent
1868f2511c
commit
40112c2d37
Notes:
blender-bot
2023-02-14 18:34:42 +01:00
Referenced by issue blender/blender#88449: Blender LTS: Maintenance Task 2.93 Referenced by issue blender/blender#88449, Blender LTS: Maintenance Task 2.93 Referenced by issue #89812, It can't snap vertices when using community addon 'Snap_Utilities_Line'.
|
@ -349,9 +349,13 @@ class GPU_Indices_Mesh():
|
|||
|
||||
far_ += depth_offset
|
||||
near += depth_offset
|
||||
fn = (far_ - near)
|
||||
winmat[2][2] = -(far_ + near) / fn
|
||||
winmat[2][3] = (-2 * far_ * near) / fn
|
||||
range = (far_ - near)
|
||||
if is_persp:
|
||||
winmat[2][2] = -(far_ + near) / range
|
||||
winmat[2][3] = (-2 * far_ * near) / range
|
||||
else:
|
||||
winmat[2][3] = -(far_ + near) / range
|
||||
|
||||
gpu.matrix.load_projection_matrix(winmat)
|
||||
|
||||
if self.draw_edges:
|
||||
|
|
Loading…
Reference in New Issue