docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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.

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