Exemplo n.º 1
0
        public MyShadowRenderer(int shadowMapSize, MyRenderTargets renderTarget, MyRenderTargets depthTarget, bool multiThreaded)
        {
            ShadowMapCascadeSize = shadowMapSize;
            m_shadowRenderTarget = renderTarget;
            m_shadowDepthTarget  = depthTarget;

            for (int i = 0; i < NumSplits; i++)
            {
                m_lightCameras[i] = new MyOrthographicCamera(1, 1, 1, 10);
                // Occ queries for shadows are disabled, so save memory by commenting this
                //m_occlusionQueriesLists[i] = new List<MyOcclusionQueryIssue>(1024);
                m_cascadeQueries[i] = new MyOcclusionQueryIssue(null);
                m_visibility[i]     = true;
            }

            MultiThreaded = multiThreaded;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates the renderer
        /// </summary>
        /// <param name="graphicsDevice">The GraphicsDevice to use for rendering</param>
        /// <param name="contentManager">The MyCustomContentManager to use for loading content</param>
        public MyShadowRenderer(int shadowMapSize, MyRenderTargets renderTarget, MyRenderTargets depthTarget, bool multiThreaded)
        {
            ShadowMapCascadeSize = shadowMapSize;
            m_shadowRenderTarget = renderTarget;
            m_shadowDepthTarget = depthTarget;

            for (int i = 0; i < NumSplits; i++)
            {
                m_lightCameras[i] = new MyOrthographicCamera(1, 1, 1, 10);
                // Occ queries for shadows are disabled, so save memory by commenting this
                //m_occlusionQueriesLists[i] = new List<MyOcclusionQueryIssue>(1024);
                m_cascadeQueries[i] = new MyOcclusionQueryIssue(null);
                m_visibility[i] = true;
            }

            MultiThreaded = multiThreaded;
        }