Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ShadowMap.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 
4 using SiliconStudio.Core.Mathematics;
5 using SiliconStudio.Paradox.DataModel;
6 using SiliconStudio.Paradox.Effects.Modules.Renderers;
7 using SiliconStudio.Paradox.Effects.Modules.Shadowmap;
8 using SiliconStudio.Paradox.Engine;
9 
10 namespace SiliconStudio.Paradox.Effects.Modules.Processors
11 {
12  /// <summary>
13  /// Represents a shadow map for the <see cref="ShadowMapRenderer"/>.
14  /// </summary>
15  public class ShadowMap
16  {
17  public ShadowMap()
18  {
19  ShadowNearDistance = 1.0f;
20  ShadowFarDistance = 50000.0f;
21  ShadowMapSize = 512;
22  CascadeCount = 4;
23  Layers = RenderLayers.RenderLayerAll;
24  Update = true;
25  }
26 
27  /// <summary>
28  /// A flag stating if the shadow map should be updated.
29  /// </summary>
30  public bool Update;
31 
32  /// <summary>
33  /// The light direction.
34  /// </summary>
36 
37  /// <summary>
38  /// The light position.
39  /// </summary>
41 
42  /// <summary>
43  /// The fov of the light.
44  /// </summary>
45  public float Fov;
46 
47  /// <value>
48  /// The size of the shadow map.
49  /// </value>
50  public int ShadowMapSize;
51 
52  /// <summary>
53  /// The shadow map near clipping distance.
54  /// </summary>
55  public float ShadowNearDistance;
56 
57  /// <summary>
58  /// The shadow map far clipping distance.
59  /// </summary>
60  public float ShadowFarDistance;
61 
62  /// <summary>
63  /// The number of shadow map cascades.
64  /// </summary>
65  public int CascadeCount;
66 
67  /// <summary>
68  /// The light type.
69  /// </summary>
71 
72  /// <summary>
73  /// The shadow map filter.
74  /// </summary>
76 
77  /// <summary>
78  /// The shadow map texture.
79  /// </summary>
81 
82  /// <summary>
83  /// The active layers for this shadow map.
84  /// </summary>
86 
87  internal ShadowMapCascadeInfo[] Cascades;
88  internal ShadowMapReceiverInfo ReceiverInfo;
89  internal ShadowMapReceiverVsmInfo ReceiverVsmInfo;
90  internal Vector3 LightDirectionNormalized;
91  }
92 }
ShadowMapTexture Texture
The shadow map texture.
Definition: ShadowMap.cs:80
Represents a shadow map for the ShadowMapRenderer.
Definition: ShadowMap.cs:15
Represents a three dimensional mathematical vector.
Definition: Vector3.cs:42
float ShadowNearDistance
The shadow map near clipping distance.
Definition: ShadowMap.cs:55
ShadowMapFilterType Filter
The shadow map filter.
Definition: ShadowMap.cs:75
RenderLayers Layers
The active layers for this shadow map.
Definition: ShadowMap.cs:85
float ShadowFarDistance
The shadow map far clipping distance.
Definition: ShadowMap.cs:60
int CascadeCount
The number of shadow map cascades.
Definition: ShadowMap.cs:65
Represents a texture to use with ShadowMapRenderer.
bool Update
A flag stating if the shadow map should be updated.
Definition: ShadowMap.cs:30