Пример #1
0
        public Game1()
            : base()
        {
            graphics.PreferredBackBufferHeight = 600;
            graphics.PreferredBackBufferWidth = 800;

            camera = new Base3DCamera(this, .1f, 20000);

            DeferredSkyBox sb = new DeferredSkyBox(this, "Textures/SkyBox/cubeMap");
            Components.Add(sb);

            terrain = new BruteForceTerrain(this, "Textures/Terrain/Maps/heightMap3");
            terrain.Position = new Vector3(-128,-30,-128);
            Components.Add(terrain);
          
            SunPosition = new Vector3(225, 220, -400);

            renderer.DirectionalLights.Add(new DeferredDirectionalLight(this, SunPosition, Vector3.Zero, Color.White, 1, true));

            GodRays.Enabled = true;
            GodRays.LightSourceSize = 1500;
            GodRays.bp.Enabled = false;
            GodRays.lightSourceasset = "Textures/flare2";
            SunPosition *= 2.5f;
            GodRays.Decay = .96f;
            GodRays.Density = 1f;
            GodRays.Exposure = .04f;
            GodRays.Weight = 1;

            renderer.ClearColor = Color.Red;

            UseBulletPhysics = true;  
        }
Пример #2
0
        public Game1()
            : base()
        {
            graphics.PreferredBackBufferHeight = 600;
            graphics.PreferredBackBufferWidth = 800;

            camera = new Base3DCamera(this, .1f, 20000);

            terrain = new BruteForceTerrain(this, "Textures/heightMap3");
            terrain.Position = new Vector3(-128, -30, -128);
            Components.Add(terrain);

            SunPosition = new Vector3(220, 225, 400);

            renderer.DirectionalLights.Add(new DeferredDirectionalLight(this, SunPosition, Vector3.Zero, Color.White, 1, true));

            Water.Enabled = true;
            
        }