Files
test2/source/blender/gpu/shaders/material/gpu_shader_material_set.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

49 lines
658 B
GLSL

/* SPDX-FileCopyrightText: 2019 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
void set_value(float val, out float outval)
{
outval = val;
}
void set_rgb(vec3 col, out vec3 outcol)
{
outcol = col;
}
void set_rgba(vec4 col, out vec4 outcol)
{
outcol = col;
}
void set_value_zero(out float outval)
{
outval = 0.0f;
}
void set_value_one(out float outval)
{
outval = 1.0f;
}
void set_rgb_zero(out vec3 outval)
{
outval = vec3(0.0f);
}
void set_rgb_one(out vec3 outval)
{
outval = vec3(1.0f);
}
void set_rgba_zero(out vec4 outval)
{
outval = vec4(0.0f);
}
void set_rgba_one(out vec4 outval)
{
outval = vec4(1.0f);
}