Наследование: Microsoft.Xna.Framework.Graphics.Effect
Пример #1
0
        public DeferredLightingRenderer(int renderOrder, int lightLayer, params int[] renderLayers) : base(renderOrder)
        {
            // make sure we have a workable Material for our lighting system
            material = new DeferredSpriteMaterial(nullNormalMapTexture);

            _lightLayer = lightLayer;
            Array.Sort(renderLayers);
            this.renderLayers = renderLayers;

            _lightEffect = new DeferredLightEffect();

            // meshes used for light volumes
            _quadMesh        = new QuadMesh(Core.graphicsDevice);
            _polygonMesh     = PolygonMesh.createSymmetricalPolygon(10);
            _quadPolygonMesh = PolygonMesh.createRectangle();

            // set some sensible defaults
            setAmbientColor(new Color(0.2f, 0.2f, 0.2f))
            .setClearColor(Color.CornflowerBlue);
        }
Пример #2
0
		public DeferredLightingRenderer( int renderOrder, int lightLayer, params int[] renderLayers ) : base( renderOrder )
		{
			// make sure we have a workable Material for our lighting system
			material = new DeferredSpriteMaterial( nullNormalMapTexture );

			_lightLayer = lightLayer;
			Array.Sort( renderLayers );
			Array.Reverse( renderLayers );
			this.renderLayers = renderLayers;

			_lightEffect = new DeferredLightEffect();

			// meshes used for light volumes
			_quadMesh = new QuadMesh( Core.graphicsDevice );
			_polygonMesh = PolygonMesh.createSymmetricalPolygon( 10 );
			_quadPolygonMesh = PolygonMesh.createRectangle();

			// set some sensible defaults
			setAmbientColor( new Color( 0.2f, 0.2f, 0.2f ) )
				.setClearColor( Color.CornflowerBlue );
		}