コード例 #1
0
ファイル: AuraLight.cs プロジェクト: jjhr7/RodyAdventures-GTI
        /// <summary>
        /// Function run when the OnPreCullEvent is raised on the Aura main component
        /// </summary>
        private void Camera_onPreCull(Camera camera)
        {
#if UNITY_EDITOR
            if (IsActive && (AuraCamera.IsFirstRegisteredCamera(camera) || CameraExtensions.IsSceneViewCamera(camera)))
#else
            if (IsActive && AuraCamera.IsFirstRegisteredCamera(camera))
#endif
            {
                if (this == null)
                {
                    Camera.onPreCull -= Camera_onPreCull;
                    return;
                }

                if (CastsShadows)
                {
                    switch (Type)
                    {
                    case LightType.Point:
                    {
                        _copyShadowmapCommandBuffer.Clear();
                    }
                    break;
                    }
                }

                UpdateBoundingSphere();
            }
        }
コード例 #2
0
ファイル: AuraLight.cs プロジェクト: jjhr7/RodyAdventures-GTI
        /// <summary>
        ///     Called when any camera is a about to render
        /// </summary>
        private void Camera_onPreRender(Camera camera)
        {
#if UNITY_EDITOR
            if (IsActive && ((AuraCamera.IsFirstRegisteredCamera(camera) || CameraExtensions.IsSceneViewCamera(camera)) || Type == LightType.Directional))
#else
            if (IsActive && (AuraCamera.IsFirstRegisteredCamera(camera) || Type == LightType.Directional))
#endif
            {
                if (this == null)
                {
                    Camera.onPreRender -= Camera_onPreRender;
                    return;
                }

                if (CastsCookie)
                {
                    CopyCookieMap();
                }

                PackParameters(camera);
            }
        }