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
Inherited Members
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
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
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
SHAb
Contains the SH coefficients that correspond to the unity_SHAb
shader property.
Declaration
public Vector4 SHAb
Field Value
Type | Description |
---|---|
Vector4 |
See Also
SHAg
Contains the SH coefficients that correspond to the unity_SHAg
shader property.
Declaration
public Vector4 SHAg
Field Value
Type | Description |
---|---|
Vector4 |
See Also
SHAr
Contains the SH coefficients that correspond to the unity_SHAr
shader property.
Declaration
public Vector4 SHAr
Field Value
Type | Description |
---|---|
Vector4 |
See Also
SHBb
Contains the SH coefficients that correspond to the unity_SHBb
shader property.
Declaration
public Vector4 SHBb
Field Value
Type | Description |
---|---|
Vector4 |
See Also
SHBg
Contains the SH coefficients that correspond to the unity_SHBg
shader property.
Declaration
public Vector4 SHBg
Field Value
Type | Description |
---|---|
Vector4 |
See Also
SHBr
Contains the SH coefficients that correspond to the unity_SHBr
shader property.
Declaration
public Vector4 SHBr
Field Value
Type | Description |
---|---|
Vector4 |
See Also
SHC
Contains the SH coefficients that correspond to the unity_SHC
shader property.
Declaration
public Vector4 SHC
Field Value
Type | Description |
---|---|
Vector4 |
See Also
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
See Also
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
GetHashCode()
GetHashCode implementation.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
See Also
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
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. |