Represents DOF processing properties.
示例#1
0
        /// <summary>
        /// Creates ViewLayerHDR instance
        /// </summary>
        /// <param name="Game">Game engine</param>
        /// <param name="width">Target width.</param>
        /// <param name="height">Target height.</param>
        public RenderWorld(Game game, int width, int height)
        {
            Game    = game;
            this.rs = Game.RenderSystem;

            Camera = new Camera();

            var vp = Game.GraphicsDevice.DisplayBounds;

            if (width <= 0)
            {
                width = vp.Width;
            }
            if (height <= 0)
            {
                height = vp.Height;
            }

            HdrSettings = new HdrSettings();
            SkySettings = new SkySettings();
            DofSettings = new DofSettings();
            FogSettings = new FogSettings();

            Instances = new List <MeshInstance>();
            LightSet  = new LightSet(Game.RenderSystem);

            debug = new DebugRender(Game);

            particleSystem = new ParticleSystem(Game.RenderSystem, this);

            MeasuredOld = new RenderTarget2D(Game.GraphicsDevice, ColorFormat.Rgba32F, 1, 1);
            MeasuredNew = new RenderTarget2D(Game.GraphicsDevice, ColorFormat.Rgba32F, 1, 1);

            radianceFrame = new HdrFrame(Game, 512, 512);

            Radiance      = new RenderTargetCube(Game.GraphicsDevice, ColorFormat.Rgba16F, RenderSystem.EnvMapSize, true);
            RadianceCache = new TextureCubeArray(Game.GraphicsDevice, 128, RenderSystem.MaxEnvLights, ColorFormat.Rgba16F, true);

            Resize(width, height);
        }
示例#2
0
		/// <summary>
		/// Creates ViewLayerHDR instance
		/// </summary>
		/// <param name="Game">Game engine</param>
		/// <param name="width">Target width.</param>
		/// <param name="height">Target height.</param>
		public RenderWorld ( Game game, int width, int height ) : base( game )
		{
			var vp	=	Game.GraphicsDevice.DisplayBounds;

			if (width<=0) {
				width	=	vp.Width;
			}
			if (height<=0) {
				height	=	vp.Height;
			}

			HdrSettings		=	new HdrSettings();
			SkySettings		=	new SkySettings();
			DofSettings		=	new DofSettings();

			Instances		=	new List<MeshInstance>();
			LightSet		=	new LightSet( Game.RenderSystem );

			debug			=	new DebugRender( Game );
			
			particleSystem	=	new ParticleSystem( Game.RenderSystem, this );

			MeasuredOld		=	new RenderTarget2D( Game.GraphicsDevice, ColorFormat.Rgba32F,   1,  1 );
			MeasuredNew		=	new RenderTarget2D( Game.GraphicsDevice, ColorFormat.Rgba32F,   1,  1 );

			radianceFrame	=	new HdrFrame( Game, 512,512 );

			Radiance		=	new RenderTargetCube( Game.GraphicsDevice, ColorFormat.Rgba16F, RenderSystem.EnvMapSize, true );
			RadianceCache	=	new TextureCubeArray( Game.GraphicsDevice, 128, RenderSystem.MaxEnvLights, ColorFormat.Rgba16F, true );

			Resize( width, height );
		}