Blender V5.3
brightness.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#pragma once
6
9#include "kernel/svm/util.h"
10
12
15 node)
16{
17 float3 color = stack_load(stack, node.color);
18 const float brightness = stack_load(stack, node.bright);
19 const float contrast = stack_load(stack, node.contrast);
20
21 color = svm_brightness_contrast(color, brightness, contrast);
22
23 if (stack_valid(node.out_offset)) {
24 stack_store_float3(stack, node.out_offset, color);
25 }
26}
27
CCL_NAMESPACE_BEGIN ccl_device_noinline void svm_node_brightness(ccl_private float *ccl_restrict stack, const ccl_global SVMNodeBrightContrast &ccl_restrict node)
Definition brightness.h:13
ccl_device_inline float3 svm_brightness_contrast(float3 color, const float brightness, const float contrast)
Definition color_util.h:369
ccl_device_inline void stack_store_float3(ccl_private float *stack, const uint a, const float3 f)
ccl_device_inline bool stack_valid(const uint a)
ccl_device_inline T stack_load(const ccl_private float *stack, const uint a)
#define ccl_restrict
#define ccl_private
#define ccl_global
#define ccl_device_noinline
#define CCL_NAMESPACE_END