public LightManager(ContentManager content, GraphicsDevice device) { this.quadRender = new QuadRender(device); this.device = device; shadowmapResolver = new ShadowmapResolver(device, quadRender, ShadowmapSize.Size256, ShadowmapSize.Size1024); shadowmapResolver.LoadContent(content); screenShadows = new RenderTarget2D(device, device.Viewport.Width, device.Viewport.Height); }
public ShadowmapResolver(GraphicsDevice graphicsDevice, QuadRender quadRender, ShadowmapSize maxShadowmapSize, ShadowmapSize maxDepthBufferSize) { this.graphicsDevice = graphicsDevice; this.quadRender = quadRender; reductionChainCount = (int)maxShadowmapSize; baseSize = 2 << reductionChainCount; depthBufferSize = 2 << (int)maxDepthBufferSize; }