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:
authorPhilipp Oeser <info@graphics-engineer.com>2021-04-08 18:19:45 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-04-09 10:14:53 +0300
commit21102395472ddb77572944cff337f6deb68fcc7e (patch)
tree90cdd77dd9d76338baf04f92e1d53494a4768c9d /source/blender/draw
parent3f91591c1d66440d197cddbd472313fad36f7a7b (diff)
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
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/intern/shaders/common_pointcloud_lib.glsl2
1 files changed, 1 insertions, 1 deletions
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;