Esempio n. 1
0
        /// <summary>
        /// Updates the manager
        /// </summary>
        private void Aura_onPreRenderEvent(Camera cameraComponent)
        {
            if (_isEnabled)
            {
                _culler.Update();

                SetupComputeBuffer();

                CollectVolumesData();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Updates the manager (collects shadows/cookies/data and packs them)
        /// </summary>
        public void Update()
        {
            _culler.Update();

            SetupBuffers();

            if (_culler.HasVisibleObjects)
            {
                _shadowmapsCollector.Generate();
                _cookieMapsCollector.Generate();

                AuraLight[] visibleLights = _culler.GetVisibleObjects();
                for (int i = 0; i < _culler.VisibleObjectsCount; ++i)
                {
                    visibleLights[i].SetShadowMapIndex(_shadowmapsCollector.GetTextureIndex(visibleLights[i].shadowMapRenderTexture));
                    visibleLights[i].SetCookieMapIndex(_cookieMapsCollector.GetTextureIndex(visibleLights[i].cookieMapRenderTexture));
                    _visibleSpotLightParametersArray[i] = visibleLights[i].GetSpotParameters();
                }

                DataBuffer.SetData(_visibleSpotLightParametersArray);
            }
        }