docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SphericalHarmonicsL2Utils

    A collection of utility functions used to access and set SphericalHarmonicsL2 in a more verbose way.

    Inheritance
    object
    SphericalHarmonicsL2Utils
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    public class SphericalHarmonicsL2Utils

    Methods

    GetCoefficient(SphericalHarmonicsL2, int)

    Get a spherical harmonics coefficient.

    Declaration
    public static Vector3 GetCoefficient(SphericalHarmonicsL2 sh, int index)
    Parameters
    Type Name Description
    SphericalHarmonicsL2 sh

    The SphericalHarmonicsL2 data structure to get information from.

    int index

    The index of the coefficient that is requested (must be less than 9).

    Returns
    Type Description
    Vector3

    The value of the requested coefficient.

    GetL1(SphericalHarmonicsL2, out Vector3, out Vector3, out Vector3)

    Returns the L1 coefficients organized in such a way that are swizzled per channel rather than per coefficient.

    Declaration
    public static void GetL1(SphericalHarmonicsL2 sh, out Vector3 L1_R, out Vector3 L1_G, out Vector3 L1_B)
    Parameters
    Type Name Description
    SphericalHarmonicsL2 sh

    The SphericalHarmonicsL2 data structure to use to query the information.

    Vector3 L1_R

    The red channel of all coefficient for the L1 band.

    Vector3 L1_G

    The green channel of all coefficient for the L1 band.

    Vector3 L1_B

    The blue channel of all coefficient for the L1 band.

    GetL2(SphericalHarmonicsL2, out Vector3, out Vector3, out Vector3, out Vector3, out Vector3)

    Returns all the L2 coefficients.

    Declaration
    public static void GetL2(SphericalHarmonicsL2 sh, out Vector3 L2_0, out Vector3 L2_1, out Vector3 L2_2, out Vector3 L2_3, out Vector3 L2_4)
    Parameters
    Type Name Description
    SphericalHarmonicsL2 sh

    The SphericalHarmonicsL2 data structure to use to query the information.

    Vector3 L2_0

    The first coefficient for the L2 band.

    Vector3 L2_1

    The second coefficient for the L2 band.

    Vector3 L2_2

    The third coefficient for the L2 band.

    Vector3 L2_3

    The fourth coefficient for the L2 band.

    Vector3 L2_4

    The fifth coefficient for the L2 band.

    SetCoefficient(ref SphericalHarmonicsL2, int, Vector3)

    Set a spherical harmonics coefficient.

    Declaration
    public static void SetCoefficient(ref SphericalHarmonicsL2 sh, int index, Vector3 coefficient)
    Parameters
    Type Name Description
    SphericalHarmonicsL2 sh

    The SphericalHarmonicsL2 data structure to store information on.

    int index

    The index of the coefficient that is set (must be less than 9).

    Vector3 coefficient

    The values of the coefficient is set.

    SetL0(ref SphericalHarmonicsL2, Vector3)

    Set L0 coefficient.

    Declaration
    public static void SetL0(ref SphericalHarmonicsL2 sh, Vector3 L0)
    Parameters
    Type Name Description
    SphericalHarmonicsL2 sh

    The SphericalHarmonicsL2 data structure to store information on.

    Vector3 L0

    The L0 coefficient to set.

    SetL1(ref SphericalHarmonicsL2, Vector3, Vector3, Vector3)

    Set all L1 coefficients per channel.

    Declaration
    public static void SetL1(ref SphericalHarmonicsL2 sh, Vector3 L1_R, Vector3 L1_G, Vector3 L1_B)
    Parameters
    Type Name Description
    SphericalHarmonicsL2 sh

    The SphericalHarmonicsL2 data structure to store information on.

    Vector3 L1_R

    The red channels for each L1 coefficient.

    Vector3 L1_G

    The green channels for each L1 coefficient.

    Vector3 L1_B

    The blue channels for each L1 coefficient.

    SetL1B(ref SphericalHarmonicsL2, Vector3)

    Set the blue channel for each of the L1 coefficients.

    Declaration
    public static void SetL1B(ref SphericalHarmonicsL2 sh, Vector3 L1_B)
    Parameters
    Type Name Description
    SphericalHarmonicsL2 sh

    The SphericalHarmonicsL2 data structure to store information on.

    Vector3 L1_B

    The blue channels for each L1 coefficient.

    SetL1G(ref SphericalHarmonicsL2, Vector3)

    Set the green channel for each of the L1 coefficients.

    Declaration
    public static void SetL1G(ref SphericalHarmonicsL2 sh, Vector3 L1_G)
    Parameters
    Type Name Description
    SphericalHarmonicsL2 sh

    The SphericalHarmonicsL2 data structure to store information on.

    Vector3 L1_G

    The green channels for each L1 coefficient.

    SetL1R(ref SphericalHarmonicsL2, Vector3)

    Set the red channel for each of the L1 coefficients.

    Declaration
    public static void SetL1R(ref SphericalHarmonicsL2 sh, Vector3 L1_R)
    Parameters
    Type Name Description
    SphericalHarmonicsL2 sh

    The SphericalHarmonicsL2 data structure to store information on.

    Vector3 L1_R

    The red channels for each L1 coefficient.

    Extension Methods

    ReflectionUtils.GetField(object, string)
    ReflectionUtils.GetFields(object)
    ReflectionUtils.Invoke(object, string, params object[])
    ReflectionUtils.SetField(object, string, object)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, T)
    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)