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
17 lines
433 B
GLSL
17 lines
433 B
GLSL
/* SPDX-FileCopyrightText: 2019-2022 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
void node_bsdf_translucent(vec4 color, vec3 N, float weight, out Closure result)
|
|
{
|
|
color = max(color, vec4(0.0f));
|
|
N = safe_normalize(N);
|
|
|
|
ClosureTranslucent translucent_data;
|
|
translucent_data.weight = weight;
|
|
translucent_data.color = color.rgb;
|
|
translucent_data.N = N;
|
|
|
|
result = closure_eval(translucent_data);
|
|
}
|