Example #1
0
        public void UpdateShadowRequest(int index, HDShadowRequest shadowRequest)
        {
            if (index >= m_ShadowRequestCount)
            {
                return;
            }

            shadowRequest.atlasViewport = m_ShadowResolutionRequests[index].atlasViewport;
            m_ShadowRequests[index]     = shadowRequest;

            switch (shadowRequest.shadowMapType)
            {
            case ShadowMapType.PunctualAtlas:
            {
                m_Atlas.AddShadowRequest(shadowRequest);
                break;
            }

            case ShadowMapType.CascadedDirectional:
            {
                m_CascadeAtlas.AddShadowRequest(shadowRequest);
                break;
            }

            case ShadowMapType.AreaLightAtlas:
            {
                m_AreaLightShadowAtlas.AddShadowRequest(shadowRequest);
                break;
            }
            }
            ;
        }
        public void UpdateShadowRequest(int index, HDShadowRequest shadowRequest)
        {
            if (index >= m_ShadowRequestCount)
            {
                return;
            }

            shadowRequest.atlasViewport = m_ShadowResolutionRequests[index].atlasViewport;
            m_ShadowRequests[index]     = shadowRequest;

            if (shadowRequest.allowResize)
            {
                m_Atlas.AddShadowRequest(shadowRequest);
            }
            else
            {
                m_CascadeAtlas.AddShadowRequest(shadowRequest);
            }
        }