예제 #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);
        }
예제 #2
0
파일: Game.cs 프로젝트: ctoneal/terrain-gen
        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();
        }