private static void LoadContent() { MyRender.Log.WriteLine("MyRender.LoadContent() - START"); MyRender.GetRenderProfiler().StartProfilingBlock("MyRender::LoadContent"); m_screenshot = null; DumpSettingsToLog(); UpdateScreenSize(); CreateRenderTargets(); CreateEnvironmentMapsRT(MyRenderConstants.ENVIRONMENT_MAP_SIZE); DefaultSurface = GraphicsDevice.GetRenderTarget(0); DefaultSurface.DebugName = "DefaultSurface"; DefaultDepth = GraphicsDevice.DepthStencilSurface; DefaultDepth.DebugName = "DefaultDepth"; m_randomTexture = CreateRandomTexture(); LoadEffects(); if (m_shadowRenderer == null) { m_shadowRenderer = new MyShadowRenderer(GetShadowCascadeSize(), MyRenderTargets.ShadowMap, MyRenderTargets.ShadowMapZBuffer, true); } if (m_spotShadowRenderer == null) { m_spotShadowRenderer = new MySpotShadowRenderer(); } foreach (var renderComponent in m_renderComponents) { renderComponent.Value.LoadContent(GraphicsDevice); } m_spriteBatch = new Graphics.SpriteBatch(GraphicsDevice, "SpriteBatch"); m_fullscreenQuad = new MyFullScreenQuad(); BlankTexture = MyTextureManager.GetTexture <MyTexture2D>("Textures\\GUI\\Blank.dds", flags: TextureFlags.IgnoreQuality); MyEnvironmentMap.Reset(); foreach (var ro in m_renderObjects) { ro.Value.LoadContent(); } LoadContent_Video(); MyRender.GetRenderProfiler().EndProfilingBlock(); MyRender.Log.WriteLine("MyRender.LoadContent() - END"); }
public void ResetEnvironmentProbes() { MyEnvironmentMap.Reset(); }