docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct SHCoefficients

    Contains spherical harmonic coefficients used for lighting representation in the format expected by DOTS_INSTANCING_ON shaders.

    The size of the struct is padded to a power of two so arrays of such structs can be efficiently indexed in shaders.

    Implements
    IEquatable<SHCoefficients>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Rendering
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    [Serializable]
    public struct SHCoefficients : IEquatable<SHCoefficients>

    Constructors

    SHCoefficients(SphericalHarmonicsL2)

    Construct an instance of SHCoefficients that represents the same spherical harmonic coefficients as the parameter.

    Declaration
    public SHCoefficients(SphericalHarmonicsL2 sh)
    Parameters
    Type Name Description
    SphericalHarmonicsL2 sh

    The spherical harmonic coefficients to initialize with.

    See Also
    SphericalHarmonicsL2

    SHCoefficients(SphericalHarmonicsL2, Vector4)

    Construct an instance of SHCoefficients that represents the same spherical harmonic coefficients as the parameter.

    Declaration
    public SHCoefficients(SphericalHarmonicsL2 sh, Vector4 probesOcclusion)
    Parameters
    Type Name Description
    SphericalHarmonicsL2 sh

    The spherical harmonic coefficients to initialize with.

    Vector4 probesOcclusion

    The baked shadowing data to include with this set of spherical harmonic coefficients.

    See Also
    SphericalHarmonicsL2

    Fields

    ProbesOcclusion

    Contains the baked shadowing data that corresponds to the unity_ProbesOcclusion shader property.

    Declaration
    public Vector4 ProbesOcclusion
    Field Value
    Type Description
    Vector4
    See Also
    SphericalHarmonicsL2

    SHAb

    Contains the SH coefficients that correspond to the unity_SHAb shader property.

    Declaration
    public Vector4 SHAb
    Field Value
    Type Description
    Vector4
    See Also
    SphericalHarmonicsL2

    SHAg

    Contains the SH coefficients that correspond to the unity_SHAg shader property.

    Declaration
    public Vector4 SHAg
    Field Value
    Type Description
    Vector4
    See Also
    SphericalHarmonicsL2

    SHAr

    Contains the SH coefficients that correspond to the unity_SHAr shader property.

    Declaration
    public Vector4 SHAr
    Field Value
    Type Description
    Vector4
    See Also
    SphericalHarmonicsL2

    SHBb

    Contains the SH coefficients that correspond to the unity_SHBb shader property.

    Declaration
    public Vector4 SHBb
    Field Value
    Type Description
    Vector4
    See Also
    SphericalHarmonicsL2

    SHBg

    Contains the SH coefficients that correspond to the unity_SHBg shader property.

    Declaration
    public Vector4 SHBg
    Field Value
    Type Description
    Vector4
    See Also
    SphericalHarmonicsL2

    SHBr

    Contains the SH coefficients that correspond to the unity_SHBr shader property.

    Declaration
    public Vector4 SHBr
    Field Value
    Type Description
    Vector4
    See Also
    SphericalHarmonicsL2

    SHC

    Contains the SH coefficients that correspond to the unity_SHC shader property.

    Declaration
    public Vector4 SHC
    Field Value
    Type Description
    Vector4
    See Also
    SphericalHarmonicsL2

    Methods

    Equals(object)

    Equals implementation.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    Other object to compare this object against

    Returns
    Type Description
    bool

    True if contents are equal, False otherwise.

    Overrides
    ValueType.Equals(object)
    See Also
    SphericalHarmonicsL2

    Equals(SHCoefficients)

    Equals implementation.

    Declaration
    public bool Equals(SHCoefficients other)
    Parameters
    Type Name Description
    SHCoefficients other

    Other SHCoefficients instance to comapre this against.

    Returns
    Type Description
    bool

    True if contents are equal, False otherwise.

    See Also
    SphericalHarmonicsL2

    GetHashCode()

    GetHashCode implementation.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Returns a hashcode based on SHA coefficients.

    Overrides
    ValueType.GetHashCode()
    See Also
    SphericalHarmonicsL2

    Operators

    operator ==(SHCoefficients, SHCoefficients)

    Equality operator implementation.

    Declaration
    public static bool operator ==(SHCoefficients left, SHCoefficients right)
    Parameters
    Type Name Description
    SHCoefficients left

    Left operand of comparison

    SHCoefficients right

    Right operand of comparison

    Returns
    Type Description
    bool

    True if contents are equal, False otherwise.

    See Also
    SphericalHarmonicsL2

    operator !=(SHCoefficients, SHCoefficients)

    Not equals operator implementation.

    Declaration
    public static bool operator !=(SHCoefficients left, SHCoefficients right)
    Parameters
    Type Name Description
    SHCoefficients left

    Left operand of comparison

    SHCoefficients right

    Right operand of comparison

    Returns
    Type Description
    bool

    True if contents are not equal, False otherwise.

    See Also
    SphericalHarmonicsL2

    Implements

    IEquatable<T>

    Extension Methods

    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, T)

    See Also

    SphericalHarmonicsL2
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)