blob: 7fba26907b5449d19e768a76f275d4c65ff26c4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/* The following functions are called to store the given value in the output identified by the
* given ID. The ID is an unsigned integer that is encoded in a float, so floatBitsToUint is called
* to get the actual identifier. The functions have an output value as their last argument that is
* used to establish an output link that is then used to track the nodes that contribute to the
* output of the compositor node tree.
*
* The store_[float|vector|color] functions are dynamically generated in
* ShaderOperation::generate_code_for_outputs. */
void node_compositor_store_output_float(const float id, float value, out float out_value)
{
store_float(floatBitsToUint(id), value);
out_value = value;
}
void node_compositor_store_output_vector(const float id, vec3 vector, out vec3 out_vector)
{
store_vector(floatBitsToUint(id), vector);
out_vector = vector;
}
void node_compositor_store_output_color(const float id, vec4 color, out vec4 out_color)
{
store_color(floatBitsToUint(id), color);
out_color = color;
}
|