They are actually already some literals with the `f` suffix that are in our shader codebase and we never had problem in the past 5 years (or even 8 years). So I think it is safe to do and improves convergence of codestyles. Pull Request: https://projects.blender.org/blender/blender/pulls/137352
9 lines
245 B
GLSL
9 lines
245 B
GLSL
/* SPDX-FileCopyrightText: 2019 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
void squeeze(float val, float width, float center, out float outval)
|
|
{
|
|
outval = 1.0f / (1.0f + pow(2.71828183f, -((val - center) * width)));
|
|
}
|