Blender
V5.3
source
blender
gpu
shaders
material
gpu_shader_material_squeeze.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
squeeze
(
float
val,
float
width,
float
center,
float
&outval)
11
{
12
outval = 1.0f / (1.0f +
pow
(2.71828183f, -((val - center) * width)));
13
}
gpu_shader_compat.hh
node
#define node
Definition
gpu_shader_cxx_attribute.hh:142
pow
#define pow
Definition
gpu_shader_cxx_builtin.hh:116
squeeze
void squeeze(float val, float width, float center, float &outval)
Definition
gpu_shader_material_squeeze.bsl.hh:10
Generated on
for Blender by
doxygen
1.18.0