Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
LightingProcessorHelpers.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.Paradox.Effects.Modules.Renderers;
5 using SiliconStudio.Paradox.Graphics;
6 
7 namespace SiliconStudio.Paradox.Effects.Modules.Processors
8 {
10  {
11  public static ShadowUpdateInfo CreateShadowUpdateInfo(int index, int level)
12  {
13  var info = new ShadowUpdateInfo { CascadeCount = level };
14 
15  // Prepare keys for this shadow map type
16  var shadowSubKey = string.Format(".shadows[{0}]", index);
17  info.ShadowMapReceiverInfoKey = ParameterKeys.AppendKey(ShadowMapRenderer.Receivers, shadowSubKey);
18  info.ShadowMapReceiverVsmInfoKey = ParameterKeys.AppendKey(ShadowMapRenderer.ReceiversVsm, shadowSubKey);
19  info.ShadowMapLevelReceiverInfoKey = ParameterKeys.AppendKey(ShadowMapRenderer.LevelReceivers, shadowSubKey);
20  info.ShadowMapLightCountKey = ParameterKeys.AppendKey(ShadowMapRenderer.ShadowMapLightCount, shadowSubKey);
21  info.ShadowMapTextureKey = ParameterKeys.AppendKey(ShadowMapKeys.Texture, shadowSubKey);
22 
23  return info;
24  }
25  }
26 }