Exemplo n.º 1
0
 /// <summary>
 /// Create a DirectionalShadow.
 /// </summary>
 public DirectionalShadow(XiGame game, OrthoCamera shadowCamera)
 {
     XiHelper.ArgumentNullCheck(game, shadowCamera);
     this.game = game;
     this.shadowCamera = shadowCamera;
     shadowMapTarget = new ManagedRenderTarget2D(game, Constants.DirectionalShadowMapSurfaceToScreenRatio, 1, SurfaceFormat.Single, MultiSampleType.None, 0, 0);
     screenQuad = ScreenQuadGeometry.Create<VerticesPositionNormalTexture>(game.GraphicsDevice);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create a NullDirectionalShadow.
 /// </summary>
 /// <param name="game">The game.</param>
 public NullDirectionalShadow(XiGame game)
 {
     camera = new OrthoCamera(game.GraphicsDevice);
 }
Exemplo n.º 3
0
 private IDirectionalShadow CreateDirectionalShadow()
 {
     OrthoCamera shadowCamera = new OrthoCamera(Game.GraphicsDevice)
     {
         Width = Constants.DirectionalShadowSize.X,
         Height = Constants.DirectionalShadowSize.Y,
         NearPlane = 0,
         FarPlane = Constants.DirectionalShadowRange
     };
     return new DirectionalShadow(Game, shadowCamera);
 }