Files
test2/source/blender/gpu/shaders/material/gpu_shader_material_geometry.glsl
Campbell Barton 0148293520 License headers: add SPDX licenses for '*.glsl' files
When GLSL sources were first included in Blender they were treated as
data (like blend files) and had no license header.
Since then GLSL has been used for more sophisticated features
(EEVEE & real-time compositing)
where it makes sense to include licensing information.

Add SPDX copyright headers to *.glsl files, matching headers used for
C/C++, also include GLSL files in the license checking script.

As leading C-comments are now stripped,
added binary size of comments is no longer a concern.

Ref !111247
2023-08-24 10:57:03 +10:00

37 lines
1015 B
GLSL

/* SPDX-FileCopyrightText: 2019-2022 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma BLENDER_REQUIRE(gpu_shader_material_tangent.glsl)
void node_geometry(vec3 orco_attr,
out vec3 position,
out vec3 normal,
out vec3 tangent,
out vec3 true_normal,
out vec3 incoming,
out vec3 parametric,
out float backfacing,
out float pointiness,
out float random_per_island)
{
/* handle perspective/orthographic */
incoming = coordinate_incoming(g_data.P);
position = g_data.P;
normal = g_data.N;
true_normal = g_data.Ng;
if (g_data.is_strand) {
tangent = g_data.curve_T;
}
else {
tangent_orco_z(orco_attr, orco_attr);
node_tangent(orco_attr, tangent);
}
parametric = vec3(g_data.barycentric_coords, 0.0);
backfacing = (FrontFacing) ? 0.0 : 1.0;
pointiness = 0.5;
random_per_island = 0.0;
}