Search Results for

    Show / Hide Table of Contents

    Struct ShaderGraphValue

    Shader source generator value container. Caches the value type and the value variable name (shader local, global parameter or constant value). Supports value type casting and component swizzle.

    Inherited Members
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    Object::Flags
    Object::OnDeleteObject()
    Object::~Object()
    Assembly: FlaxEngine.dll
    File: Engine/Visject/ShaderGraphValue.h
    Syntax
    public struct ShaderGraphValue : public Object

    Constructors

    ShaderGraphValue()

    Initializes a new instance of the ShaderGraphValue struct.

    Declaration
    public ShaderGraphValue()

    ShaderGraphValue(const bool value)

    Initializes a new instance of the ShaderGraphValue struct.

    Declaration
    public ShaderGraphValue(const bool value)
    Parameters
    bool value

    The value.

    ShaderGraphValue(const double value)

    Initializes a new instance of the ShaderGraphValue struct.

    Declaration
    public ShaderGraphValue(const double value)
    Parameters
    double value

    The value.

    ShaderGraphValue(const float value)

    Initializes a new instance of the ShaderGraphValue struct.

    Declaration
    public ShaderGraphValue(const float value)
    Parameters
    float value

    The value.

    ShaderGraphValue(const int32 value)

    Initializes a new instance of the ShaderGraphValue struct.

    Declaration
    public ShaderGraphValue(const int32 value)
    Parameters
    int32 value

    The value.

    ShaderGraphValue(const Variant& v)

    Initializes a new instance of the ShaderGraphValue struct.

    Declaration
    public ShaderGraphValue(const Variant& v)
    Parameters
    Variant v

    The value.

    ShaderGraphValue(VariantType::Types type, const Char* value)

    Initializes a new instance of the ShaderGraphValue struct.

    Declaration
    public ShaderGraphValue(VariantType::Types type, const Char* value)
    Parameters
    VariantType::Types type

    The type.

    Char value

    The value.

    ShaderGraphValue(VariantType::Types type, const String& value)

    Initializes a new instance of the ShaderGraphValue struct.

    Declaration
    public ShaderGraphValue(VariantType::Types type, const String& value)
    Parameters
    VariantType::Types type

    The type.

    String value

    The value.

    ShaderGraphValue(VariantType::Types type, const String&& value)

    Initializes a new instance of the ShaderGraphValue struct.

    Declaration
    public ShaderGraphValue(VariantType::Types type, const String&& value)
    Parameters
    VariantType::Types type

    The type.

    String value

    The value.

    Fields

    False

    False value (as bool).

    Declaration
    public static ShaderGraphValue False
    Field Value
    ShaderGraphValue

    Half

    Half value (as float).

    Declaration
    public static ShaderGraphValue Half
    Field Value
    ShaderGraphValue

    One

    One value (as float).

    Declaration
    public static ShaderGraphValue One
    Field Value
    ShaderGraphValue

    True

    True value (as bool).

    Declaration
    public static ShaderGraphValue True
    Field Value
    ShaderGraphValue

    Type

    The value type.

    Declaration
    public VariantType::Types Type
    Field Value
    VariantType::Types

    Value

    The shader value.

    Declaration
    public String Value
    Field Value
    String

    Zero

    Zero value (as float).

    Declaration
    public static ShaderGraphValue Zero
    Field Value
    ShaderGraphValue

    Methods

    AsBool()

    Casts the value to the bool type.

    Declaration
    public ShaderGraphValue AsBool() const
    Returns
    ShaderGraphValue

    Bool

    AsFloat()

    Casts the value to the float type.

    Declaration
    public ShaderGraphValue AsFloat() const
    Returns
    ShaderGraphValue

    Float

    AsFloat2()

    Casts the value to the Float2 type.

    Declaration
    public ShaderGraphValue AsFloat2() const
    Returns
    ShaderGraphValue

    Float2

    AsFloat3()

    Casts the value to the Float3 type.

    Declaration
    public ShaderGraphValue AsFloat3() const
    Returns
    ShaderGraphValue

    Float3

    AsFloat4()

    Casts the value to the Float4 type.

    Declaration
    public ShaderGraphValue AsFloat4() const
    Returns
    ShaderGraphValue

    Float4

    AsInt()

    Casts the value to the integer type.

    Declaration
    public ShaderGraphValue AsInt() const
    Returns
    ShaderGraphValue

    Integer

    AsUint()

    Casts the value to the unsigned integer type.

    Declaration
    public ShaderGraphValue AsUint() const
    Returns
    ShaderGraphValue

    UnsignedInteger

    Cast(const ShaderGraphValue& v, VariantType::Types to)

    Casts the value from its type to the another type.

    Declaration
    public static ShaderGraphValue Cast(const ShaderGraphValue& v, VariantType::Types to)
    Parameters
    ShaderGraphValue v

    The value to cast.

    VariantType::Types to

    The result type.

    Returns
    ShaderGraphValue

    The result value.

    Cast(const VariantType::Types to)

    Casts the value from its type to the another type.

    Declaration
    public ShaderGraphValue Cast(const VariantType::Types to) const
    Parameters
    VariantType::Types to

    The result type.

    Returns
    ShaderGraphValue

    The result value.

    Clear()

    Clears this instance.

    Declaration
    public void Clear()

    Float2(const ShaderGraphValue& x, const ShaderGraphValue& y)

    Create float2 from X and Y values.

    Declaration
    public static ShaderGraphValue Float2(const ShaderGraphValue& x, const ShaderGraphValue& y)
    Parameters
    ShaderGraphValue x

    The x.

    ShaderGraphValue y

    The y.

    Returns
    ShaderGraphValue

    float2

    Float3(const ShaderGraphValue& x, const ShaderGraphValue& y, const ShaderGraphValue& z)

    Create float3 from X, Y and Z values.

    Declaration
    public static ShaderGraphValue Float3(const ShaderGraphValue& x, const ShaderGraphValue& y, const ShaderGraphValue& z)
    Parameters
    ShaderGraphValue x

    The x.

    ShaderGraphValue y

    The y.

    ShaderGraphValue z

    The z.

    Returns
    ShaderGraphValue

    float3

    Float4(const ShaderGraphValue& x, const ShaderGraphValue& y, const ShaderGraphValue& z, const ShaderGraphValue& w)

    Create float4 from X, Y, Z and W values.

    Declaration
    public static ShaderGraphValue Float4(const ShaderGraphValue& x, const ShaderGraphValue& y, const ShaderGraphValue& z, const ShaderGraphValue& w)
    Parameters
    ShaderGraphValue x

    The X.

    ShaderGraphValue y

    The Y.

    ShaderGraphValue z

    The Z.

    ShaderGraphValue w

    The W.

    Returns
    ShaderGraphValue

    float4

    Format(const Char* format, const ShaderGraphValue& v1)

    Formats thw value.

    Declaration
    public static String Format(const Char* format, const ShaderGraphValue& v1)
    Parameters
    Char format

    The format text.

    ShaderGraphValue v1

    The value.

    Returns
    String

    The formatted value.

    Format(const Char* format, const ShaderGraphValue& v1, const ShaderGraphValue& v2)

    Formats thw value.

    Declaration
    public static String Format(const Char* format, const ShaderGraphValue& v1, const ShaderGraphValue& v2)
    Parameters
    Char format

    The format text.

    ShaderGraphValue v1

    The first value.

    ShaderGraphValue v2

    The second value.

    Returns
    String

    The formatted value.

    Format(const Char* format, const ShaderGraphValue& v1, const ShaderGraphValue& v2, const ShaderGraphValue& v3)

    Formats thw value.

    Declaration
    public static String Format(const Char* format, const ShaderGraphValue& v1, const ShaderGraphValue& v2, const ShaderGraphValue& v3)
    Parameters
    Char format

    The format text.

    ShaderGraphValue v1

    The first value.

    ShaderGraphValue v2

    The second value.

    ShaderGraphValue v3

    The third value.

    Returns
    String

    The formatted value.

    Format(const Char* format, const ShaderGraphValue& v1, const ShaderGraphValue& v2, const ShaderGraphValue& v3, const ShaderGraphValue& v4)

    Formats thw value.

    Declaration
    public static String Format(const Char* format, const ShaderGraphValue& v1, const ShaderGraphValue& v2, const ShaderGraphValue& v3, const ShaderGraphValue& v4)
    Parameters
    Char format

    The format text.

    ShaderGraphValue v1

    The first value.

    ShaderGraphValue v2

    The second value.

    ShaderGraphValue v3

    The third value.

    ShaderGraphValue v4

    The fourth value.

    Returns
    String

    The formatted value.

    GetW()

    Gets the W component of the value. Valid only for vector types.

    Declaration
    public ShaderGraphValue GetW() const
    Returns
    ShaderGraphValue

    The W component.

    GetX()

    Gets the X component of the value. Valid only for single or vector types.

    Declaration
    public ShaderGraphValue GetX() const
    Returns
    ShaderGraphValue

    The X component.

    GetY()

    Gets the Y component of the value. Valid only for vector types.

    Declaration
    public ShaderGraphValue GetY() const
    Returns
    ShaderGraphValue

    The Y component.

    GetZ()

    Gets the Z component of the value. Valid only for vector types.

    Declaration
    public ShaderGraphValue GetZ() const
    Returns
    ShaderGraphValue

    The Z component.

    InitForHalf(VariantType::Types type)

    Initializes the shader variable for given connection type Half.

    Declaration
    public static ShaderGraphValue InitForHalf(VariantType::Types type)
    Parameters
    VariantType::Types type

    The graph connection type.

    Returns
    ShaderGraphValue

    Initial value for given type.

    InitForOne(VariantType::Types type)

    Initializes the shader variable for given connection type One.

    Declaration
    public static ShaderGraphValue InitForOne(VariantType::Types type)
    Parameters
    VariantType::Types type

    The graph connection type.

    Returns
    ShaderGraphValue

    Initial value for given type.

    InitForZero(VariantType::Types type)

    Initializes the shader variable for given connection type Zero.

    Declaration
    public static ShaderGraphValue InitForZero(VariantType::Types type)
    Parameters
    VariantType::Types type

    The graph connection type.

    Returns
    ShaderGraphValue

    Initial value for given type.

    IsInvalid()

    Returns true if value is invalid.

    Declaration
    public bool IsInvalid() const
    Returns
    bool

    IsLiteral()

    Checks if value is a compile-time constant literal (eg. int, bool or float).

    Declaration
    public bool IsLiteral() const
    Returns
    bool

    IsOne()

    Checks if value contains static part with one.

    Declaration
    public bool IsOne() const
    Returns
    bool

    IsValid()

    Returns true if value is valid.

    Declaration
    public bool IsValid() const
    Returns
    bool

    IsZero()

    Checks if value contains static part with zero.

    Declaration
    public bool IsZero() const
    Returns
    bool

    ToString()

    Gets the string representation of this object.

    Declaration
    public virtual String ToString() const override
    Returns
    String

    Overrides
    Object::ToString()
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat