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
This commit is contained in:
parent
3f91591c1d
commit
2110239547
Notes:
blender-bot
2023-02-14 06:17:14 +01:00
Referenced by issue #87150, Points’ appearance in orthographic mode
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue