Ejemplo n.º 1
0
        public void MapMirror(Camera camera, Skydome sky)
        {
            camera.Reflecting = true;
            Plane seaPlane = CreatePlane(waterHeight - 0.5f, Vector3.Down, camera, true);
            camera.device.ClipPlanes[0].Plane = seaPlane;
            camera.device.ClipPlanes[0].IsEnabled = true;
            camera.SetTarget(Reflector);
            sky.Draw(camera, true);
            DrawBase(camera, true);
            camera.device.ClipPlanes[0].IsEnabled = false;

            camera.RevertTarget();
            mirrorMap = Reflector.GetTexture();
            //mirrorMap.Save("mirrormap.jpg", ImageFileFormat.Jpg);
        }
Ejemplo n.º 2
0
        protected override void Initialize()
        {
            graphics.PreferredBackBufferWidth = 1280;
            graphics.PreferredBackBufferHeight = 1024;

            graphics.ApplyChanges();
            Window.Title = "TerrainGen";
            land = new Terrain(300, 300);
            camera = new Camera(land);
            dome = new Skydome();

            base.Initialize();
        }