Blender
V5.3
source
blender
gpu
shaders
material
gpu_shader_material_bright_contrast.bsl.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2019 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#include "
gpu_shader_compat.hh
"
8
9
[[
node
]]
10
void
brightness_contrast
(
float4
col,
float
brightness,
float
contrast,
float4
&outcol)
11
{
12
float
a = 1.0f + contrast;
13
float
b
= brightness - contrast * 0.5f;
14
15
outcol.r =
max
(a * col.r +
b
, 0.0f);
16
outcol.g =
max
(a * col.g +
b
, 0.0f);
17
outcol.b =
max
(a * col.b +
b
, 0.0f);
18
outcol.a = col.a;
19
}
max
btScalar max
Definition
btHeightfieldTerrainShape.h:79
b
b
Definition
compositor_morphological_distance_infos.hh:36
gpu_shader_compat.hh
node
#define node
Definition
gpu_shader_cxx_attribute.hh:142
brightness_contrast
void brightness_contrast(float4 col, float brightness, float contrast, float4 &outcol)
Definition
gpu_shader_material_bright_contrast.bsl.hh:10
float4
Definition
sky_math.h:224
Generated on
for Blender by
doxygen
1.18.0