Files
test/source/blender/gpu/shaders/material/gpu_shader_material_squeeze.glsl
Clément Foucault bb52754652 GPU: Use f suffix for float literals
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
2025-04-11 18:28:45 +02:00

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)));
}