From 21102395472ddb77572944cff337f6deb68fcc7e Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Thu, 8 Apr 2021 17:19:45 +0200 Subject: Fix T87150: bad points appearance in orthographic view Points are drawn as half octahedron (aligned to the camera). Getting the appropriate matrix for facing the camera would fail in in orthographic view, points were not facing the camera (revealing their missing other half octahedron) Maniphest Tasks: T87150 Differential Revision: https://developer.blender.org/D10923 --- source/blender/draw/intern/shaders/common_pointcloud_lib.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/draw') diff --git a/source/blender/draw/intern/shaders/common_pointcloud_lib.glsl b/source/blender/draw/intern/shaders/common_pointcloud_lib.glsl index f007a8c2322..74b989441a2 100644 --- a/source/blender/draw/intern/shaders/common_pointcloud_lib.glsl +++ b/source/blender/draw/intern/shaders/common_pointcloud_lib.glsl @@ -12,7 +12,7 @@ in vec3 nor; mat3 pointcloud_get_facing_matrix(vec3 p) { mat3 facing_mat; - facing_mat[2] = normalize(ViewMatrixInverse[3].xyz - p); + facing_mat[2] = cameraVec(p); facing_mat[1] = normalize(cross(ViewMatrixInverse[0].xyz, facing_mat[2])); facing_mat[0] = cross(facing_mat[1], facing_mat[2]); return facing_mat; -- cgit v1.2.3