GPv3: Curve to Mesh node #113659

Manually merged
Dalai Felinto merged 86 commits from dfelinto/blender:grease-nodes-curve-to-mesh into main 2023-10-16 11:49:25 +02:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 71835808d3 - Show all commits

View File

@ -21,7 +21,7 @@ void main()
init_globals();
/* View position is passed to keep accuracy. */
g_data.N = normal_view_to_world(drw_view_incident_vector(interp.P));
g_data.N = drw_normal_view_to_world(drw_view_incident_vector(interp.P));
g_data.Ng = g_data.N;
g_data.P = -g_data.N;
attrib_load();

View File

@ -57,7 +57,7 @@ vec3 drw_world_incident_vector(vec3 P)
*/
vec3 drw_view_incident_vector(vec3 vP)
{
return drw_view_is_perspective() ? normalize(vP) : vec3(0.0, 0.0, -1.0);
return drw_view_is_perspective() ? normalize(-vP) : vec3(0.0, 0.0, 1.0);
}
/**