1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* SPDX-License-Identifier: Apache-2.0
* Copyright 2011-2022 Blender Foundation */
#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);
}
|