public int AddShadowRequest(HDShadowRequest shadowRequest) { if (m_ShadowRequests.Count >= m_maxShadowRequests) { return(-1); } if (shadowRequest.allowResize) { m_Atlas.Reserve(shadowRequest); } else { m_CascadeAtlas.Reserve(shadowRequest); } // Keep track of all shadow request and the order they was requested m_ShadowRequests.Add(shadowRequest); return(m_ShadowRequests.Count - 1); }