protected override void CreateScene() { this.Load(WaveContent.Scenes.RenderTargetScene); // First, we creates the RenderTarget where the scene will be rendered this.SmallTarget = WaveServices.GraphicsDevice.RenderTargets.CreateRenderTarget(256, 256); // Then, retrieve the camera from this scene and set the RenderTarget property in the Camera3D component. var defaultCamera3D = this.EntityManager.Find("defaultCamera3D"); var camera3DComponent = defaultCamera3D.FindComponent<Camera3D>(isExactType: false); camera3DComponent.RenderTarget = this.SmallTarget; }
protected override void CreateScene() { this.Load(WaveContent.Scenes.RenderTargetScene); // First, we creates the RenderTarget where the scene will be rendered this.SmallTarget = WaveServices.GraphicsDevice.RenderTargets.CreateRenderTarget(256, 256); // Then, retrieve the camera from this scene and set the RenderTarget property in the Camera3D component. var defaultCamera3D = this.EntityManager.Find("defaultCamera3D"); var camera3DComponent = defaultCamera3D.FindComponent <Camera3D>(isExactType: false); camera3DComponent.RenderTarget = this.SmallTarget; }