* Replace license text in headers with SPDX identifiers. * Remove specific license info from outdated readme.txt, instead leave details to the source files. * Add list of SPDX license identifiers used, and corresponding license texts. * Update copyright dates while we're at it. Ref D14069, T95597
18 lines
501 B
Plaintext
18 lines
501 B
Plaintext
/* SPDX-License-Identifier: Apache-2.0
|
|
* Copyright 2011-2022 Blender Foundation */
|
|
|
|
#include "stdcycles.h"
|
|
|
|
shader node_brightness(color ColorIn = 0.8,
|
|
float Bright = 0.0,
|
|
float Contrast = 0.0,
|
|
output color ColorOut = 0.8)
|
|
{
|
|
float a = 1.0 + Contrast;
|
|
float b = Bright - Contrast * 0.5;
|
|
|
|
ColorOut[0] = max(a * ColorIn[0] + b, 0.0);
|
|
ColorOut[1] = max(a * ColorIn[1] + b, 0.0);
|
|
ColorOut[2] = max(a * ColorIn[2] + b, 0.0);
|
|
}
|