22 lines
783 B
Plaintext
22 lines
783 B
Plaintext
/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0 */
|
|
|
|
#include "stdcycles.h"
|
|
|
|
shader node_convert_from_int(int value_int = 0,
|
|
output string value_string = "",
|
|
output float value_float = 0.0,
|
|
output color value_color = 0.0,
|
|
output vector value_vector = vector(0.0, 0.0, 0.0),
|
|
output point value_point = point(0.0, 0.0, 0.0),
|
|
output normal value_normal = normal(0.0, 0.0, 0.0))
|
|
{
|
|
float f = (float)value_int;
|
|
value_float = f;
|
|
value_color = color(f, f, f);
|
|
value_vector = vector(f, f, f);
|
|
value_point = point(f, f, f);
|
|
value_normal = normal(f, f, f);
|
|
}
|