コード例 #1
0
ファイル: DirectionalShadow.cs プロジェクト: bryanedds/Xi
 /// <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);
 }
コード例 #2
0
ファイル: NullDirectionalShadow.cs プロジェクト: bryanedds/Xi
 /// <summary>
 /// Create a NullDirectionalShadow.
 /// </summary>
 /// <param name="game">The game.</param>
 public NullDirectionalShadow(XiGame game)
 {
     camera = new OrthoCamera(game.GraphicsDevice);
 }
コード例 #3
0
ファイル: DirectionalLight.cs プロジェクト: bryanedds/Xi
 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);
 }