Method GetLightAttenuationAndSpotDirection
GetLightAttenuationAndSpotDirection(LightType, float, Matrix4x4, float, float?, out Vector4, out Vector4)
Calculates the attenuation for a given light and also direction for spot lights.
Declaration
public static void GetLightAttenuationAndSpotDirection(LightType lightType, float lightRange, Matrix4x4 lightLocalToWorldMatrix, float spotAngle, float? innerSpotAngle, out Vector4 lightAttenuation, out Vector4 lightSpotDir)
Parameters
Type | Name | Description |
---|---|---|
LightType | lightType | The type of light. |
float | lightRange | The range of the light. |
Matrix4x4 | lightLocalToWorldMatrix | The local to world light matrix. |
float | spotAngle | The spotlight angle. |
float? | innerSpotAngle | The spotlight inner angle. |
Vector4 | lightAttenuation | The light attenuation. |
Vector4 | lightSpotDir | The spot light direction. |