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
12 lines
430 B
GLSL
12 lines
430 B
GLSL
/* SPDX-FileCopyrightText: 2021-2022 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
void node_wavelength(float wavelength, sampler1DArray spectrummap, float layer, out vec4 color)
|
|
{
|
|
float t = (wavelength - 380.0) / (780.0 - 380.0);
|
|
vec3 rgb = texture(spectrummap, vec2(t, layer)).rgb;
|
|
rgb *= 1.0 / 2.52; /* Empirical scale from lg to make all comps <= 1. */
|
|
color = vec4(clamp(rgb, 0.0, 1.0), 1.0);
|
|
}
|