/*
 * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 * SPDX-License-Identifier: BSD-3-Clause
 */

mdl 1.8;

import ::anno::*;
import ::math::*;

using .::aux_definitions import xy;
import ::state::*;
import ::scene::*;

export using ::state import coordinate_space; //enum type
import ::tex::*;
export using ::tex import gamma_mode; //enum type
export using ::tex import wrap_mode; //enum type

module [[
    anno::version( 1, 2, 0),
    anno::display_name("NVIDIA support definitions")
]];

export annotation icon(string path);


export float data_lookup_float(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    float default_value = float() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup float"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Varying"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_float(name, default_value);
}

export float2 data_lookup_float2(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    float2 default_value = float2() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup float2"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Varying"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_float2(name, default_value);
}

export float3 data_lookup_float3(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    float3 default_value = float3() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup float3"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Varying"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_float3(name, default_value);
}

export float4 data_lookup_float4(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    float4 default_value = float4() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup float4"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Varying"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_float4(name, default_value);
}

export int data_lookup_int(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    int default_value = int() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup int"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Varying"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_int(name, default_value);
}

export int2 data_lookup_int2(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    int2 default_value = int2() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup int2"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Varying"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_int2(name, default_value);
}

export int3 data_lookup_int3(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    int3 default_value = int3() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup int3"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Varying"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_int3(name, default_value);
}

export int4 data_lookup_int4(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    int4 default_value = int4() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup int4"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Varying"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_int4(name, default_value);
}

export color data_lookup_color(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    color default_value = color() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup color"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Varying"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_color(name, default_value);
}

export uniform float data_lookup_uniform_float(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    uniform float default_value = float() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup unfirom float"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Uniform"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_uniform_float(name, default_value);
}

export uniform float2 data_lookup_uniform_float2(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    uniform float2 default_value = float2() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup uniform float2"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Uniform"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_uniform_float2(name, default_value);
}

export uniform float3 data_lookup_uniform_float3(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    uniform float3 default_value = float3() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup uniform float3"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Uniform"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_uniform_float3(name, default_value);
}

export uniform float4 data_lookup_uniform_float4(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    uniform float4 default_value = float4() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup unfirom float4"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Uniform"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_uniform_float4(name, default_value);
}

export uniform int data_lookup_uniform_int(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    uniform int default_value = int() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup uniform int"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Uniform"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_uniform_int(name, default_value);
}

export uniform int2 data_lookup_uniform_int2(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    uniform int2 default_value = int2() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup uniform int2"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Uniform"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_uniform_int2(name, default_value);
}

export uniform int3 data_lookup_uniform_int3(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    uniform int3 default_value = int3() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup uniform int3"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Uniform"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_uniform_int3(name, default_value);
}

export uniform int4 data_lookup_uniform_int4(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    uniform int4 default_value = int4() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup uniform int4"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Uniform"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_uniform_int4(name, default_value);
}

export uniform color data_lookup_uniform_color(
    uniform string name [[
        anno::description("Scene data attribute name to look up on the target mesh.")
    ]],
    uniform color default_value = color() [[
        anno::description("Fallback value returned when the named scene data is not present on the target mesh.")
    ]]
) [[
    anno::display_name("Data lookup uniform color"),
    anno::description("Looks up mesh scene data by name and returns it when present; otherwise returns the provided default value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Data Lookup", "Uniform"),
    icon(".icons/data_lookup.svg")
]]
{
    return scene::data_lookup_uniform_color(name, default_value);
}



// operator nodes
// Add
export int add(int a=0, int b=0)
[[
    anno::display_name("Add"),
    anno::description("Adds the two inputs and returns the result."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Add"),
    icon(".icons/Add.svg"),
    anno::ui_order(300)
]]
{ return a+b; }

export float add(float a=0.0, float b=0.0)
[[
    anno::display_name("Add"),
    anno::description("Adds the two inputs and returns the result."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Add"),
    icon(".icons/Add.svg"),
    anno::ui_order(301)
]]
{ return a+b; }

export float2 add(float2 a=float2(0.0), float2 b=float2(0.0))
[[
    anno::display_name("Add"),
    anno::description("Adds the two inputs and returns the result. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Add"),
    icon(".icons/Add.svg"),
    anno::ui_order(302)
]]
{ return a+b; }

export float3 add(float3 a=float3(0.0), float3 b=float3(0.0))
[[
    anno::display_name("Add"),
    anno::description("Adds the two inputs and returns the result. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Add"),
    icon(".icons/Add.svg"),
    anno::ui_order(303)
]]
{ return a+b; }

export float4 add(float4 a=float4(0.0), float4 b=float4(0.0))
[[
    anno::display_name("Add"),
    anno::description("Adds the two inputs and returns the result. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Add"),
    icon(".icons/Add.svg"),
    anno::ui_order(304)
]]
{ return a+b; }

export color add(color a=color(0.0), color b=color(0.0))
[[
    anno::display_name("Add"),
    anno::description("Adds the two inputs and returns the result. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Add"),
    icon(".icons/Add.svg"),
    anno::ui_order(305)
]]
{ return a+b; }

export int subtract(int a=0, int b=0)
[[
    anno::display_name("Subtract"),
    anno::description("Subtracts the second input from the first."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Subtract"),
    icon(".icons/Subtract.svg"),
    anno::ui_order(310)
]]
{ return a-b; }

export float subtract(float a=0.0, float b=0.0)
[[
    anno::display_name("Subtract"),
    anno::description("Subtracts the second input from the first."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Subtract"),
    icon(".icons/Subtract.svg"),
    anno::ui_order(311)
]]
{ return a-b; }

export float2 subtract(float2 a=float2(0.0), float2 b=float2(0.0))
[[
    anno::display_name("Subtract"),
    anno::description("Subtracts the second input from the first. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Subtract"),
    icon(".icons/Subtract.svg"),
    anno::ui_order(312)
]]
{ return a-b; }

export float3 subtract(float3 a=float3(0.0), float3 b=float3(0.0))
[[
    anno::display_name("Subtract"),
    anno::description("Subtracts the second input from the first. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Subtract"),
    icon(".icons/Subtract.svg"),
    anno::ui_order(313)
]]
{ return a-b; }

export float4 subtract(float4 a=float4(0.0), float4 b=float4(0.0))
[[
    anno::display_name("Subtract"),
    anno::description("Subtracts the second input from the first. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Subtract"),
    icon(".icons/Subtract.svg"),
    anno::ui_order(314)
]]
{ return a-b; }

export color subtract(color a=color(0.0), color b=color(0.0))
[[
    anno::display_name("Subtract"),
    anno::description("Subtracts the second input from the first. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Subtract"),
    icon(".icons/Subtract.svg"),
    anno::ui_order(315)
]]
{ return a-b; }

export int multiply(int a=0, int b=0)
[[
    anno::display_name("Multiply"),
    anno::description("Subtracts the second input from the first."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Multiply"),
    icon(".icons/Multiply.svg"),
    anno::ui_order(320)
]]
{ return a*b; }

export float multiply(float a=0.0, float b=0.0)
[[
    anno::display_name("Multiply"),
    anno::description("Multiplies the two inputs and returns the product."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Multiply"),
    icon(".icons/Multiply.svg"),
    anno::ui_order(321)
]]
{ return a*b; }

export float2 multiply(float2 a=float2(0.0), float2 b=float2(0.0))
[[
    anno::display_name("Multiply"),
    anno::description("Multiplies the two inputs and returns the product. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Multiply"),
    icon(".icons/Multiply.svg"),
    anno::ui_order(322)
]]
{ return a*b; }

export float3 multiply(float3 a=float3(0.0), float3 b=float3(0.0))
[[
    anno::display_name("Multiply"),
    anno::description("Multiplies the two inputs and returns the product. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Multiply"),
    icon(".icons/Multiply.svg"),
    anno::ui_order(323)
]]
{ return a*b; }

export float4 multiply(float4 a=float4(0.0), float4 b=float4(0.0))
[[
    anno::display_name("Multiply"),
    anno::description("Multiplies the two inputs and returns the product. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Multiply"),
    icon(".icons/Multiply.svg"),
    anno::ui_order(324)
]]
{ return a*b; }

export color multiply(color a=color(0.0), color b=color(0.0))
[[
    anno::display_name("Multiply"),
    anno::description("Multiplies the two inputs and returns the product. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Multiply"),
    icon(".icons/Multiply.svg"),
    anno::ui_order(325)
]]
{ return a*b; }

export int divide(int a=0, int b=0)
[[
    anno::display_name("Divide"),
    anno::description("Divides the first input by the second."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Divide"),
    icon(".icons/Divide.svg"),
    anno::ui_order(326)
]]
{ return a/b; }

export float divide(float a=0.0, float b=0.0)
[[
    anno::display_name("Divide"),
    anno::description("Divides the first input by the second."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Divide"),
    icon(".icons/Divide.svg"),
    anno::ui_order(327)
]]
{ return a/b; }

export float2 divide(float2 a=float2(0.0), float2 b=float2(0.0))
[[
    anno::display_name("Divide"),
    anno::description("Divides the first input by the second. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Divide"),
    icon(".icons/Divide.svg"),
    anno::ui_order(328)
]]
{ return a/b; }

export float3 divide(float3 a=float3(0.0), float3 b=float3(0.0))
[[
    anno::display_name("Divide"),
    anno::description("Divides the first input by the second. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Divide"),
    icon(".icons/Divide.svg"),
    anno::ui_order(329)
]]
{ return a/b; }

export float4 divide(float4 a=float4(0.0), float4 b=float4(0.0))
[[
    anno::display_name("Divide"),
    anno::description("Divides the first input by the second. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Divide"),
    icon(".icons/Divide.svg"),
    anno::ui_order(330)
]]
{ return a/b; }

export color divide(color a=color(0.0), color b=color(0.0))
[[
    anno::display_name("Divide"),
    anno::description("Divides the first input by the second. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Divide"),
    icon(".icons/Divide.svg"),
    anno::ui_order(331)
]]
{ return a/b; }

export int condition(
    uniform bool x=true [[
        anno::description("Condition that selects which input to return.")
    ]],
    int a=0 [[
        anno::description("Value returned when the condition is true.")
    ]],
    int b=0 [[
        anno::description("Value returned when the condition is false.")
    ]]
)
[[
    anno::display_name("Condition?"),
    anno::description("Returns input a when the condition is true; otherwise returns input b."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Condition"),
    icon(".icons/condition.svg"),
    anno::ui_order(332)
]]
{ return x?a:b; }

export float condition(
    uniform bool x=true [[
        anno::description("Condition that selects which input to return.")
    ]],
    float a=0.0 [[
        anno::description("Value returned when the condition is true.")
    ]],
    float b=0.0 [[
        anno::description("Value returned when the condition is false.")
    ]]
)
[[
    anno::display_name("Condition?"),
    anno::description("Returns input a when the condition is true; otherwise returns input b."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Condition"),
    icon(".icons/condition.svg"),
    anno::ui_order(333)
]]
{ return x?a:b; }

export float2 condition(
    uniform bool x=true [[
        anno::description("Condition that selects which input to return.")
    ]],
    float2 a=float2(0.0) [[
        anno::description("Value returned when the condition is true.")
    ]],
    float2 b=float2(0.0) [[
        anno::description("Value returned when the condition is false.")
    ]]
)
[[
    anno::display_name("Condition?"),
    anno::description("Returns input a when the condition is true; otherwise returns input b."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Condition"),
    icon(".icons/condition.svg"),
    anno::ui_order(334)
]]
{ return x?a:b; }

export float3 condition(
    uniform bool x=true [[
        anno::description("Condition that selects which input to return.")
    ]],
    float3 a=float3(0.0) [[
        anno::description("Value returned when the condition is true.")
    ]],
    float3 b=float3(0.0) [[
        anno::description("Value returned when the condition is false.")
    ]]
)
[[
    anno::display_name("Condition?"),
    anno::description("Returns input a when the condition is true; otherwise returns input b."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Condition"),
    icon(".icons/condition.svg"),
    anno::ui_order(335)
]]
{ return x?a:b; }

export float4 condition(
    uniform bool x=true [[
        anno::description("Condition that selects which input to return.")
    ]],
    float4 a=float4(0.0) [[
        anno::description("Value returned when the condition is true.")
    ]],
    float4 b=float4(0.0) [[
        anno::description("Value returned when the condition is false.")
    ]]
)
[[
    anno::display_name("Condition?"),
    anno::description("Returns input a when the condition is true; otherwise returns input b."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Condition"),
    icon(".icons/condition.svg"),
    anno::ui_order(336)
]]
{ return x?a:b; }

export color condition(
    uniform bool x=true [[
        anno::description("Condition that selects which input to return.")
    ]],
    color a=color(0.0) [[
        anno::description("Value returned when the condition is true.")
    ]],
    color b=color(0.0) [[
        anno::description("Value returned when the condition is false.")
    ]]
)
[[
    anno::display_name("Condition?"),
    anno::description("Returns input a when the condition is true; otherwise returns input b."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Condition"),
    icon(".icons/condition.svg"),
    anno::ui_order(337)
]]
{ return x?a:b; }

export bool compare(float a, float b)
[[
    anno::display_name("Compare"),
    anno::description("Returns true when a is greater than b; otherwise returns false."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Comparison"),
    icon(".icons/compare.svg"),
    anno::ui_order(338)
]]
{ return a>b; }

export bool equality(bool a, bool b)
[[
    anno::display_name("Check equality bool"),
    anno::description("Returns true when both inputs are equal; otherwise returns false."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Equality"),
    icon(".icons/Equality.svg"),
    anno::ui_order(339)
]]
{ return a==b; }

export bool equality(int a, int b)
[[
    anno::display_name("Check equality int"),
    anno::description("Returns true when both inputs are equal; otherwise returns false."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Equality"),
    icon(".icons/Equality.svg"),
    anno::ui_order(340)
]]
{ return a==b; }

export bool equality(int2 a, int2 b)
[[
    anno::display_name("Check equality int2"),
    anno::description("Returns true when both inputs are equal; otherwise returns false."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Equality"),
    icon(".icons/Equality.svg"),
    anno::ui_order(341)
]]
{ return a==b; }

export bool equality(int3 a, int3 b)
[[
    anno::display_name("Check equality int3"),
    anno::description("Returns true when both inputs are equal; otherwise returns false."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Equality"),
    icon(".icons/Equality.svg"),
    anno::ui_order(342)
]]
{ return a==b; }

export bool equality(float a, float b)
[[
    anno::display_name("Check equality float"),
    anno::description("Returns true when both inputs are equal; otherwise returns false."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Equality"),
    icon(".icons/Equality.svg"),
    anno::ui_order(343)
]]
{ return a==b; }

export bool equality(float2 a, float2 b)
[[
    anno::display_name("Check equality float2"),
    anno::description("Returns true when both inputs are equal; otherwise returns false."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Equality"),
    icon(".icons/Equality.svg"),
    anno::ui_order(344)
]]
{ return a==b; }

export bool equality(float3 a, float3 b)
[[
    anno::display_name("Check equality float3"),
    anno::description("Returns true when both inputs are equal; otherwise returns false."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Equality"),
    icon(".icons/Equality.svg"),
    anno::ui_order(345)
]]
{ return a==b; }

export bool equality(color a, color b)
[[
    anno::display_name("Check equality color"),
    anno::description("Returns true when both inputs are equal; otherwise returns false."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Operators", "Equality"),
    icon(".icons/Equality.svg"),
    anno::ui_order(346)
]]
{ return a==b; }

//constants nodes.
export bool bool_const(uniform bool b = true)
[[
    anno::display_name("Constant bool"),
    anno::description("Pass-through constant node that returns the provided value unchanged."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Constants"),
    icon(".icons/constructor.svg"),
    anno::ui_order(1000)
]]
{ return b; }

export int int_const(uniform int i = 0)
[[
    anno::display_name("Constant int"),
    anno::description("Pass-through constant node that returns the provided value unchanged."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Constants"),
    icon(".icons/constructor.svg"),
    anno::ui_order(1001)
]]
{ return i; }

export float float_const(uniform float f = 0.)
[[
    anno::display_name("Constant float"),
    anno::description("Pass-through constant node that returns the provided value unchanged."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Constants"),
    icon(".icons/constructor.svg"),
    anno::ui_order(1002)
]]
{ return f; }

export float2 float2_const(uniform float2 f2 = float2(0.))
[[
    anno::display_name("Constant float2"),
    anno::description("Pass-through constant node that returns the provided value unchanged."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Constants"),
    icon(".icons/constructor.svg"),
    anno::ui_order(1003)
]]
{ return f2; }

export float3 float3_const(uniform float3 f3 = float3(0.))
[[
    anno::display_name("Constant float3"),
    anno::description("Pass-through constant node that returns the provided value unchanged."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Constants"),
    icon(".icons/constructor.svg"),
    anno::ui_order(1004)
]]
{ return f3; }

export float4 float4_const(uniform float4 f4 = float4(0.))
[[
    anno::display_name("Constant float4"),
    anno::description("Pass-through constant node that returns the provided value unchanged."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Constants"),
    icon(".icons/constructor.svg"),
    anno::ui_order(1005)
]]
{ return f4; }

export color color_const(uniform color c = color(0.))
[[
    anno::display_name("Constant color"),
    anno::description("Pass-through constant node that returns the provided value unchanged."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Constants"),
    icon(".icons/constructor.svg"),
    anno::ui_order(1006)
]]
{ return c; }

export uniform texture_2d texture_2d_const(uniform texture_2d tex = texture_2d())[[
    anno::display_name("Constant texture_2d"),
    anno::description("Pass-through constant node that returns the provided value unchanged."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Constants"),
    icon(".icons/constructor.svg"),
    anno::ui_order(1007)
]]
{ return tex; }

//exports from tex:
export int texture_width(
    uniform texture_2d tex = texture_2d() [[
        anno::description("Texture resource whose width is queried.")
    ]]) uniform
[[
    anno::display_name("Width of texture"),
    anno::description("Returns the width of the input texture in pixels."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Texturing", "Info", "Width"),
    icon(".icons/texture_width.svg"),
    anno::ui_order(141)
]]
{  return tex::width(tex); }

export int texture_width(
    uniform texture_2d tex = texture_2d() [[
        anno::description("Texture resource whose tile width is queried.")
    ]],
    int2 uv_tile = int2(0, 0) [[
        anno::description("UDIM tile index as (u, v).")
    ]]) uniform
[[
    anno::display_name("Width of a texture tile"),
    anno::description("Returns the width of the specified texture tile in pixels."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Texturing", "Info", "Width"),
    icon(".icons/texture_width.svg"),
    anno::ui_order(143)
]]
{  return tex::width(tex, uv_tile); }

export int height(
    uniform texture_2d tex = texture_2d() [[
        anno::description("Texture resource whose height is queried.")
    ]]) uniform
[[
    anno::display_name("Height of texture"),
    anno::description("Returns the height of the input texture in pixels."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Texturing", "Info", "Height"),
    icon(".icons/texture_height.svg"),
    anno::ui_order(142)
]]
{  return tex::height(tex); }

export int height(
    uniform texture_2d tex = texture_2d() [[
        anno::description("Texture resource whose tile height is queried.")
    ]],
    int2 uv_tile = int2(0, 0) [[
        anno::description("UDIM tile index as (u, v).")
    ]]) uniform
[[
    anno::display_name("Height of a texture tile"),
    anno::description("Returns the height of the specified texture tile in pixels."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Texturing", "Info", "Height"),
    icon(".icons/texture_height.svg"),
    anno::ui_order(144)
]]
{  return tex::height(tex,uv_tile); }

export float2 transform_st(
    float rotation = 0.0 [[
        anno::description("Rotation angle in radians.")
    ]],
    float2 translation = float2(0.0) [[
        anno::description("Translation offset applied after rotation and scaling.")
    ]],
    float2 scale = float2(1.0) [[
        anno::description("Scale factor applied per coordinate axis.")
    ]],
    float2 st = float2(0.0) [[
        anno::description("Input 2D coordinate to transform.")
    ]]
)
[[
    anno::display_name("Transform 2D"),
    anno::description("Applies rotation, scaling, and translation to a 2D coordinate."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Transform"),
    icon(".icons/transform.svg"),
    anno::ui_order(1019)
]]
{
    float s = math::sin(rotation);
	float c = math::cos(rotation);
	float2 st_t=st;
	st_t = float2(s*st_t.x+c*st_t.y,s*st_t.y-c*st_t.x);
	return st_t*scale+ translation;
}

export color biased_color_blend(
    float w1 = 0.0 [[
        anno::description("Weight for the first input color.")
    ]],
    color c1 = color(0.0) [[
        anno::description("First input color.")
    ]],
    float w2 = 0.0 [[
        anno::description("Weight for the second input color.")
    ]],
    color c2 = color(0.0) [[
        anno::description("Second input color.")
    ]],
    float w3 = 0.0 [[
        anno::description("Weight for the third input color.")
    ]],
    color c3 = color(0.0) [[
        anno::description("Third input color.")
    ]],
    color mean = color(0.5) [[
        anno::description("Expected average color used to preserve contrast in the biased blend.")
    ]]
)
[[
    anno::display_name("Biased color blend"),
    anno::description("Blends up to three colors using weights; set mean to the expected average to preserve contrast when mixing textures."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Blend"),
    icon(".icons/biased_color_blend.svg"),
    anno::ui_order(539)
]]
{
	color o=w1*c1+w2*c2+w3*c3;
	float s=w1+w2+w3;
	float s2=w1*w1+w2*w2+w3*w3;
return mean + (o-s*mean)/   math::sqrt(s2);
}


export float lookup_float(
    uniform texture_2d tex = texture_2d() [[
        anno::description("Texture resource to sample.")
    ]],
    float2 coord = float2(0.) [[
        anno::description("Texture coordinate used for sampling.")
    ]],
    uniform wrap_mode wrap_u = wrap_repeat [[
        anno::description("Wrap mode applied along the U axis.")
    ]],
    uniform wrap_mode  wrap_v = wrap_repeat [[
        anno::description("Wrap mode applied along the V axis.")
    ]],
    uniform float2 crop_u = float2(0.0, 1.0) [[
        anno::description("Crop interval along the U axis, expressed as [min, max].")
    ]],
    uniform float2 crop_v = float2(0.0, 1.0) [[
        anno::description("Crop interval along the V axis, expressed as [min, max].")
    ]],
    float frame = 0.0 [[
        anno::description("Frame value used for animated textures.")
    ]]) uniform
[[
    anno::display_name("Texture lookup float"),
    anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Texturing", "Lookup"),
    icon(".icons/texture_lookup.svg"),
    anno::ui_order(100)
]]
{  return tex::lookup_float( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); }

export float3 lookup_float3(
    uniform texture_2d tex = texture_2d() [[
        anno::description("Texture resource to sample.")
    ]],
    float2 coord = float2(0.) [[
        anno::description("Texture coordinate used for sampling.")
    ]],
    uniform wrap_mode  wrap_u = wrap_repeat [[
        anno::description("Wrap mode applied along the U axis.")
    ]],
    uniform wrap_mode  wrap_v = wrap_repeat [[
        anno::description("Wrap mode applied along the V axis.")
    ]],
    uniform float2     crop_u = float2(0.0, 1.0) [[
        anno::description("Crop interval along the U axis, expressed as [min, max].")
    ]],
    uniform float2 crop_v = float2(0.0, 1.0) [[
        anno::description("Crop interval along the V axis, expressed as [min, max].")
    ]],
    float frame = 0.0 [[
        anno::description("Frame value used for animated textures.")
    ]]) uniform
[[
    anno::display_name("Texture lookup float3"),
    anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Texturing", "Lookup"),
    icon(".icons/texture_lookup.svg"),
    anno::ui_order(110)
]]
{  return tex::lookup_float3( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); }


export float4 lookup_float4(
    uniform texture_2d tex = texture_2d() [[
        anno::description("Texture resource to sample.")
    ]],
    float2 coord = float2(0.) [[
        anno::description("Texture coordinate used for sampling.")
    ]],
    uniform wrap_mode  wrap_u = wrap_repeat [[
        anno::description("Wrap mode applied along the U axis.")
    ]],
    uniform wrap_mode  wrap_v = wrap_repeat [[
        anno::description("Wrap mode applied along the V axis.")
    ]],
    uniform float2     crop_u = float2(0.0, 1.0) [[
        anno::description("Crop interval along the U axis, expressed as [min, max].")
    ]],
    uniform float2 crop_v = float2(0.0, 1.0) [[
        anno::description("Crop interval along the V axis, expressed as [min, max].")
    ]],
    float frame = 0.0 [[
        anno::description("Frame value used for animated textures.")
    ]]) uniform
[[
    anno::display_name("Texture lookup float4"),
    anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Texturing", "Lookup"),
    icon(".icons/texture_lookup.svg"),
    anno::ui_order(120)
]]  { return tex::lookup_float4( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); }


export color lookup_color(
    uniform texture_2d tex = texture_2d() [[
        anno::description("Texture resource to sample.")
    ]],
    float2 coord = float2(0.) [[
        anno::description("Texture coordinate used for sampling.")
    ]],
    uniform wrap_mode  wrap_u = wrap_repeat [[
        anno::description("Wrap mode applied along the U axis.")
    ]],
    uniform wrap_mode  wrap_v = wrap_repeat [[
        anno::description("Wrap mode applied along the V axis.")
    ]],
    uniform float2     crop_u = float2(0.0, 1.0) [[
        anno::description("Crop interval along the U axis, expressed as [min, max].")
    ]],
    uniform float2 crop_v = float2(0.0, 1.0) [[
        anno::description("Crop interval along the V axis, expressed as [min, max].")
    ]],
    float frame = 0.0 [[
        anno::description("Frame value used for animated textures.")
    ]]) uniform
[[
    anno::display_name("Texture lookup color"),
    anno::description("Samples a value from a 2D texture using the provided coordinate, wrap, crop, and frame settings."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Texturing", "Lookup"),
    icon(".icons/texture_lookup.svg"),
    anno::ui_order(130)
]]  { return tex::lookup_color( tex, coord, wrap_u, wrap_v, crop_u, crop_v, frame); }


// check for valid resource
export bool texture_isvalid(
    uniform texture_2d tex = texture_2d() [[
        anno::description("Texture resource to validate.")
    ]]) uniform
[[
    anno::display_name("Is texture valid?"),
    anno::description("Returns true when the provided texture handle is valid and can be sampled."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Texturing", "Info"),
    icon(".icons/texture_isvalid.svg"),
    anno::ui_order(140)
]]
{  return tex::texture_isvalid(tex); }


//exports from state:
export float3 position()
[[
    anno::display_name("Hit position"),
    anno::description("Returns the current shading position in the renderer's internal coordinate space."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars"),
    icon(".icons/position.svg"),
    anno::ui_order(1012)
]]
{ return state::position(); }

export float3 normal()
[[
    anno::display_name("Shade normal"),
    anno::description("Returns the current shading normal in the renderer's internal coordinate space."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars"),
    icon(".icons/normal.svg"),
    anno::ui_order(1013)
]]
{ return state::normal(); }

//new: quick access to xy:
export float2 texture_coordinate_2d(
    uniform int i = 0 [[
        anno::description("Texture coordinate set index.")
    ]])
[[
    anno::display_name("Texture coordinate 2D"),
    anno::description("Returns authored texture coordinates from the selected texture coordinate set."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Texture", "Coordinate"),
    icon(".icons/texture_coordinate.svg"),
    anno::ui_order(1010)
]]
{ return xy(state::texture_coordinate(i)); }

export float3 texture_coordinate_3d(
    uniform int i = 0 [[
        anno::description("Texture coordinate set index.")
    ]])
[[
    anno::display_name("Texture coordinate 3D"),
    anno::description("Returns authored texture coordinates from the selected texture coordinate set."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Texture", "Coordinate"),
    icon(".icons/texture_coordinate.svg"),
    anno::ui_order(1011)
]]
{ return state::texture_coordinate(i); }

export float3 texture_tangent_u(
    uniform int i = 0 [[
        anno::description("Texture coordinate set index used to derive the U tangent.")
    ]])
[[
    anno::display_name("Shade tangent"),
    anno::description("Returns the current shading tangent (U direction) in the renderer's internal coordinate space."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Texture", "Tangent"),
    icon(".icons/texture_tangent.svg"),
    anno::ui_order(1014)
]]
{ return state::texture_tangent_u(i); }

export float3 texture_tangent_v(
    uniform int i = 0 [[
        anno::description("Texture coordinate set index used to derive the V tangent.")
    ]])
[[
    anno::display_name("Shade bi-tangent"),
    anno::description("Returns the current shading bitangent (V direction) in the renderer's internal coordinate space."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars", "Texture", "Tangent"),
    icon(".icons/texture_tangent.svg"),
    anno::ui_order(1015)
]]
{ return state::texture_tangent_v(i); }

export float animation_time()
[[
    anno::display_name("Animation time"),
    anno::description("Returns elapsed animation time in seconds from the start of the timeline."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Scene"),
    icon(".icons/animation_time.svg"),
    anno::ui_order(1030)
]]
{ return state::animation_time(); }


export float3 transform_point(
    uniform coordinate_space from=coordinate_internal [[
        anno::description("Source coordinate space of the input point.")
    ]],
    uniform coordinate_space to=coordinate_object [[
        anno::description("Destination coordinate space for the transformed point.")
    ]],
    float3 point=float3(0.) [[
        anno::description("Point to transform.")
    ]])
[[
    anno::display_name("Transform point"),
    anno::description("Transforms the input value between internal, object, and world coordinate spaces."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Transform", "Coordinate"),
    icon(".icons/transform.svg"),
    anno::ui_order(1020)
]]
{ return state::transform_point(from, to, point); }

export float3 transform_vector(
    uniform coordinate_space from=coordinate_internal [[
        anno::description("Source coordinate space of the input vector.")
    ]],
    uniform coordinate_space to=coordinate_object [[
        anno::description("Destination coordinate space for the transformed vector.")
    ]],
    float3 vector=float3(0.) [[
        anno::description("Vector to transform.")
    ]])
[[
    anno::display_name("Transform vector"),
    anno::description("Transforms the input value between internal, object, and world coordinate spaces."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Transform", "Coordinate"),
    icon(".icons/transform.svg"),
    anno::ui_order(1021)
]]
{ return state::transform_vector(from, to, vector); }

export float3 transform_normal(
    uniform coordinate_space from=coordinate_internal [[
        anno::description("Source coordinate space of the input normal.")
    ]],
    uniform coordinate_space to=coordinate_object [[
        anno::description("Destination coordinate space for the transformed normal.")
    ]],
    float3 normal=float3(0.,1.,0.) [[
        anno::description("Normal vector to transform.")
    ]])
[[
    anno::display_name("Transform normal"),
    anno::description("Transforms the input value between internal, object, and world coordinate spaces."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Transform", "Coordinate"),
    icon(".icons/transform.svg"),
    anno::ui_order(1022)
]]
{ return state::transform_normal(from, to, normal); }

export float transform_scale(
    uniform coordinate_space from=coordinate_internal [[
        anno::description("Source coordinate space of the input scale value.")
    ]],
    uniform coordinate_space to=coordinate_object [[
        anno::description("Destination coordinate space for the transformed scale value.")
    ]],
    float scale=0. [[
        anno::description("Scale value to transform.")
    ]])
[[
    anno::display_name("Transform scale"),
    anno::description("Transforms the input value between internal, object, and world coordinate spaces."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Transform", "Coordinate"),
    icon(".icons/transform.svg"),
    anno::ui_order(1023)
]]
{ return state::transform_scale(from, to, scale); }

float2 r2d(float2 x, float theta)
{
    theta *= math::acos(-1.0) * 2.0;
    return float2(
        math::cos(theta) * x[0] + math::sin(theta) * x[1],
        math::cos(theta) * x[1] - math::sin(theta) * x[0]);
}

export float3 rotate_around_x(
    float3 p [[
        anno::description("Point to rotate.")
    ]],
    float theta [[
        anno::description("Rotation amount in turns, where 1.0 is a full 360-degree rotation.")
    ]])
[[
    anno::display_name("Rotate Around X"),
    anno::description("Rotates a 3D point around the X axis by the input angle."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Transform", "Rotation"),
    icon(".icons/rotation.svg"),
    anno::ui_order(1024)
]]
{
    float2 v = r2d(float2(p.y, p.z), theta);
    return float3(p.x, v[0], v[1]);
}

export float3 rotate_around_y(
    float3 p [[
        anno::description("Point to rotate.")
    ]],
    float theta [[
        anno::description("Rotation amount in turns, where 1.0 is a full 360-degree rotation.")
    ]])
[[
    anno::display_name("Rotate Around Y"),
    anno::description("Rotates a 3D point around the Y axis by the input angle."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Transform",  "Rotation"),
    icon(".icons/rotation.svg"),
    anno::ui_order(1025)
]]
{
    float2 v = r2d(float2(p.x, p.z), theta);
    return float3(v[0], p.y, v[1]);
}

export float3 rotate_around_z(
    float3 p [[
        anno::description("Point to rotate.")
    ]],
    float theta [[
        anno::description("Rotation amount in turns, where 1.0 is a full 360-degree rotation.")
    ]])
[[
    anno::display_name("Rotate Around Z"),
    anno::description("Rotates a 3D point around the Z axis by the input angle."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Transform", "Rotation"),
    icon(".icons/rotation.svg"),
    anno::ui_order(1026)
]]
{
    float2 v = r2d(float2(p.x, p.y), theta);
    return float3(v[0], v[1], p.z);
}

export float meters_per_scene_unit()
[[
    anno::display_name("Meters per scene unit"),
    anno::description("Returns the conversion factor between scene units and meters."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Scene", "Units"),
    icon(".icons/meters_per_scene_unit.svg"),
    anno::ui_order(1031)
]]
{ return state::meters_per_scene_unit(); }

export float scene_units_per_meter()
[[
    anno::display_name("Scene units per meter"),
    anno::description("Returns the conversion factor between scene units and meters."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Scene", "Units"),
    icon(".icons/scene_units_per_meter.svg"),
    anno::ui_order(1032)
]]
{ return state::scene_units_per_meter(); }

export int object_id()
[[
    anno::display_name("Object Id"),
    anno::description("Returns the unique integer identifier of the currently shaded object."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("State and Primvars"),
    icon(".icons/object_id.svg"),
    anno::ui_order(1033)
]]
{ return state::object_id(); }

//exported from math:
export color blackbody(
    float temperature=6500. [[
        anno::description("Blackbody temperature in Kelvin used to compute the emitted color.")
    ]])
[[
    anno::display_name("Blackbody color"),
    anno::description("Returns the RGB color of an ideal blackbody radiator at the specified temperature in Kelvin."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions"),
    icon(".icons/blackbody.svg"),
    anno::ui_order(409)
]]
{ return math::blackbody(temperature); }

export float PI()
[[
    anno::display_name("Pi"),
    anno::description("Returns the mathematical constant pi (approximately 3.141592653589793)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Constants"),
    icon(".icons/PI.svg"),
    anno::ui_order(1007)
]]
{ return math::PI; }

export int abs(int a=0)
[[
    anno::display_name("Abs"),
    anno::description("Returns the absolute value of the input."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Abs"),
    icon(".icons/Abs.svg"),
    anno::ui_order(350)
]]
{ return math::abs(a); }

export float abs(float a=0.)
[[
    anno::display_name("Abs"),
    anno::description("Returns the absolute value of the input."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Abs"),
    icon(".icons/Abs.svg"),
    anno::ui_order(351)
]]
{ return math::abs(a); }

export float2 abs(float2 a=float2(0.))
[[
    anno::display_name("Abs"),
    anno::description("Returns the absolute value of the input. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Abs"),
    icon(".icons/Abs.svg"),
    anno::ui_order(352)
]]
{ return math::abs(a); }

export float3 abs(float3 a=float3(0.))
[[
    anno::display_name("Abs"),
    anno::description("Returns the absolute value of the input. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Abs"),
    icon(".icons/Abs.svg"),
    anno::ui_order(353)
]]
{ return math::abs(a); }

export float4 abs(float4 a=float4(0.))
[[
    anno::display_name("Abs"),
    anno::description("Returns the absolute value of the input. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Abs"),
    icon(".icons/Abs.svg"),
    anno::ui_order(354)
]]
{ return math::abs(a); }

export color abs(color a=color(0.))
[[
    anno::display_name("Abs"),
    anno::description("Returns the absolute value of the input. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Abs"),
    icon(".icons/Abs.svg"),
    anno::ui_order(355)
]]
{ return math::abs(a); }

export float acos(float a=0.)
[[
    anno::display_name("Acos"),
    anno::description("Returns the inverse cosine in radians."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Acos"),
    icon(".icons/Acos.svg"),
    anno::ui_order(360)
]]
{ return math::acos(a); }

export float2 acos(float2 a=float2(0.))
[[
    anno::display_name("Acos"),
    anno::description("Returns the inverse cosine in radians. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Acos"),
    icon(".icons/Acos.svg"),
    anno::ui_order(361)
]]
{ return math::acos(a); }

export float3 acos(float3 a=float3(0.))
[[
    anno::display_name("Acos"),
    anno::description("Returns the inverse cosine in radians. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Acos"),
    icon(".icons/Acos.svg"),
    anno::ui_order(362)
]]
{ return math::acos(a); }

export float4 acos(float4 a=float4(0.))
[[
    anno::display_name("Acos"),
    anno::description("Returns the inverse cosine in radians. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Acos"),
    icon(".icons/Acos.svg"),
    anno::ui_order(363)
]]
{ return math::acos(a); }


export float asin(float a=0.)
[[
    anno::display_name("Asin"),
    anno::description("Returns the inverse sine in radians."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Asin"),
    icon(".icons/Asin.svg"),
    anno::ui_order(370)
]]
{ return math::asin(a); }

export float2 asin(float2 a=float2(0.))
[[
    anno::display_name("Asin"),
    anno::description("Returns the inverse sine in radians. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Asin"),
    icon(".icons/Asin.svg"),
    anno::ui_order(371)
]]
{ return math::asin(a); }

export float3 asin(float3 a=float3(0.))
[[
    anno::display_name("Asin"),
    anno::description("Returns the inverse sine in radians. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Asin"),
    icon(".icons/Asin.svg"),
    anno::ui_order(372)
]]
{ return math::asin(a); }

export float4 asin(float4 a=float4(0.))
[[
    anno::display_name("Asin"),
    anno::description("Returns the inverse sine in radians. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Asin"),
    icon(".icons/Asin.svg"),
    anno::ui_order(373)
]]
{ return math::asin(a); }

export float atan(float a=0.)
[[
    anno::display_name("Atan"),
    anno::description("Returns the inverse tangent in radians."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Atan"),
    icon(".icons/Atan.svg"),
    anno::ui_order(380)
]]
{ return math::atan(a); }

export float2 atan(float2 a=float2(0.))
[[
    anno::display_name("Atan"),
    anno::description("Returns the inverse tangent in radians. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Atan"),
    icon(".icons/Atan.svg"),
    anno::ui_order(381)
]]
{ return math::atan(a); }

export float3 atan(float3 a=float3(0.))
[[
    anno::display_name("Atan"),
    anno::description("Returns the inverse tangent in radians. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Atan"),
    icon(".icons/Atan.svg"),
    anno::ui_order(382)
]]
{ return math::atan(a); }

export float4 atan(float4 a=float4(0.))
[[
    anno::display_name("Atan"),
    anno::description("Returns the inverse tangent in radians. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Atan"),
    icon(".icons/Atan.svg"),
    anno::ui_order(383)
]]
{ return math::atan(a); }

export float atan2(
    float y=0. [[anno::description("Y component (numerator) used by atan2(y, x).")]],
    float x=0. [[anno::description("X component (denominator) used by atan2(y, x).")]]
)
[[
    anno::display_name("Atan2"),
    anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Atan2"),
    icon(".icons/Atan2.svg"),
    anno::ui_order(390)
]]
{ return math::atan2(y,x); }

export float2 atan2(
    float2 y=float2(0.) [[anno::description("Y component (numerator) used by atan2(y, x).")]],
    float2 x=float2(0.) [[anno::description("X component (denominator) used by atan2(y, x).")]]
)
[[
    anno::display_name("Atan2"),
    anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Atan2"),
    icon(".icons/Atan2.svg"),
    anno::ui_order(391)
]]
{ return math::atan2(y,x); }

export float3 atan2(
    float3 y=float3(0.) [[anno::description("Y component (numerator) used by atan2(y, x).")]],
    float3 x=float3(0.) [[anno::description("X component (denominator) used by atan2(y, x).")]]
)
[[
    anno::display_name("Atan2"),
    anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Atan2"),
    icon(".icons/Atan2.svg"),
    anno::ui_order(392)
]]
{ return math::atan2(y,x); }

export float4 atan2(
    float4 y=float4(0.) [[anno::description("Y component (numerator) used by atan2(y, x).")]],
    float4 x=float4(0.) [[anno::description("X component (denominator) used by atan2(y, x).")]]
)
[[
    anno::display_name("Atan2"),
    anno::description("Returns atan2(y, x) in radians, using both signs to determine the correct quadrant. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Atan2"),
    icon(".icons/Atan2.svg"),
    anno::ui_order(393)
]]
{ return math::atan2(y,x); }

export float average(float2 a=float2(0.))
[[
    anno::display_name("Average"),
    anno::description("Returns the arithmetic mean of all components in the input value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Average"),
    icon(".icons/Average.svg"),
    anno::ui_order(400)
]]
{ return math::average(a); }

export float average(float3 a=float3(0.))
[[
    anno::display_name("Average"),
    anno::description("Returns the arithmetic mean of all components in the input value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Average"),
    icon(".icons/Average.svg"),
    anno::ui_order(401)
]]
{ return math::average(a); }

export float average(float4 a=float4(0.))
[[
    anno::display_name("Average"),
    anno::description("Returns the arithmetic mean of all components in the input value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Average"),
    icon(".icons/Average.svg"),
    anno::ui_order(402)
]]
{ return math::average(a); }

export float average(color a=color(0.))
[[
    anno::display_name("Average"),
    anno::description("Returns the arithmetic mean of all components in the input value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Average"),
    icon(".icons/Average.svg"),
    anno::ui_order(403)
]]
{ return math::average(a); }

export float ceil(float a=0.)
[[
    anno::display_name("Ceil"),
    anno::description("Rounds each input value up to the nearest integer."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Ceil"),
    icon(".icons/Ceil.svg"),
    anno::ui_order(410)
]]
{ return math::ceil(a); }

export float2 ceil(float2 a=float2(0.))
[[
    anno::display_name("Ceil"),
    anno::description("Rounds each input value up to the nearest integer."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Ceil"),
    icon(".icons/Ceil.svg"),
    anno::ui_order(411)
]]
{ return math::ceil(a); }

export float3 ceil(float3 a=float3(0.))
[[
    anno::display_name("Ceil"),
    anno::description("Rounds each input value up to the nearest integer."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Ceil"),
    icon(".icons/Ceil.svg"),
    anno::ui_order(411)
]]
{ return math::ceil(a); }

export float4 ceil(float4 a=float4(0.))
[[
    anno::display_name("Ceil"),
    anno::description("Rounds each input value up to the nearest integer."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Ceil"),
    icon(".icons/Ceil.svg"),
    anno::ui_order(412)
]]
{ return math::ceil(a); }

export int clamp(
    int a=0 [[anno::description("Input value to clamp.")]],
    int min=0 [[anno::description("Lower bound of the output range.")]],
    int max=1 [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(420)
]]
{ return math::clamp(a,min,max); }

export float clamp(
    float a=0. [[anno::description("Input value to clamp.")]],
    float min=0. [[anno::description("Lower bound of the output range.")]],
    float max=0. [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(421)
]]
{ return math::clamp(a,min,max); }

export float2 clamp(
    float2 a=float2(0.) [[anno::description("Input value to clamp.")]],
    float2 min=float2(0.) [[anno::description("Lower bound of the output range.")]],
    float2 max=float2(1.) [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(422)
]]
{ return math::clamp(a,min,max); }

export float3 clamp(
    float3 a=float3(0.) [[anno::description("Input value to clamp.")]],
    float3 min=float3(0.) [[anno::description("Lower bound of the output range.")]],
    float3 max=float3(1.) [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(423)
]]
{ return math::clamp(a,min,max); }

export float4 clamp(
    float4 a=float4(0.) [[anno::description("Input value to clamp.")]],
    float4 min=float4(0.) [[anno::description("Lower bound of the output range.")]],
    float4 max=float4(1.) [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(424)
]]
{ return math::clamp(a,min,max); }

export color clamp(
    color a=color(0.) [[anno::description("Input value to clamp.")]],
    color min=color(0.) [[anno::description("Lower bound of the output range.")]],
    color max=color(1.) [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(425)
]]
{ return math::clamp(a,min,max); }

export float2 clamp(
    float2 a=float2(0.) [[anno::description("Input value to clamp.")]],
    float2 min=float2(0.) [[anno::description("Lower bound of the output range.")]],
    float max=1. [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(426)
]]
{ return math::clamp(a,min,max); }

export float2 clamp(
    float2 a=float2(0.) [[anno::description("Input value to clamp.")]],
    float min=0. [[anno::description("Lower bound of the output range.")]],
    float2 max=float2(1.) [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(427)
]]
{ return math::clamp(a,min,max); }

export float2 clamp(
    float2 a=float2(0.) [[anno::description("Input value to clamp.")]],
    float min=0. [[anno::description("Lower bound of the output range.")]],
    float max=1. [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(428)
]]
{ return math::clamp(a,min,max); }

export float3 clamp(
    float3 a=float3(0.) [[anno::description("Input value to clamp.")]],
    float3 min=float3(0.) [[anno::description("Lower bound of the output range.")]],
    float max=0. [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(429)
]]
{ return math::clamp(a,min,max); }

export float3 clamp(
    float3 a=float3(0.) [[anno::description("Input value to clamp.")]],
    float min=0. [[anno::description("Lower bound of the output range.")]],
    float3 max=float3(1.) [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(430)
]]
{ return math::clamp(a,min,max); }

export float3 clamp(
    float3 a=float3(0.) [[anno::description("Input value to clamp.")]],
    float min=0. [[anno::description("Lower bound of the output range.")]],
    float max=0. [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(431)
]]
{ return math::clamp(a,min,max); }

export float4 clamp(
    float4 a=float4(0.) [[anno::description("Input value to clamp.")]],
    float4 min=float4(0.) [[anno::description("Lower bound of the output range.")]],
    float max=0. [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(432)
]]
{ return math::clamp(a,min,max); }

export float4 clamp(
    float4 a=float4(0.) [[anno::description("Input value to clamp.")]],
    float min=0. [[anno::description("Lower bound of the output range.")]],
    float4 max=float4(1.) [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(433)
]]
{ return math::clamp(a,min,max); }

export float4 clamp(
    float4 a=float4(0.) [[anno::description("Input value to clamp.")]],
    float min=0. [[anno::description("Lower bound of the output range.")]],
    float max=0. [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(434)
]]
{ return math::clamp(a,min,max); }

export color clamp(
    color a=color(0.) [[anno::description("Input value to clamp.")]],
    color min=color(0.) [[anno::description("Lower bound of the output range.")]],
    float max=0. [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(435)
]]
{ return math::clamp(a,min,max); }

export color clamp(
    color a=color(0.) [[anno::description("Input value to clamp.")]],
    float min=0. [[anno::description("Lower bound of the output range.")]],
    color max=color(1.) [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(436)
]]
{ return math::clamp(a,min,max); }

export color clamp(
    color a=color(0.) [[anno::description("Input value to clamp.")]],
    float min=0. [[anno::description("Lower bound of the output range.")]],
    float max=0. [[anno::description("Upper bound of the output range.")]]
)
[[
    anno::display_name("Clamp"),
    anno::description("Clamps the input to the inclusive [min, max] range. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Clamp"),
    icon(".icons/Clamp.svg"),
    anno::ui_order(437)
]]
{ return math::clamp(a,min,max); }

export float cos(float a=0.)
[[
    anno::display_name("Cos"),
    anno::description("Returns the cosine of the input angle in radians."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Cos"),
    icon(".icons/Cos.svg"),
    anno::ui_order(440)
]]
{ return math::cos(a); }

export float2 cos(float2 a=float2(0.))
[[
    anno::display_name("Cos"),
    anno::description("Returns the cosine of the input angle in radians. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Cos"),
    icon(".icons/Cos.svg"),
    anno::ui_order(441)
]]
{ return math::cos(a); }

export float3 cos(float3 a=float3(0.))
[[
    anno::display_name("Cos"),
    anno::description("Returns the cosine of the input angle in radians. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Cos"),
    icon(".icons/Cos.svg"),
    anno::ui_order(442)
]]
{ return math::cos(a); }

export float4 cos(float4 a=float4(0.))
[[
    anno::display_name("Cos"),
    anno::description("Returns the cosine of the input angle in radians. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Cos"),
    icon(".icons/Cos.svg"),
    anno::ui_order(443)
]]
{ return math::cos(a); }

export float3 cross(float3 a=float3(0.), float3 b=float3(0.))
[[
    anno::display_name("Cross"),
    anno::description("Returns the 3D cross product of the two input vectors."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions"),
    icon(".icons/cross_product.svg"),
    anno::ui_order(449)
]]
{ return math::cross(a,b); }

export float degrees(
    float a=0. [[anno::description("Input angle in radians.")]]
)
[[
    anno::display_name("Degrees"),
    anno::description("Converts an angle from radians to degrees."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Degrees"),
    icon(".icons/Degrees.svg"),
    anno::ui_order(450)
]]
{ return math::degrees(a); }

export float2 degrees(
    float2 a=float2(0.) [[anno::description("Input angle in radians.")]]
)
[[
    anno::display_name("Degrees"),
    anno::description("Converts an angle from radians to degrees. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Degrees"),
    icon(".icons/Degrees.svg"),
    anno::ui_order(451)
]]
{ return math::degrees(a); }

export float3 degrees(
    float3 a=float3(0.) [[anno::description("Input angle in radians.")]]
)
[[
    anno::display_name("Degrees"),
    anno::description("Converts an angle from radians to degrees. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Degrees"),
    icon(".icons/Degrees.svg"),
    anno::ui_order(452)
]]
{ return math::degrees(a); }

export float4 degrees(
    float4 a=float4(0.) [[anno::description("Input angle in radians.")]]
)
[[
    anno::display_name("Degrees"),
    anno::description("Converts an angle from radians to degrees. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Degrees"),
    icon(".icons/Degrees.svg"),
    anno::ui_order(453)
]]
{ return math::degrees(a); }

export float distance(float a=0., float b=0.)
[[
    anno::display_name("Distance"),
    anno::description("Returns the Euclidean distance between the two input points."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Distance"),
    icon(".icons/Distance.svg"),
    anno::ui_order(460)
]]
{ return math::distance(a,b); }

export float distance(float2 a=float2(0.), float2 b=float2(0.))
[[
    anno::display_name("Distance"),
    anno::description("Returns the Euclidean distance between the two input points."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Distance"),
    icon(".icons/Distance.svg"),
    anno::ui_order(461)
]]
{ return math::distance(a,b); }

export float distance(float3 a=float3(0.), float3 b=float3(0.))
[[
    anno::display_name("Distance"),
    anno::description("Returns the Euclidean distance between the two input points."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Distance"),
    icon(".icons/Distance.svg"),
    anno::ui_order(462)
]]
{ return math::distance(a,b); }

export float distance(float4 a=float4(0.), float4 b=float4(0.))
[[
    anno::display_name("Distance"),
    anno::description("Returns the Euclidean distance between the two input points."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Distance"),
    icon(".icons/Distance.svg"),
    anno::ui_order(463)
]]
{ return math::distance(a,b); }

export float dot(float2 a=float2(0.), float2 b=float2(0.))
[[
    anno::display_name("Dot"),
    anno::description("Returns the dot product (scalar projection) of the two input vectors."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Dot"),
    icon(".icons/Dot.svg"),
    anno::ui_order(470)
]]
{ return math::dot(a,b); }

export float dot(float3 a=float3(0.), float3 b=float3(0.))
[[
    anno::display_name("Dot"),
    anno::description("Returns the dot product (scalar projection) of the two input vectors."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Dot"),
    icon(".icons/Dot.svg"),
    anno::ui_order(471)
]]
{ return math::dot(a,b); }

export float dot(float4 a=float4(0.), float4 b=float4(0.))
[[
    anno::display_name("Dot"),
    anno::description("Returns the dot product (scalar projection) of the two input vectors."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Dot"),
    icon(".icons/Dot.svg"),
    anno::ui_order(472)
]]
{ return math::dot(a,b); }

export float exp(float a=0.)
[[
    anno::display_name("Exp"),
    anno::description("Returns e raised to the input value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Exp"),
    icon(".icons/Exp.svg"),
    anno::ui_order(480)
]]
{ return math::exp(a); }

export float2 exp(float2 a=float2(0.))
[[
    anno::display_name("Exp"),
    anno::description("Returns e raised to the input value. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Exp"),
    icon(".icons/Exp.svg"),
    anno::ui_order(481)
]]
{ return math::exp(a); }

export float3 exp(float3 a=float3(0.))
[[
    anno::display_name("Exp"),
    anno::description("Returns e raised to the input value. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Exp"),
    icon(".icons/Exp.svg"),
    anno::ui_order(481)
]]
{ return math::exp(a); }

export float4 exp(float4 a=float4(0.))
[[
    anno::display_name("Exp"),
    anno::description("Returns e raised to the input value. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Exp"),
    icon(".icons/Exp.svg"),
    anno::ui_order(482)
]]
{ return math::exp(a); }

export color exp(color a=color(0.))
[[
    anno::display_name("Exp"),
    anno::description("Returns e raised to the input value. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Exp"),
    icon(".icons/Exp.svg"),
    anno::ui_order(483)
]]
{ return math::exp(a); }

export float exp2(float a=0.)
[[
    anno::display_name("Exp 2"),
    anno::description("Returns 2 raised to the input value."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Exp2"),
    icon(".icons/Exp2.svg"),
    anno::ui_order(490)
]]
{ return math::exp2(a); }

export float2 exp2(float2 a=float2(0.))
[[
    anno::display_name("Exp 2"),
    anno::description("Returns 2 raised to the input value. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Exp2"),
    icon(".icons/Exp2.svg"),
    anno::ui_order(491)
]]
{ return math::exp2(a); }

export float3 exp2(float3 a=float3(0.))
[[
    anno::display_name("Exp 2"),
    anno::description("Returns 2 raised to the input value. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Exp2"),
    icon(".icons/Exp2.svg"),
    anno::ui_order(492)
]]
{ return math::exp2(a); }

export float4 exp2(float4 a=float4(0.))
[[
    anno::display_name("Exp 2"),
    anno::description("Returns 2 raised to the input value. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Exp2"),
    icon(".icons/Exp2.svg"),
    anno::ui_order(493)
]]
{ return math::exp2(a); }

export color exp2(color a=color(0.))
[[
    anno::display_name("Exp 2"),
    anno::description("Returns 2 raised to the input value. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Exp2"),
    icon(".icons/Exp2.svg"),
    anno::ui_order(494)
]]
{ return math::exp2(a); }

export float floor(float a=0.)
[[
    anno::display_name("Floor"),
    anno::description("Rounds each input value down to the nearest integer."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Floor"),
    icon(".icons/Floor.svg"),
    anno::ui_order(500)
]]
{ return math::floor(a); }

export float2 floor(float2 a=float2(0.))
[[
    anno::display_name("Floor"),
    anno::description("Rounds each input value down to the nearest integer."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Floor"),
    icon(".icons/Floor.svg"),
    anno::ui_order(501)
]]
{ return math::floor(a); }

export float3 floor(float3 a=float3(0.))
[[
    anno::display_name("Floor"),
    anno::description("Rounds each input value down to the nearest integer."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Floor"),
    icon(".icons/Floor.svg"),
    anno::ui_order(502)
]]
{ return math::floor(a); }

export float4 floor(float4 a=float4(0.))
[[
    anno::display_name("Floor"),
    anno::description("Rounds each input value down to the nearest integer."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Floor"),
    icon(".icons/Floor.svg"),
    anno::ui_order(503)
]]
{ return math::floor(a); }

export float fmod(
    float a=0. [[anno::description("Dividend input.")]],
    float b=1. [[anno::description("Divisor input.")]]
)
[[
    anno::display_name("Fmod"),
    anno::description("Returns the floating-point remainder of dividing a by b."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Fmod"),
    icon(".icons/Fmod.svg"),
    anno::ui_order(510)
]]
{ return math::fmod(a,b); }

export float2 fmod(
    float2 a=float2(0.) [[anno::description("Dividend input.")]],
    float2 b=float2(1.) [[anno::description("Divisor input.")]]
)
[[
    anno::display_name("Fmod"),
    anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Fmod"),
    icon(".icons/Fmod.svg"),
    anno::ui_order(511)
]]
{ return math::fmod(a,b); }

export float3 fmod(
    float3 a=float3(0.) [[anno::description("Dividend input.")]],
    float3 b=float3(1.) [[anno::description("Divisor input.")]]
)
[[
    anno::display_name("Fmod"),
    anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Fmod"),
    icon(".icons/Fmod.svg"),
    anno::ui_order(512)
]]
{ return math::fmod(a,b); }

export float4 fmod(
    float4 a=float4(0.) [[anno::description("Dividend input.")]],
    float4 b=float4(1.) [[anno::description("Divisor input.")]]
)
[[
    anno::display_name("Fmod"),
    anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Fmod"),
    icon(".icons/Fmod.svg"),
    anno::ui_order(513)
]]
{ return math::fmod(a,b); }

export float2 fmod(
    float2 a=float2(0.) [[anno::description("Dividend input.")]],
    float b=1. [[anno::description("Divisor input.")]]
)
[[
    anno::display_name("Fmod"),
    anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Fmod"),
    icon(".icons/Fmod.svg"),
    anno::ui_order(514)
]]
{ return math::fmod(a,b); }

export float3 fmod(
    float3 a=float3(0.) [[anno::description("Dividend input.")]],
    float b=1. [[anno::description("Divisor input.")]]
)
[[
    anno::display_name("Fmod"),
    anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Fmod"),
    icon(".icons/Fmod.svg"),
    anno::ui_order(515)
]]
{ return math::fmod(a,b); }

export float4 fmod(
    float4 a=float4(0.) [[anno::description("Dividend input.")]],
    float b=1. [[anno::description("Divisor input.")]]
)
[[
    anno::display_name("Fmod"),
    anno::description("Returns the floating-point remainder of dividing a by b. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Fmod"),
    icon(".icons/Fmod.svg"),
    anno::ui_order(516)
]]
{ return math::fmod(a,b); }

export float frac(float a=0.)
[[
    anno::display_name("Frac"),
    anno::description("Returns the positive fractional part of the input."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Frac"),
    icon(".icons/Frac.svg"),
    anno::ui_order(520)
]]
{ return math::frac(a); }

export float2 frac(float2 a=float2(0.))
[[
    anno::display_name("Frac"),
    anno::description("Returns the positive fractional part of the input. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Frac"),
    icon(".icons/Frac.svg"),
    anno::ui_order(521)
]]
{ return math::frac(a); }

export float3 frac(float3 a=float3(0.))
[[
    anno::display_name("Frac"),
    anno::description("Returns the positive fractional part of the input. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Frac"),
    icon(".icons/Frac.svg"),
    anno::ui_order(522)
]]
{ return math::frac(a); }

export float4 frac(float4 a=float4(0.))
[[
    anno::display_name("Frac"),
    anno::description("Returns the positive fractional part of the input. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Frac"),
    icon(".icons/Frac.svg"),
    anno::ui_order(523)
]]
{ return math::frac(a); }

export float length(float2 a=float2(0.))
[[
    anno::display_name("Length"),
    anno::description("Returns the Euclidean length (magnitude) of the input vector."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Length"),
    icon(".icons/Length.svg"),
    anno::ui_order(530)
]]
{ return math::length(a); }

export float length(float3 a=float3(0.))
[[
    anno::display_name("Length"),
    anno::description("Returns the Euclidean length (magnitude) of the input vector."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Length"),
    icon(".icons/Length.svg"),
    anno::ui_order(531)
]]
{ return math::length(a); }

export float length(float4 a=float4(0.))
[[
    anno::display_name("Length"),
    anno::description("Returns the Euclidean length (magnitude) of the input vector."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Length"),
    icon(".icons/Length.svg"),
    anno::ui_order(532)
]]
{ return math::length(a); }

export float lerp(
    float a=0. [[anno::description("Start value at interpolation factor 0.")]],
    float b=1. [[anno::description("End value at interpolation factor 1.")]],
    float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]]
)
[[
    anno::display_name("Lerp"),
    anno::description("Linearly interpolates between a and b using interpolation factor l."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Lerp"),
    icon(".icons/Lerp.svg"),
    anno::ui_order(540)
]]
{ return math::lerp(a,b,l); }

export float2 lerp(
    float2 a=float2(0.) [[anno::description("Start value at interpolation factor 0.")]],
    float2 b=float2(1.) [[anno::description("End value at interpolation factor 1.")]],
    float2 l=float2(0.)[[anno::soft_range(float2(0.0),float2(1.)), anno::description("Interpolation factor between a and b.")]]
)
[[
    anno::display_name("Lerp"),
    anno::description("Linearly interpolates between a and b using interpolation factor l."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Lerp"),
    icon(".icons/Lerp.svg"),
    anno::ui_order(541)
]]
{ return math::lerp(a,b,l); }

export float3 lerp(
    float3 a=float3(0.) [[anno::description("Start value at interpolation factor 0.")]],
    float3 b=float3(1.) [[anno::description("End value at interpolation factor 1.")]],
    float3 l=float3(0.)[[anno::soft_range(float3(0.0),float3(1.)), anno::description("Interpolation factor between a and b.")]]
)
[[
    anno::display_name("Lerp"),
    anno::description("Linearly interpolates between a and b using interpolation factor l."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Lerp"),
    icon(".icons/Lerp.svg"),
    anno::ui_order(542)
]]
{ return math::lerp(a,b,l); }

export float4 lerp(
    float4 a=float4(0.) [[anno::description("Start value at interpolation factor 0.")]],
    float4 b=float4(1.) [[anno::description("End value at interpolation factor 1.")]],
    float4 l=float4(0.)[[anno::soft_range(float4(0.0),float4(1.)), anno::description("Interpolation factor between a and b.")]]
)
[[
    anno::display_name("Lerp"),
    anno::description("Linearly interpolates between a and b using interpolation factor l."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Lerp"),
    icon(".icons/Lerp.svg"),
    anno::ui_order(543)
]]
{ return math::lerp(a,b,l); }

export float2 lerp(
    float2 a=float2(0.) [[anno::description("Start value at interpolation factor 0.")]],
    float2 b=float2(1.) [[anno::description("End value at interpolation factor 1.")]],
    float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]]
)
[[
    anno::display_name("Lerp"),
    anno::description("Linearly interpolates between a and b using interpolation factor l."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Lerp"),
    icon(".icons/Lerp.svg"),
    anno::ui_order(544)
]]
{ return math::lerp(a,b,l); }

export float3 lerp(
    float3 a=float3(0.) [[anno::description("Start value at interpolation factor 0.")]],
    float3 b=float3(1.) [[anno::description("End value at interpolation factor 1.")]],
    float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]]
)
[[
    anno::display_name("Lerp"),
    anno::description("Linearly interpolates between a and b using interpolation factor l."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Lerp"),
    icon(".icons/Lerp.svg"),
    anno::ui_order(545)
]]
{ return math::lerp(a,b,l); }

export float4 lerp(
    float4 a=float4(0.) [[anno::description("Start value at interpolation factor 0.")]],
    float4 b=float4(1.) [[anno::description("End value at interpolation factor 1.")]],
    float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]]
)
[[
    anno::display_name("Lerp"),
    anno::description("Linearly interpolates between a and b using interpolation factor l."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Lerp"),
    icon(".icons/Lerp.svg"),
    anno::ui_order(546)
]]
{ return math::lerp(a,b,l); }

export color lerp(
    color a=color(0.) [[anno::description("Start value at interpolation factor 0.")]],
    color b=color(1.) [[anno::description("End value at interpolation factor 1.")]],
    color l=color(0.)[[anno::soft_range(color(0.0),color(1.)), anno::description("Interpolation factor between a and b.")]]
)
[[
    anno::display_name("Lerp"),
    anno::description("Linearly interpolates between a and b using interpolation factor l."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Lerp"),
    icon(".icons/Lerp.svg"),
    anno::ui_order(547)
]]
{ return math::lerp(a,b,l); }

export color lerp(
    color a=color(0.) [[anno::description("Start value at interpolation factor 0.")]],
    color b=color(1.) [[anno::description("End value at interpolation factor 1.")]],
    float l=0.[[anno::soft_range(0.0,1.), anno::description("Interpolation factor between a and b.")]]
)
[[
    anno::display_name("Lerp"),
    anno::description("Linearly interpolates between a and b using interpolation factor l."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Lerp"),
    icon(".icons/Lerp.svg"),
    anno::ui_order(548)
]]
{ return math::lerp(a,b,l); }

export float log(float a=1.)
[[
    anno::display_name("Log"),
    anno::description("Computes the natural logarithm (base e) of the input."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Log"),
    icon(".icons/Log.svg"),
    anno::ui_order(550)
]]
{ return math::log(a); }

export float2 log(float2 a=float2(1.))
[[
    anno::display_name("Log"),
    anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Log"),
    icon(".icons/Log.svg"),
    anno::ui_order(551)
]]
{ return math::log(a); }

export float3 log(float3 a=float3(1.))
[[
    anno::display_name("Log"),
    anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Log"),
    icon(".icons/Log.svg"),
    anno::ui_order(552)
]]
{ return math::log(a); }

export float4 log(float4 a=float4(1.))
[[
    anno::display_name("Log"),
    anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Log"),
    icon(".icons/Log.svg"),
    anno::ui_order(553)
]]
{ return math::log(a); }

export color log(color a=color(1.))
[[
    anno::display_name("Log"),
    anno::description("Computes the natural logarithm (base e) of the input. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Log"),
    icon(".icons/Log.svg"),
    anno::ui_order(554)
]]
{ return math::log(a); }

export float log2(float a=1.)
[[
    anno::display_name("Log 2"),
    anno::description("Computes the base-2 logarithm of the input."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Log2"),
    icon(".icons/Log2.svg"),
    anno::ui_order(560)
]]
{ return math::log2(a); }

export float2 log2(float2 a=float2(1.))
[[
    anno::display_name("Log 2"),
    anno::description("Computes the base-2 logarithm of the input. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Log2"),
    icon(".icons/Log2.svg"),
    anno::ui_order(561)
]]
{ return math::log2(a); }

export float3 log2(float3 a=float3(1.))
[[
    anno::display_name("Log 2"),
    anno::description("Computes the base-2 logarithm of the input. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Log2"),
    icon(".icons/Log2.svg"),
    anno::ui_order(562)
]]
{ return math::log2(a); }

export float4 log2(float4 a=float4(1.))
[[
    anno::display_name("Log 2"),
    anno::description("Computes the base-2 logarithm of the input. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Log2"),
    icon(".icons/Log2.svg"),
    anno::ui_order(563)
]]
{ return math::log2(a); }

export color log2(color a=color(1.))
[[
    anno::display_name("Log 2"),
    anno::description("Computes the base-2 logarithm of the input. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Log2"),
    icon(".icons/Log2.svg"),
    anno::ui_order(564)
]]
{ return math::log2(a); }

export float log10(float a=1.)
[[
    anno::display_name("Log 10"),
    anno::description("Computes the base-10 logarithm of the input."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Log10"),
    icon(".icons/Log10.svg"),
    anno::ui_order(570)
]]
{ return math::log10(a); }

export float2 log10(float2 a=float2(1.))
[[
    anno::display_name("Log 10"),
    anno::description("Computes the base-10 logarithm of the input. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Log10"),
    icon(".icons/Log10.svg"),
    anno::ui_order(571)
]]
{ return math::log10(a); }

export float3 log10(float3 a=float3(1.))
[[
    anno::display_name("Log 10"),
    anno::description("Computes the base-10 logarithm of the input. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Log10"),
    icon(".icons/Log10.svg"),
    anno::ui_order(572)
]]
{ return math::log10(a); }

export float4 log10(float4 a=float4(1.))
[[
    anno::display_name("Log 10"),
    anno::description("Computes the base-10 logarithm of the input. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Log10"),
    icon(".icons/Log10.svg"),
    anno::ui_order(573)
]]
{ return math::log10(a); }

export color log10(color a=color(1.))
[[
    anno::display_name("Log 10"),
    anno::description("Computes the base-10 logarithm of the input. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Log10"),
    icon(".icons/Log10.svg"),
    anno::ui_order(574)
]]
{ return math::log10(a); }

export float luminance(float3 a=float3(0.))
[[
    anno::display_name("Luminance"),
    anno::description("Computes luminance (Y) from the input color using standard RGB weighting."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Luminance"),
    icon(".icons/Luminance.svg"),
    anno::ui_order(580)
]]
{ return math::luminance(a); }

export float luminance(color a=color(0.))
[[
    anno::display_name("Luminance"),
    anno::description("Computes luminance (Y) from the input color using standard RGB weighting."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Luminance"),
    icon(".icons/Luminance.svg"),
    anno::ui_order(581)
]]
{ return math::luminance(a); }

export float luminance(float4 a=float4(0.))
[[
    anno::display_name("Luminance"),
    anno::description("Computes luminance (Y) from the input color using standard RGB weighting."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Luminance"),
    icon(".icons/Luminance.svg"),
    anno::ui_order(582)
]]
{ return math::luminance(float3(a.x,a.y,a.z)); }

export int max(int a=0, int b=0)
[[
    anno::display_name("Maximum"),
    anno::description("Returns the larger of the two inputs."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(590)
]]
{ return math::max(a,b); }

export float max(float a=0., float b=0.)
[[
    anno::display_name("Maximum"),
    anno::description("Returns the larger of the two inputs."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(591)
]]
{ return math::max(a,b); }

export float2 max(float2 a=float2(0.), float2 b=float2(0.))
[[
    anno::display_name("Maximum"),
    anno::description("Returns the larger of the two inputs. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(592)
]]
{ return math::max(a,b); }

export float3 max(float3 a=float3(0.), float3 b=float3(0.))
[[
    anno::display_name("Maximum"),
    anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(593)
]]
{ return math::max(a,b); }

export float4 max(float4 a=float4(0.), float4 b=float4(0.))
[[
    anno::display_name("Maximum"),
    anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(594)
]]
{ return math::max(a,b); }

export float2 max(float2 a=float2(0.), float b=0.)
[[
    anno::display_name("Maximum"),
    anno::description("Returns the larger of the two inputs. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(595)
]]
{ return math::max(a,b); }

export float3 max(float3 a=float3(0.), float b=0.)
[[
    anno::display_name("Maximum"),
    anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(596)
]]
{ return math::max(a,b); }

export float4 max(float4 a=float4(0.), float b=0.)
[[
    anno::display_name("Maximum"),
    anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(597)
]]
{ return math::max(a,b); }

export float2 max(float a=0., float2 b=float2(0.))
[[
    anno::display_name("Maximum"),
    anno::description("Returns the larger of the two inputs. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(598)
]]
{ return math::max(a,b); }

export float3 max(float a=0., float3 b=float3(0.))
[[
    anno::display_name("Maximum"),
    anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(599)
]]
{ return math::max(a,b); }

export float4 max(float a=0., float4 b=float4(0.))
[[
    anno::display_name("Maximum"),
    anno::description("Returns the larger of the two inputs. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(600)
]]
{ return math::max(a,b); }

export color max(color a=color(0.), color b=color(0.))
[[
    anno::display_name("Maximum"),
    anno::description("Returns the larger of the two inputs. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(601)
]]
{ return math::max(a,b); }

export color max(float a=0., color b=0.)
[[
    anno::display_name("Maximum"),
    anno::description("Returns the larger of the two inputs. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(602)
]]
{ return math::max(a,b); }

export color max(color a=color(0.), float b=0.)
[[
    anno::display_name("Maximum"),
    anno::description("Returns the larger of the two inputs. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(603)
]]
{ return math::max(a,b); }

export float max_value(float2 a=float2(0.))
[[
    anno::display_name("Maximum value"),
    anno::description("Returns the largest component value in the input."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(610)
]]
{ return math::max_value(a); }

export float max_value(float3 a=float3(0.))
[[
    anno::display_name("Maximum value"),
    anno::description("Returns the largest component value in the input."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(611)
]]
{ return math::max_value(a); }

export float max_value(float4 a=float4(0.))
[[
    anno::display_name("Maximum value"),
    anno::description("Returns the largest component value in the input."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(612)
]]
{ return math::max_value(a); }

export float max_value(color a=color(0.))
[[
    anno::display_name("Maximum value"),
    anno::description("Returns the largest channel value in the input color."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Max"),
    icon(".icons/Max.svg"),
    anno::ui_order(613)
]]
{ return math::max_value(a); }

export int min(int a=0, int b=0)
[[
    anno::display_name("Minimum"),
    anno::description("Returns the smaller of the two inputs."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(620)
]]
{ return math::min(a,b); }

export float min(float a=0., float b=0.)
[[
    anno::display_name("Minimum"),
    anno::description("Returns the smaller of the two inputs."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(621)
]]
{ return math::min(a,b); }

export float2 min(float2 a=float2(0.), float2 b=float2(0.))
[[
    anno::display_name("Minimum"),
    anno::description("Returns the smaller of the two inputs. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(622)
]]
{ return math::min(a,b); }

export float3 min(float3 a=float3(0.), float3 b=float3(0.))
[[
    anno::display_name("Minimum"),
    anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(623)
]]
{ return math::min(a,b); }

export float4 min(float4 a=float4(0.), float4 b=float4(0.))
[[
    anno::display_name("Minimum"),
    anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(624)
]]
{ return math::min(a,b); }

export float2 min(float2 a=float2(0.), float b=0.)
[[
    anno::display_name("Minimum"),
    anno::description("Returns the smaller of the two inputs. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(625)
]]
{ return math::min(a,b); }

export float3 min(float3 a=float3(0.), float b=0.)
[[
    anno::display_name("Minimum"),
    anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(626)
]]
{ return math::min(a,b); }

export float4 min(float4 a=float4(0.), float b=0.)
[[
    anno::display_name("Minimum"),
    anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(627)
]]
{ return math::min(a,b); }

export float2 min(float a=0., float2 b=float2(0.))
[[
    anno::display_name("Minimum"),
    anno::description("Returns the smaller of the two inputs. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(628)
]]
{ return math::min(a,b); }

export float3 min(float a=0., float3 b=float3(0.))
[[
    anno::display_name("Minimum"),
    anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(629)
]]
{ return math::min(a,b); }

export float4 min(float a=0., float4 b=float4(0.))
[[
    anno::display_name("Minimum"),
    anno::description("Returns the smaller of the two inputs. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(630)
]]
{ return math::min(a,b); }

export color min(color a=color(0.), color b=color(0.))
[[
    anno::display_name("Minimum"),
    anno::description("Returns the smaller of the two inputs. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(631)
]]
{ return math::min(a,b); }

export color min(float a=0., color b=color(0.))
[[
    anno::display_name("Minimum"),
    anno::description("Returns the smaller of the two inputs. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(632)
]]
{ return math::min(a,b); }

export color min(color a=color(0.), float b=0.)
[[
    anno::display_name("Minimum"),
    anno::description("Returns the smaller of the two inputs. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(633)
]]
{ return math::min(a,b); }

export float min_value(float a=0.)
[[
    anno::display_name("Minimum value"),
    anno::description("Returns the smallest component value in the input."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(640)
]]
{ return math::min_value(a); }

export float min_value(float2 a=float2(0.))
[[
    anno::display_name("Minimum value"),
    anno::description("Returns the smallest component value in the input."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(641)
]]
{ return math::min_value(a); }

export float min_value(float3 a=float3(0.))
[[
    anno::display_name("Minimum value"),
    anno::description("Returns the smallest component value in the input."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(642)
]]
{ return math::min_value(a); }

export float min_value(float4 a=float4(0.))
[[
    anno::display_name("Minimum value"),
    anno::description("Returns the smallest component value in the input."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(643)
]]
{ return math::min_value(a); }

export float min_value(color a=color(0.))
[[
    anno::display_name("Minimum value"),
    anno::description("Returns the smallest channel value in the input color."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Min"),
    icon(".icons/Min.svg"),
    anno::ui_order(644)
]]
{ return math::min_value(a); }

export float2 normalize(
    float2 a=float2(0.) [[anno::description("Input vector to normalize.")]]
)
[[
    anno::display_name("Normalize"),
    anno::description("Normalizes the input vector to unit length (length 1)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Normalize"),
    icon(".icons/Normalize.svg"),
    anno::ui_order(650)
]]
{ return math::normalize(a); }

export float3 normalize(
    float3 a=float3(0.) [[anno::description("Input vector to normalize.")]]
)
[[
    anno::display_name("Normalize"),
    anno::description("Normalizes the input vector to unit length (length 1)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Normalize"),
    icon(".icons/Normalize.svg"),
    anno::ui_order(651)
]]
{ return math::normalize(a); }

export float4 normalize(
    float4 a=float4(0.) [[anno::description("Input vector to normalize.")]]
)
[[
    anno::display_name("Normalize"),
    anno::description("Normalizes the input vector to unit length (length 1)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Normalize"),
    icon(".icons/Normalize.svg"),
    anno::ui_order(652)
]]
{ return math::normalize(a); }

export int pow(
    int a=0 [[anno::description("Base value.")]],
    int b=0 [[anno::description("Exponent value.")]]
)
[[
    anno::display_name("Pow"),
    anno::description("Raises a to the power b."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Pow"),
    icon(".icons/Pow.svg"),
    anno::ui_order(660)
]]
{ return math::pow(a,b); }

export float pow(
    float a=0. [[anno::description("Base value.")]],
    float b=0. [[anno::description("Exponent value.")]]
)
[[
    anno::display_name("Pow"),
    anno::description("Raises a to the power b. Parameter a must not be negative."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Pow"),
    icon(".icons/Pow.svg"),
    anno::ui_order(661)
]]
{ return math::pow(a,b); }

export float2 pow(
    float2 a=float2(0.) [[anno::description("Base value.")]],
    float2 b=float2(0.) [[anno::description("Exponent value.")]]
)
[[
    anno::display_name("Pow"),
    anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Pow"),
    icon(".icons/Pow.svg"),
    anno::ui_order(662)
]]
{ return math::pow(a,b); }

export float3 pow(
    float3 a=float3(0.) [[anno::description("Base value.")]],
    float3 b=float3(0.) [[anno::description("Exponent value.")]]
)
[[
    anno::display_name("Pow"),
    anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Pow"),
    icon(".icons/Pow.svg"),
    anno::ui_order(663)
]]
{ return math::pow(a,b); }

export float4 pow(
    float4 a=float4(0.) [[anno::description("Base value.")]],
    float4 b=float4(0.) [[anno::description("Exponent value.")]]
)
[[
    anno::display_name("Pow"),
    anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Pow"),
    icon(".icons/Pow.svg"),
    anno::ui_order(664)
]]
{ return math::pow(a,b); }

export float2 pow(
    float2 a=float2(0.) [[anno::description("Base value.")]],
    float b=0. [[anno::description("Exponent value.")]]
)
[[
    anno::display_name("Pow"),
    anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Pow"),
    icon(".icons/Pow.svg"),
    anno::ui_order(665)
]]
{ return math::pow(a,b); }

export float3 pow(
    float3 a=float3(0.) [[anno::description("Base value.")]],
    float b=0. [[anno::description("Exponent value.")]]
)
[[
    anno::display_name("Pow"),
    anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Pow"),
    icon(".icons/Pow.svg"),
    anno::ui_order(666)
]]
{ return math::pow(a,b); }

export float4 pow(
    float4 a=float4(0.) [[anno::description("Base value.")]],
    float b=0. [[anno::description("Exponent value.")]]
)
[[
    anno::display_name("Pow"),
    anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Pow"),
    icon(".icons/Pow.svg"),
    anno::ui_order(667)
]]
{ return math::pow(a,b); }

export color pow(
    color a=color(0.) [[anno::description("Base value.")]],
    color b=color(0.) [[anno::description("Exponent value.")]]
)
[[
    anno::display_name("Pow"),
    anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Pow"),
    icon(".icons/Pow.svg"),
    anno::ui_order(668)
]]
{ return math::pow(a,b); }

export color pow(
    color a=color(0.) [[anno::description("Base value.")]],
    float b=0. [[anno::description("Exponent value.")]]
)
[[
    anno::display_name("Pow"),
    anno::description("Raises a to the power b. Parameter a must not be negative. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Pow"),
    icon(".icons/Pow.svg"),
    anno::ui_order(669)
]]
{ return math::pow(a,b); }

export float radians(
    float a=0. [[anno::description("Input angle in degrees.")]]
)
[[
    anno::display_name("Radians"),
    anno::description("Converts an angle from degrees to radians."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Radians"),
    icon(".icons/Radians.svg"),
    anno::ui_order(670)
]]
{ return math::radians(a); }

export float2 radians(
    float2 a=float2(0.) [[anno::description("Input angle in degrees.")]]
)
[[
    anno::display_name("Radians"),
    anno::description("Converts an angle from degrees to radians. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Radians"),
    icon(".icons/Radians.svg"),
    anno::ui_order(671)
]]
{ return math::radians(a); }

export float3 radians(
    float3 a=float3(0.) [[anno::description("Input angle in degrees.")]]
)
[[
    anno::display_name("Radians"),
    anno::description("Converts an angle from degrees to radians. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Radians"),
    icon(".icons/Radians.svg"),
    anno::ui_order(672)
]]
{ return math::radians(a); }

export float4 radians(
    float4 a=float4(0.) [[anno::description("Input angle in degrees.")]]
)
[[
    anno::display_name("Radians"),
    anno::description("Converts an angle from degrees to radians. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Radians"),
    icon(".icons/Radians.svg"),
    anno::ui_order(673)
]]
{ return math::radians(a); }

export float round(float a=0.)
[[
    anno::display_name("Round"),
    anno::description("Rounds to the nearest integer."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Round"),
    icon(".icons/Round.svg"),
    anno::ui_order(690)
]]
{ return math::round(a); }

export float2 round(float2 a=float2(0.))
[[
    anno::display_name("Round"),
    anno::description("Rounds to the nearest integer. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Round"),
    icon(".icons/Round.svg"),
    anno::ui_order(691)
]]
{ return math::round(a); }

export float3 round(float3 a=float3(0.))
[[
    anno::display_name("Round"),
    anno::description("Rounds to the nearest integer. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Round"),
    icon(".icons/Round.svg"),
    anno::ui_order(692)
]]
{ return math::round(a); }

export float4 round(float4 a=float4(0.))
[[
    anno::display_name("Round"),
    anno::description("Rounds to the nearest integer. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Round"),
    icon(".icons/Round.svg"),
    anno::ui_order(693)
]]
{ return math::round(a); }

export float rsqrt(float a=0.)
[[
    anno::display_name("Rsqrt"),
    anno::description("Returns 1/sqrt(a)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Rsqrt"),
    icon(".icons/Rsqrt.svg"),
    anno::ui_order(700)
]]
{ return math::rsqrt(a); }

export float2 rsqrt(float2 a=float2(0.))
[[
    anno::display_name("Rsqrt"),
    anno::description("Returns 1/sqrt(a). The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Rsqrt"),
    icon(".icons/Rsqrt.svg"),
    anno::ui_order(701)
]]
{ return math::rsqrt(a); }

export float3 rsqrt(float3 a=float3(0.))
[[
    anno::display_name("Rsqrt"),
    anno::description("Returns 1/sqrt(a). The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Rsqrt"),
    icon(".icons/Rsqrt.svg"),
    anno::ui_order(702)
]]
{ return math::rsqrt(a); }

export float4 rsqrt(float4 a=float4(0.))
[[
    anno::display_name("Rsqrt"),
    anno::description("Returns 1/sqrt(a). The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Rsqrt"),
    icon(".icons/Rsqrt.svg"),
    anno::ui_order(703)
]]
{ return math::rsqrt(a); }

export color rsqrt(color a=color(0.))
[[
    anno::display_name("Rsqrt"),
    anno::description("Returns 1/sqrt(a). The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Rsqrt"),
    icon(".icons/Rsqrt.svg"),
    anno::ui_order(704)
]]
{ return math::rsqrt(a); }

export float saturate(
    float a=0. [[anno::description("Input value to clamp to the [0, 1] range.")]]
)
[[
    anno::display_name("Saturate"),
    anno::description("Clamps the input to the [0, 1] range."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Saturate"),
    icon(".icons/Saturate.svg"),
    anno::ui_order(710)
]]
{ return math::saturate(a); }

export float2 saturate(
    float2 a=float2(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]]
)
[[
    anno::display_name("Saturate"),
    anno::description("Clamps the input to the [0, 1] range. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Saturate"),
    icon(".icons/Saturate.svg"),
    anno::ui_order(711)
]]
{ return math::saturate(a); }

export float3 saturate(
    float3 a=float3(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]]
)
[[
    anno::display_name("Saturate"),
    anno::description("Clamps the input to the [0, 1] range. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Saturate"),
    icon(".icons/Saturate.svg"),
    anno::ui_order(712)
]]
{ return math::saturate(a); }

export float4 saturate(
    float4 a=float4(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]]
)
[[
    anno::display_name("Saturate"),
    anno::description("Clamps the input to the [0, 1] range. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Saturate"),
    icon(".icons/Saturate.svg"),
    anno::ui_order(713)
]]
{ return math::saturate(a); }

export color saturate(
    color a=color(0.) [[anno::description("Input value to clamp to the [0, 1] range.")]]
)
[[
    anno::display_name("Saturate"),
    anno::description("Clamps the input to the [0, 1] range. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Saturate"),
    icon(".icons/Saturate.svg"),
    anno::ui_order(714)
]]
{ return math::saturate(a); }

export int sign(int a=0)
[[
    anno::display_name("Sign"),
    anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Sign"),
    icon(".icons/Sign.svg"),
    anno::ui_order(720)
]]
{ return math::sign(a); }

export float sign(float a=0.)
[[
    anno::display_name("Sign"),
    anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Sign"),
    icon(".icons/Sign.svg"),
    anno::ui_order(721)
]]
{ return math::sign(a); }

export float2 sign(float2 a=float2(0.))
[[
    anno::display_name("Sign"),
    anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Sign"),
    icon(".icons/Sign.svg"),
    anno::ui_order(722)
]]
{ return math::sign(a); }

export float3 sign(float3 a=float3(0.))
[[
    anno::display_name("Sign"),
    anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Sign"),
    icon(".icons/Sign.svg"),
    anno::ui_order(723)
]]
{ return math::sign(a); }

export float4 sign(float4 a=float4(0.))
[[
    anno::display_name("Sign"),
    anno::description("Returns the sign of the input: 1 for positive, -1 for negative, and 0 for zero. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Sign"),
    icon(".icons/Sign.svg"),
    anno::ui_order(724)
]]
{ return math::sign(a); }

export float sin(float a=0.)
[[
    anno::display_name("Sin"),
    anno::description("Returns the sine of the input angle in radians."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Sin"),
    icon(".icons/Sin.svg"),
    anno::ui_order(730)
]]
{ return math::sin(a); }

export float2 sin(float2 a=float2(0.))
[[
    anno::display_name("Sin"),
    anno::description("Returns the sine of the input angle in radians. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Sin"),
    icon(".icons/Sin.svg"),
    anno::ui_order(731)
]]
{ return math::sin(a); }

export float3 sin(float3 a=float3(0.))
[[
    anno::display_name("Sin"),
    anno::description("Returns the sine of the input angle in radians. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Sin"),
    icon(".icons/Sin.svg"),
    anno::ui_order(732)
]]
{ return math::sin(a); }

export float4 sin(float4 a=float4(0.))
[[
    anno::display_name("Sin"),
    anno::description("Returns the sine of the input angle in radians. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Sin"),
    icon(".icons/Sin.svg"),
    anno::ui_order(733)
]]
{ return math::sin(a); }

export float2 sincos(
    float a=0. [[
        anno::description("Input angle in radians.")
    ]])
[[
    anno::display_name("SinCos"),
    anno::description("Computes sine and cosine for the same input angle and returns float2(sin, cos)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions"),
    icon(".icons/sincos.svg"),
    anno::ui_order(739)
]]
{ float[]b = math::sincos(a); return float2(b[0],b[1]); }

export float smoothstep(
    float a=0. [[
        anno::description("Lower edge of the interpolation range.")
    ]],
    float b=1. [[
        anno::description("Upper edge of the interpolation range.")
    ]],
    float l=0. [[
        anno::description("Input value to evaluate against the interpolation range.")
    ]])
[[
    anno::display_name("Smoothstep"),
    anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Smoothstep"),
    icon(".icons/Smoothstep.svg"),
    anno::ui_order(740)
]]
{ return math::smoothstep(a,b,l); }

export float2 smoothstep(
    float2 a=float2(1.) [[
        anno::description("Lower interpolation edge per component.")
    ]],
    float2 b=float2(0.) [[
        anno::description("Upper interpolation edge per component.")
    ]],
    float2 l=float2(0.) [[
        anno::description("Input value evaluated per component.")
    ]])
[[
    anno::display_name("Smoothstep"),
    anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Smoothstep"),
    icon(".icons/Smoothstep.svg"),
    anno::ui_order(741)
]]
{ return math::smoothstep(a,b,l); }

export float3 smoothstep(
    float3 a=float3(1.) [[
        anno::description("Lower interpolation edge per component.")
    ]],
    float3 b=float3(0.) [[
        anno::description("Upper interpolation edge per component.")
    ]],
    float3 l=float3(0.) [[
        anno::description("Input value evaluated per component.")
    ]])
[[
    anno::display_name("Smoothstep"),
    anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Smoothstep"),
    icon(".icons/Smoothstep.svg"),
    anno::ui_order(742)
]]
{ return math::smoothstep(a,b,l); }

export float4 smoothstep(
    float4 a=float4(1.) [[
        anno::description("Lower interpolation edge per component.")
    ]],
    float4 b=float4(0.) [[
        anno::description("Upper interpolation edge per component.")
    ]],
    float4 l=float4(0.) [[
        anno::description("Input value evaluated per component.")
    ]])
[[
    anno::display_name("Smoothstep"),
    anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Smoothstep"),
    icon(".icons/Smoothstep.svg"),
    anno::ui_order(743)
]]
{ return math::smoothstep(a,b,l); }

export float2 smoothstep(
    float2 a=float2(1.) [[
        anno::description("Lower interpolation edge per component.")
    ]],
    float2 b=float2(0.) [[
        anno::description("Upper interpolation edge per component.")
    ]],
    float l=0. [[
        anno::description("Scalar input value applied to all components.")
    ]])
[[
    anno::display_name("Smoothstep"),
    anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Smoothstep"),
    icon(".icons/Smoothstep.svg"),
    anno::ui_order(744)
]]
{ return math::smoothstep(a,b,l); }

export float3 smoothstep(
    float3 a=float3(1.) [[
        anno::description("Lower interpolation edge per component.")
    ]],
    float3 b=float3(0.) [[
        anno::description("Upper interpolation edge per component.")
    ]],
    float l=0. [[
        anno::description("Scalar input value applied to all components.")
    ]])
[[
    anno::display_name("Smoothstep"),
    anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Smoothstep"),
    icon(".icons/Smoothstep.svg"),
    anno::ui_order(745)
]]
{ return math::smoothstep(a,b,l); }

export float4 smoothstep(
    float4 a=float4(1.) [[
        anno::description("Lower interpolation edge per component.")
    ]],
    float4 b=float4(0.) [[
        anno::description("Upper interpolation edge per component.")
    ]],
    float l=0. [[
        anno::description("Scalar input value applied to all components.")
    ]])
[[
    anno::display_name("Smoothstep"),
    anno::description("Performs smooth Hermite interpolation from 0 to 1 as l moves from a to b. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Smoothstep"),
    icon(".icons/Smoothstep.svg"),
    anno::ui_order(746)
]]
{ return math::smoothstep(a,b,l); }

export float sqrt(float a=0.)
[[
    anno::display_name("Sqrt"),
    anno::description("Returns the square root of the input."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Sqrt"),
    icon(".icons/Sqrt.svg"),
    anno::ui_order(750)
]]
{ return math::sqrt(a); }

export float2 sqrt(float2 a=float2(0.))
[[
    anno::display_name("Sqrt"),
    anno::description("Returns the square root of the input. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Sqrt"),
    icon(".icons/Sqrt.svg"),
    anno::ui_order(751)
]]
{ return math::sqrt(a); }

export float3 sqrt(float3 a=float3(0.))
[[
    anno::display_name("Sqrt"),
    anno::description("Returns the square root of the input. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Sqrt"),
    icon(".icons/Sqrt.svg"),
    anno::ui_order(752)
]]
{ return math::sqrt(a); }

export float4 sqrt(float4 a=float4(0.))
[[
    anno::display_name("Sqrt"),
    anno::description("Returns the square root of the input. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Sqrt"),
    icon(".icons/Sqrt.svg"),
    anno::ui_order(753)
]]
{ return math::sqrt(a); }

export color sqrt(color a=color(0.))
[[
    anno::display_name("Sqrt"),
    anno::description("Returns the square root of the input. The operation is performed per color channel."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Sqrt"),
    icon(".icons/Sqrt.svg"),
    anno::ui_order(754)
]]
{ return math::sqrt(a); }

export float step(
    float a=0. [[
        anno::description("Threshold value.")
    ]],
    float b=0. [[
        anno::description("Input compared against the threshold.")
    ]])
[[
    anno::display_name("Step"),
    anno::description("Returns 0 when b is less than a, and 1 otherwise."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Step"),
    icon(".icons/Step.svg"),
    anno::ui_order(760)
]]
{ return math::step(a,b); }

export float2 step(
    float2 a=float2(0.) [[
        anno::description("Threshold value per component.")
    ]],
    float2 b=float2(0.) [[
        anno::description("Input compared against the threshold per component.")
    ]])
[[
    anno::display_name("Step"),
    anno::description("Returns 0 when b is less than a, and 1 otherwise. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Step"),
    icon(".icons/Step.svg"),
    anno::ui_order(761)
]]
{ return math::step(a,b); }

export float3 step(
    float3 a=float3(0.) [[
        anno::description("Threshold value per component.")
    ]],
    float3 b=float3(0.) [[
        anno::description("Input compared against the threshold per component.")
    ]])
[[
    anno::display_name("Step"),
    anno::description("Returns 0 when b is less than a, and 1 otherwise. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Step"),
    icon(".icons/Step.svg"),
    anno::ui_order(762)
]]
{ return math::step(a,b); }

export float4 step(
    float4 a=float4(0.) [[
        anno::description("Threshold value per component.")
    ]],
    float4 b=float4(0.) [[
        anno::description("Input compared against the threshold per component.")
    ]])
[[
    anno::display_name("Step"),
    anno::description("Returns 0 when b is less than a, and 1 otherwise. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Step"),
    icon(".icons/Step.svg"),
    anno::ui_order(763)
]]
{ return math::step(a,b); }

export float tan(float a=0.)
[[
    anno::display_name("Tan"),
    anno::description("Returns the tangent of the input angle in radians."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Tan"),
    icon(".icons/Tan.svg"),
    anno::ui_order(770)
]]
{ return math::tan(a); }

export float2 tan(float2 a=float2(0.))
[[
    anno::display_name("Tan"),
    anno::description("Returns the tangent of the input angle in radians. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Tan"),
    icon(".icons/Tan.svg"),
    anno::ui_order(771)
]]
{ return math::tan(a); }

export float3 tan(float3 a=float3(0.))
[[
    anno::display_name("Tan"),
    anno::description("Returns the tangent of the input angle in radians. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Tan"),
    icon(".icons/Tan.svg"),
    anno::ui_order(772)
]]
{ return math::tan(a); }

export float4 tan(float4 a=float4(0.))
[[
    anno::display_name("Tan"),
    anno::description("Returns the tangent of the input angle in radians. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Tan"),
    icon(".icons/Tan.svg"),
    anno::ui_order(773)
]]
{ return math::tan(a); }

export float remap(
    float a=0. [[
        anno::description("Input value in the source range.")
    ]],
    float start_old=0. [[
        anno::description("Lower bound of the source range.")
    ]],
    float end_old=1. [[
        anno::description("Upper bound of the source range.")
    ]],
    float start_new=0. [[
        anno::description("Lower bound of the destination range.")
    ]],
    float end_new=1. [[
        anno::description("Upper bound of the destination range.")
    ]])
[[
    anno::display_name("Remap"),
    anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Remap"),
    icon(".icons/Remap.svg"),
    anno::ui_order(680)
]]
{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); }

export float2 remap(
    float2 a=0. [[
        anno::description("Input value in the source range, evaluated per component.")
    ]],
    float2 start_old=0. [[
        anno::description("Lower bound of the source range per component.")
    ]],
    float2 end_old=1. [[
        anno::description("Upper bound of the source range per component.")
    ]],
    float2 start_new=0. [[
        anno::description("Lower bound of the destination range per component.")
    ]],
    float2 end_new=1. [[
        anno::description("Upper bound of the destination range per component.")
    ]])
[[
    anno::display_name("Remap"),
    anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]. The operation is performed per component (x and y)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Remap"),
    icon(".icons/Remap.svg"),
    anno::ui_order(681)
]]
{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); }

export float3 remap(
    float3 a=0. [[
        anno::description("Input value in the source range, evaluated per component.")
    ]],
    float3 start_old=0. [[
        anno::description("Lower bound of the source range per component.")
    ]],
    float3 end_old=1. [[
        anno::description("Upper bound of the source range per component.")
    ]],
    float3 start_new=0. [[
        anno::description("Lower bound of the destination range per component.")
    ]],
    float3 end_new=1. [[
        anno::description("Upper bound of the destination range per component.")
    ]])
[[
    anno::display_name("Remap"),
    anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]. The operation is performed per component (x, y, and z)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Remap"),
    icon(".icons/Remap.svg"),
    anno::ui_order(682)
]]
{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); }

export float4 remap(
    float4 a=0. [[
        anno::description("Input value in the source range, evaluated per component.")
    ]],
    float4 start_old=0. [[
        anno::description("Lower bound of the source range per component.")
    ]],
    float4 end_old=1. [[
        anno::description("Upper bound of the source range per component.")
    ]],
    float4 start_new=0. [[
        anno::description("Lower bound of the destination range per component.")
    ]],
    float4 end_new=1. [[
        anno::description("Upper bound of the destination range per component.")
    ]])
[[
    anno::display_name("Remap"),
    anno::description("Remaps the input from [start_old, end_old] into [start_new, end_new]. The operation is performed per component (x, y, z, and w)."),
    anno::author("NVIDIA Corporation"),
    anno::in_group("Math", "Functions", "Remap"),
    icon(".icons/Remap.svg"),
    anno::ui_order(683)
]]
{ return start_new + (a - start_old) * (end_new - start_new) / (end_old - start_old); }
