Refactor: GLSL: Cleanup Clip Space vs. NDC Space naming #105423

Closed
Prakhar-Singh-Chouhan wants to merge 15 commits from (deleted):fix#105070 into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
5 changed files with 13 additions and 13 deletions
Showing only changes of commit 7495858028 - Show all commits

View File

@ -57,7 +57,7 @@ void main()
thickness,
thick_time);
gl_Position = point_world_to_ndc(world_pos);
gl_Position = point_world_to_homogenous(world_pos);
float hair_rand = integer_noise(hair_get_strand_id());
vec3 nor = workbench_hair_random_normal(tan, binor, hair_rand);

View File

@ -13,7 +13,7 @@ void main()
normal_interp = normalize(normal_world_to_view(normal_interp));
gl_Position = point_world_to_ndc(world_pos);
gl_Position = point_world_to_homogenous(world_pos);
view_clipping_distances(world_pos);

View File

@ -8,7 +8,7 @@
void main()
{
vec3 world_pos = point_object_to_world(pos);
gl_Position = point_world_to_ndc(world_pos);
gl_Position = point_world_to_homogenous(world_pos);
view_clipping_distances(world_pos);

View File

@ -1,4 +1,4 @@
#pragma BLENDER_REQUIRE(common_view_lib.glsl)
f#pragma BLENDER_REQUIRE(common_view_lib.glsl)

An extra "f" is present at the beginning of the line. Seems like it was committed by mistake.

An extra "f" is present at the beginning of the line. Seems like it was committed by mistake.
/* Two variants, split pass, generates either 2 triangles or 6 triangles depending on input
* geometry manifold type */
@ -82,17 +82,17 @@ void main()
vData[3].pos = vertex_fetch_attribute(input_base_vertex_id + 3, pos, vec3);
/* Calculate front/back Positions. */
vData[0].frontPosition = point_object_to_ndc(vData[0].pos);
vData[0].backPosition = point_object_to_ndc(vData[0].pos + lightDirection * lightDistance);
vData[0].frontPosition = point_object_to_homogenous(vData[0].pos);
vData[0].backPosition = point_object_to_homogenous(vData[0].pos + lightDirection * lightDistance);
vData[1].frontPosition = point_object_to_ndc(vData[1].pos);
vData[1].backPosition = point_object_to_ndc(vData[1].pos + lightDirection * lightDistance);
vData[1].frontPosition = point_object_to_homogenous(vData[1].pos);
vData[1].backPosition = point_object_to_homogenous(vData[1].pos + lightDirection * lightDistance);
vData[2].frontPosition = point_object_to_ndc(vData[2].pos);
vData[2].backPosition = point_object_to_ndc(vData[2].pos + lightDirection * lightDistance);
vData[2].frontPosition = point_object_to_homogenous(vData[2].pos);
vData[2].backPosition = point_object_to_homogenous(vData[2].pos + lightDirection * lightDistance);
vData[3].frontPosition = point_object_to_ndc(vData[3].pos);
vData[3].backPosition = point_object_to_ndc(vData[3].pos + lightDirection * lightDistance);
vData[3].frontPosition = point_object_to_homogenous(vData[3].pos);
vData[3].backPosition = point_object_to_homogenous(vData[3].pos + lightDirection * lightDistance);
/* Geometry shader equivalent path. */
vec3 v10 = vData[0].pos - vData[1].pos;

View File

@ -25,7 +25,7 @@ void main()
#else
final_pos = (volumeTextureToObject * vec4(final_pos * 0.5 + 0.5, 1.0)).xyz;
#endif
gl_Position = point_object_to_ndc(final_pos);
gl_Position = point_object_to_homogenous(final_pos);
PASS_RESOURCE_ID
}