Metal: Enable object selection support

Porting conservative depth rendering to use non-geometry shader path for
Metal.

Authored by Apple: Michael Parkin-White

Ref T96261

Reviewed By: fclem
Differential Revision: https://developer.blender.org/D16424
This commit is contained in:
Jason Fielder
2022-12-08 21:57:58 +01:00
committed by Clément Foucault
parent 3608af24fd
commit 2744ee2262
7 changed files with 128 additions and 2 deletions

View File

@@ -45,7 +45,7 @@ void pointcloud_get_pos_and_radius(out vec3 outpos, out float outradius)
}
/* Return world position and normal. */
void pointcloud_get_pos_and_nor(out vec3 outpos, out vec3 outnor)
void pointcloud_get_pos_nor_radius(out vec3 outpos, out vec3 outnor, out float outradius)
{
vec3 p;
float radius;
@@ -79,6 +79,17 @@ void pointcloud_get_pos_and_nor(out vec3 outpos, out vec3 outnor)
radius *= 0.01;
outnor = facing_mat * pos_inst;
outpos = p + outnor * radius;
outradius = radius;
}
/* Return world position and normal. */
void pointcloud_get_pos_and_nor(out vec3 outpos, out vec3 outnor)
{
vec3 nor, pos;
float radius;
pointcloud_get_pos_nor_radius(pos, nor, radius);
outpos = pos;
outnor = nor;
}
vec3 pointcloud_get_pos()