Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
CubemapBlendEffect.cs
Go to the documentation of this file.
1 // <auto-generated>
2 // Do not edit this file yourself!
3 //
4 // This code was generated by Paradox Shader Mixin Code Generator.
5 // To generate it yourself, please install SiliconStudio.Paradox.VisualStudio.Package .vsix
6 // and re-save the associated .pdxfx.
7 // </auto-generated>
8 
9 using System;
10 using SiliconStudio.Core;
11 using SiliconStudio.Paradox.Effects;
12 using SiliconStudio.Paradox.Graphics;
13 using SiliconStudio.Paradox.Shaders;
14 using SiliconStudio.Core.Mathematics;
16 
17 
18 #line 3 "D:\Code\Paradox\sources\shaders\CubemapBlendEffect.pdxfx"
19 using SiliconStudio.Paradox.Effects.Data;
20 
21 #line 4
22 using SiliconStudio.Paradox.Effects.Modules;
23 
24 #line 5
25 using SiliconStudio.Paradox.Effects.Modules.Renderers;
26 
27 #line 7
28 namespace CubemapBlendShader
29 {
30 
31  #line 9
32  internal static partial class ShaderMixins
33  {
34  internal partial class CubemapBlendEffect : IShaderMixinBuilder
35  {
36  public void Generate(ShaderMixinSourceTree mixin, ShaderMixinContext context)
37  {
38 
39  #line 15
40  context.Mixin(mixin, "ShaderBase");
41 
42  #line 16
43  context.Mixin(mixin, "ImageEffectShader");
44 
45  #line 19
46  mixin.Mixin.AddMacro("TEXTURECUBE_BLEND_COUNT", context.GetParam(CubemapBlendRenderer.CubemapCount));
47 
48  #line 21
49  if (context.GetParam(CubemapBlendRenderer.UseMultipleRenderTargets))
50 
51  #line 22
52  context.Mixin(mixin, "CubemapBlenderMRT");
53 
54  #line 24
55  else
56 
57  #line 24
58  context.Mixin(mixin, "CubemapBlender");
59 
60  #line 26
61  foreach(var ____1 in context.GetParam(CubemapBlendRenderer.Cubemaps))
62 
63  {
64 
65  #line 26
66  context.PushParameters(____1);
67 
68  {
69 
70  #line 28
71  var __subMixin = new ShaderMixinSourceTree() { Parent = mixin };
72 
73  #line 28
74  context.Mixin(__subMixin, "CubemapFace", context.GetParam(CubemapBlendRenderer.CubemapKey));
75  mixin.Mixin.AddCompositionToArray("Cubemaps", __subMixin.Mixin);
76  }
77 
78  #line 26
79  context.PopParameters();
80  }
81  }
82 
83  [ModuleInitializer]
84  internal static void __Initialize__()
85 
86  {
87  ShaderMixinManager.Register("CubemapBlendEffect", new CubemapBlendEffect());
88  }
89  }
90  }
91 }
A context used when mixin ShaderSource.
SiliconStudio.Paradox.Graphics.Buffer Buffer
All-in-One Buffer class linked SharpDX.Direct3D11.Buffer.
void Mixin(ShaderMixinSourceTree mixinTree, string name, params object[] genericParameters)
Mixins a ShaderClassSource identified by its name/generic parameters into the specified mixin tree...
Interface to be implemented for dynamic mixin generation.
static ParameterKey< bool > UseMultipleRenderTargets
Flag to enable multiple render target.
static ParameterKey< ShaderMixinParameters[]> Cubemaps
The key to set each cubemap parameter.