Blender V5.3
gamma.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{
16 float3 color = stack_load(stack, node.color);
17 const float gamma = stack_load(stack, node.gamma);
18
19 color = svm_math_gamma_color(color, gamma);
20
21 if (stack_valid(node.out_offset)) {
22 stack_store_float3(stack, node.out_offset, color);
23 }
24}
25
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
CCL_NAMESPACE_BEGIN ccl_device_noinline void svm_node_gamma(ccl_private float *ccl_restrict stack, const ccl_global SVMNodeGamma &ccl_restrict node)
Definition gamma.h:13
ccl_device_inline float3 svm_math_gamma_color(float3 color, const float gamma)
Definition math_util.h:245