public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "A");

                {
                    var __mixinToCompose__ = "ABCSubEffect";
                    var __subMixin         = new ShaderMixinSource();
                    context.PushComposition(mixin, "SubCompute1", __subMixin);
                    context.Mixin(__subMixin, __mixinToCompose__);
                    context.PopComposition();
                }

                {
                    var __mixinToCompose__ = "ABCSubEffect";
                    var __subMixin         = new ShaderMixinSource();
                    context.PushComposition(mixin, "SubCompute2", __subMixin);
                    context.Mixin(__subMixin, __mixinToCompose__);
                    context.PopComposition();
                }

                {
                    var __mixinToCompose__ = "ABCSubEffect";
                    var __subMixin         = new ShaderMixinSource();
                    context.PushCompositionArray(mixin, "SubComputes", __subMixin);
                    context.Mixin(__subMixin, __mixinToCompose__);
                    context.PopComposition();
                }
            }
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ParticleBaseEffect");
                context.Mixin(mixin, "ParticleCustomShader");
                if (context.GetParam(ParticleCustomShaderKeys.BaseColor) != null)
                {

                    {
                        var __mixinToCompose__ = context.GetParam(ParticleCustomShaderKeys.BaseColor);
                        var __subMixin = new ShaderMixinSource();
                        context.PushComposition(mixin, "baseColor", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                }
                if (context.GetParam(ParticleCustomShaderKeys.BaseIntensity) != null)
                {

                    {
                        var __mixinToCompose__ = context.GetParam(ParticleCustomShaderKeys.BaseIntensity);
                        var __subMixin = new ShaderMixinSource();
                        context.PushComposition(mixin, "baseIntensity", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                }
            }
Exemplo n.º 3
0
            public void Generate(ShaderMixinSourceTree mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "A");

                {
                    var __subMixin = new ShaderMixinSourceTree()
                    {
                        Parent = mixin
                    };
                    context.PushComposition(mixin, "SubCompute1", __subMixin);
                    context.Mixin(__subMixin, "ABCSubEffect");
                    context.PopComposition();
                }

                {
                    var __subMixin = new ShaderMixinSourceTree()
                    {
                        Parent = mixin
                    };
                    context.PushComposition(mixin, "SubCompute2", __subMixin);
                    context.Mixin(__subMixin, "ABCSubEffect");
                    context.PopComposition();
                }

                {
                    var __subMixin = new ShaderMixinSourceTree()
                    {
                        Parent = mixin
                    };
                    context.PushCompositionArray(mixin, "SubComputes", __subMixin);
                    context.Mixin(__subMixin, "ABCSubEffect");
                    context.PopComposition();
                }
            }
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "A");
                context.Mixin(mixin, "B");
                if (context.GetParam(TestParameters.param1))
                {
                    context.Mixin(mixin, "C");
                    mixin.AddMacro("param2", context.GetParam(TestParameters.param2));

                    {
                        var __mixinToCompose__ = "X";
                        var __subMixin         = new ShaderMixinSource();
                        context.PushComposition(mixin, "x", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                }
                else
                {
                    context.Mixin(mixin, "D");
                    mixin.AddMacro("Test", context.GetParam(TestParameters.param3));

                    {
                        var __mixinToCompose__ = "Y";
                        var __subMixin         = new ShaderMixinSource();
                        context.PushComposition(mixin, "y", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                }
            }
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "A");
                context.Mixin(mixin, "B");
                if (context.GetParam(TestParameters.param1))
                {
                    context.Mixin(mixin, "C");
                    mixin.AddMacro("param2", context.GetParam(TestParameters.param2));

                    {
                        var __mixinToCompose__ = "X";
                        var __subMixin = new ShaderMixinSource();
                        context.PushComposition(mixin, "x", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                }
                else
                {
                    context.Mixin(mixin, "D");
                    mixin.AddMacro("Test", context.GetParam(TestParameters.param3));

                    {
                        var __mixinToCompose__ = "Y";
                        var __subMixin = new ShaderMixinSource();
                        context.PushComposition(mixin, "y", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                }
            }
Exemplo n.º 6
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                var customShaders = context.GetParam(MaterialKeys.CustomShaders);

                if (customShaders != null)
                {
                    context.Mixin(mixin, customShaders.ToString());
                    return;
                }

                context.Mixin(mixin, "StrideEffectBase");
                ShaderSource extensionPixelStageSurfaceShaders = context.GetParam(MaterialKeys.PixelStageSurfaceShaders);

                if (extensionPixelStageSurfaceShaders != null)
                {
                    context.Mixin(mixin, "MaterialSurfacePixelStageCompositor");

                    {
                        var __mixinToCompose__ = (extensionPixelStageSurfaceShaders);
                        var __subMixin         = new ShaderMixinSource();
                        context.PushComposition(mixin, "materialPixelStage", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }

                    {
                        var __mixinToCompose__ = context.GetParam(MaterialKeys.PixelStageStreamInitializer);
                        var __subMixin         = new ShaderMixinSource();
                        context.PushComposition(mixin, "streamInitializerPixelStage", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                    ShaderSource extensionPixelStageSurfaceFilter = context.GetParam(MaterialKeys.PixelStageSurfaceFilter);
                    if (extensionPixelStageSurfaceFilter != null)
                    {
                        context.Mixin(mixin, (extensionPixelStageSurfaceFilter));
                    }
                    if (context.ChildEffectName == "GBuffer")
                    {
                        context.Mixin(mixin, "GBuffer");
                        return;
                    }
                }
                context.Mixin(mixin, "StrideLighting");
                if (context.ChildEffectName == "ShadowMapCaster")
                {
                    context.Mixin(mixin, "ShadowMapCaster");
                    return;
                }
                if (context.ChildEffectName == "ShadowMapCasterParaboloid")
                {
                    context.Mixin(mixin, "ShadowMapCasterParaboloid");
                    return;
                }
                if (context.ChildEffectName == "ShadowMapCasterCubeMap")
                {
                    context.Mixin(mixin, "ShadowMapCasterCubeMap");
                    return;
                }
            }
Exemplo n.º 7
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "A");

                {
                    var __mixinToCompose__ = "ABCSubEffect";
                    var __subMixin = new ShaderMixinSource();
                    context.PushComposition(mixin, "SubCompute1", __subMixin);
                    context.Mixin(__subMixin, __mixinToCompose__);
                    context.PopComposition();
                }

                {
                    var __mixinToCompose__ = "ABCSubEffect";
                    var __subMixin = new ShaderMixinSource();
                    context.PushComposition(mixin, "SubCompute2", __subMixin);
                    context.Mixin(__subMixin, __mixinToCompose__);
                    context.PopComposition();
                }

                {
                    var __mixinToCompose__ = "ABCSubEffect";
                    var __subMixin = new ShaderMixinSource();
                    context.PushCompositionArray(mixin, "SubComputes", __subMixin);
                    context.Mixin(__subMixin, __mixinToCompose__);
                    context.PopComposition();
                }
            }
Exemplo n.º 8
0
 public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
 {
     context.Mixin(mixin, "ParticleBaseEffect");
     context.Mixin(mixin, "ParticleCustomShader");
     if (context.GetParam(ParticleCustomShaderKeys.BaseColor) != null)
     {
         {
             var __mixinToCompose__ = context.GetParam(ParticleCustomShaderKeys.BaseColor);
             var __subMixin         = new ShaderMixinSource();
             context.PushComposition(mixin, "baseColor", __subMixin);
             context.Mixin(__subMixin, __mixinToCompose__);
             context.PopComposition();
         }
     }
     if (context.GetParam(ParticleCustomShaderKeys.BaseIntensity) != null)
     {
         {
             var __mixinToCompose__ = context.GetParam(ParticleCustomShaderKeys.BaseIntensity);
             var __subMixin         = new ShaderMixinSource();
             context.PushComposition(mixin, "baseIntensity", __subMixin);
             context.Mixin(__subMixin, __mixinToCompose__);
             context.PopComposition();
         }
     }
 }
Exemplo n.º 9
0
            public void Generate(ShaderMixinSourceTree mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "BRDFDiffuseBase");
                context.Mixin(mixin, "BRDFSpecularBase");
                if (context.GetParam(MaterialParameters.AlbedoSpecular) != null)
                {
                    context.Mixin(mixin, "AlbedoSpecularBase");

                    {
                        var __subMixin = new ShaderMixinSourceTree()
                        {
                            Parent = mixin
                        };
                        context.PushComposition(mixin, "albedoSpecular", __subMixin);
                        context.Mixin(__subMixin, context.GetParam(MaterialParameters.AlbedoSpecular));
                        context.PopComposition();
                    }

                    {
                        var __subMixin = new ShaderMixinSourceTree()
                        {
                            Parent = mixin
                        };
                        context.PushComposition(mixin, "SpecularLighting", __subMixin);
                        context.Mixin(__subMixin, "ParadoxSpecularLighting");
                        context.PopComposition();
                    }
                }
            }
Exemplo n.º 10
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "LightSkyboxShader");
                if (context.GetParam(LightSkyboxShaderKeys.LightDiffuseColor) != null)
                {

                    {
                        var __mixinToCompose__ = context.GetParam(LightSkyboxShaderKeys.LightDiffuseColor);
                        var __subMixin = new ShaderMixinSource();
                        context.PushComposition(mixin, "lightDiffuseColor", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                }
                if (context.GetParam(LightSkyboxShaderKeys.LightSpecularColor) != null)
                {

                    {
                        var __mixinToCompose__ = context.GetParam(LightSkyboxShaderKeys.LightSpecularColor);
                        var __subMixin = new ShaderMixinSource();
                        context.PushComposition(mixin, "lightSpecularColor", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                }
            }
Exemplo n.º 11
0
            public void Generate(ShaderMixinSourceTree mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ShaderBase");
                context.Mixin(mixin, "TransformationWAndVP");
                context.Mixin(mixin, "AlbedoFlatShading");
                if (context.GetParam(MaterialParameters.AlbedoDiffuse) != null)

                {
                    var __subMixin = new ShaderMixinSourceTree()
                    {
                        Parent = mixin
                    };
                    context.PushComposition(mixin, "albedoDiffuse", __subMixin);
                    context.Mixin(__subMixin, context.GetParam(MaterialParameters.AlbedoDiffuse));
                    context.PopComposition();
                }
                else

                {
                    var __subMixin = new ShaderMixinSourceTree()
                    {
                        Parent = mixin
                    };
                    context.PushComposition(mixin, "albedoDiffuse", __subMixin);
                    context.Mixin(__subMixin, "ComputeColorTextureCubeReflect", TexturingKeys.TextureCube0);
                    context.PopComposition();
                }
            }
Exemplo n.º 12
0
            public void Generate(ShaderMixinSourceTree mixin, ShaderMixinContext context)
            {
                context.CloneParentMixinToCurrent();
                context.Mixin(mixin, "GBuffer");
                context.Mixin(mixin, "NormalVSStream");
                if (context.GetParam(MaterialParameters.SpecularPowerMap) != null)
                {
                    context.Mixin(mixin, "SpecularPower");

                    {
                        var __subMixin = new ShaderMixinSourceTree()
                        {
                            Parent = mixin
                        };
                        context.PushComposition(mixin, "SpecularPowerMap", __subMixin);
                        context.Mixin(__subMixin, context.GetParam(MaterialParameters.SpecularPowerMap));
                        context.PopComposition();
                    }
                }
                if (context.GetParam(MaterialParameters.SpecularIntensityMap) != null)
                {
                    {
                        var __subMixin = new ShaderMixinSourceTree()
                        {
                            Parent = mixin
                        };
                        context.PushComposition(mixin, "SpecularIntensityMap", __subMixin);
                        context.Mixin(__subMixin, context.GetParam(MaterialParameters.SpecularIntensityMap));
                        context.PopComposition();
                    }
                }
            }
Exemplo n.º 13
0
            public void Generate(ShaderMixinSourceTree mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ShaderBase");
                context.Mixin(mixin, "TransformationWVP");
                context.Mixin(mixin, "BRDFDiffuseBase");
                context.Mixin(mixin, "BRDFSpecularBase");
                context.Mixin(mixin, "AlbedoFlatShading");
                context.Mixin(mixin, "TransparentShading");
                if (context.GetParam(MaterialParameters.AlbedoDiffuse) != null)

                {
                    var __subMixin = new ShaderMixinSourceTree()
                    {
                        Parent = mixin
                    };
                    context.PushComposition(mixin, "albedoDiffuse", __subMixin);
                    context.Mixin(__subMixin, context.GetParam(MaterialParameters.AlbedoDiffuse));
                    context.PopComposition();
                }
                if (context.GetParam(MaterialParameters.AlbedoSpecular) != null)

                {
                    var __subMixin = new ShaderMixinSourceTree()
                    {
                        Parent = mixin
                    };
                    context.PushComposition(mixin, "albedoSpecular", __subMixin);
                    context.Mixin(__subMixin, context.GetParam(MaterialParameters.AlbedoSpecular));
                    context.PopComposition();
                }
            }
Exemplo n.º 14
0
            public void Generate(ShaderMixinSourceTree mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ParadoxBaseShader");
                context.Mixin(mixin, "ParadoxSkinning");
                context.Mixin(mixin, "ParadoxShadowCast");
                if (context.GetParam(RenderingParameters.UseDeferred) && !context.GetParam(MaterialParameters.UseTransparent))
                {
                    context.Mixin(mixin, "ParadoxGBufferPlugin");
                    context.Mixin(mixin, "LightDeferredShading");
                    context.Mixin(mixin, "ParadoxDiffuseDeferred");
                    context.Mixin(mixin, "ParadoxSpecularDeferred");
                    if (context.GetParam(MaterialParameters.AmbientMap) != null)
                    {
                        context.Mixin(mixin, "AmbientMapShading");

                        {
                            var __subMixin = new ShaderMixinSourceTree()
                            {
                                Parent = mixin
                            };
                            context.PushComposition(mixin, "AmbientMap", __subMixin);
                            context.Mixin(__subMixin, context.GetParam(MaterialParameters.AmbientMap));
                            context.PopComposition();
                        }
                    }
                }
                else
                {
                    context.Mixin(mixin, "ParadoxDiffuseForward");
                    context.Mixin(mixin, "ParadoxSpecularForward");
                    if (context.GetParam(MaterialParameters.AmbientMap) != null)
                    {
                        context.Mixin(mixin, "AmbientMapShading");

                        {
                            var __subMixin = new ShaderMixinSourceTree()
                            {
                                Parent = mixin
                            };
                            context.PushComposition(mixin, "AmbientMap", __subMixin);
                            context.Mixin(__subMixin, context.GetParam(MaterialParameters.AmbientMap));
                            context.PopComposition();
                        }
                    }
                    if (context.GetParam(MaterialParameters.UseTransparent))
                    {
                        context.Mixin(mixin, "TransparentShading");
                        context.Mixin(mixin, "DiscardTransparent");
                    }
                }
            }
Exemplo n.º 15
0
            public void Generate(ShaderMixinSourceTree mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ShaderBase");
                context.Mixin(mixin, "ShadingBase");
                context.Mixin(mixin, "TransformationWAndVP");
                context.Mixin(mixin, "PositionVSStream");
                if (context.GetParam(MaterialParameters.NormalMap) != null)
                {
                    context.Mixin(mixin, "NormalMapTexture");

                    {
                        var __subMixin = new ShaderMixinSourceTree()
                        {
                            Parent = mixin
                        };
                        context.PushComposition(mixin, "normalMap", __subMixin);
                        context.Mixin(__subMixin, context.GetParam(MaterialParameters.NormalMap));
                        context.PopComposition();
                    }
                }
                else
                {
                    context.Mixin(mixin, "NormalVSStream");
                }
            }
Exemplo n.º 16
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "VoxelVisualizationViewShader");
                if (context.GetParam(VoxelVisualizationViewShaderKeys.marcher) != null)
                {
                    {
                        var __mixinToCompose__ = context.GetParam(VoxelVisualizationViewShaderKeys.marcher);
                        var __subMixin         = new ShaderMixinSource();
                        context.PushComposition(mixin, "marcher", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                }
                if (context.GetParam(MarchAttributesKeys.AttributeSamplers) != null)
                {
                    foreach (var attr in context.GetParam(MarchAttributesKeys.AttributeSamplers))

                    {
                        {
                            var __mixinToCompose__ = (attr);
                            var __subMixin         = new ShaderMixinSource();
                            context.PushCompositionArray(mixin, "AttributeSamplers", __subMixin);
                            context.Mixin(__subMixin, __mixinToCompose__);
                            context.PopComposition();
                        }
                    }
                }
            }
Exemplo n.º 17
0
            public void Generate(ShaderMixinSourceTree mixin, ShaderMixinContext context)
            {
                if (context.GetParam(TestParameters.UseComputeColor2))
                {
                    context.Mixin(mixin, "ComputeColor2");
                }
                else if (context.GetParam(TestParameters.UseComputeColorRedirect))
                {
                    context.Mixin(mixin, "ComputeColorRedirect");

                    {
                        var __subMixin = new ShaderMixinSourceTree()
                        {
                            Parent = mixin
                        };
                        context.PushComposition(mixin, "ColorRedirect", __subMixin);
                        context.Mixin(__subMixin, "ComputeColor2");
                        context.PopComposition();
                    }
                }
                else
                {
                    context.Mixin(mixin, "ComputeColor");
                }
            }
Exemplo n.º 18
0
            public void Generate(ShaderMixinSourceTree mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ParadoxBaseShader");
                context.Mixin(mixin, "ParadoxSkinning");
                context.Mixin(mixin, "ParadoxShadowCast");
                context.Mixin(mixin, "ParadoxDiffuseForward");
                context.Mixin(mixin, "ParadoxSpecularForward");
                if (context.GetParam(MaterialParameters.AmbientMap) != null)
                {
                    context.Mixin(mixin, "AmbientMapShading");

                    {
                        var __subMixin = new ShaderMixinSourceTree()
                        {
                            Parent = mixin
                        };
                        context.PushComposition(mixin, "AmbientMap", __subMixin);
                        context.Mixin(__subMixin, context.GetParam(MaterialParameters.AmbientMap));
                        context.PopComposition();
                    }
                }
                if (context.GetParam(MaterialParameters.UseTransparentMask))
                {
                    context.Mixin(mixin, "TransparentShading");
                    context.Mixin(mixin, "DiscardTransparentThreshold", context.GetParam(MaterialParameters.AlphaDiscardThreshold));
                }
                else if (context.GetParam(MaterialParameters.UseTransparent))
                {
                    context.Mixin(mixin, "TransparentShading");
                    context.Mixin(mixin, "DiscardTransparent");
                }
            }
Exemplo n.º 19
0
            public void Generate(ShaderMixinSourceTree mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "LightPrepass");
                context.Mixin(mixin, "PositionVSGBuffer");
                context.Mixin(mixin, "NormalVSGBuffer");
                context.Mixin(mixin, "SpecularPowerGBuffer");

                {
                    var __subMixin = new ShaderMixinSourceTree()
                    {
                        Parent = mixin
                    };
                    context.PushComposition(mixin, "DiffuseColor", __subMixin);
                    context.Mixin(__subMixin, "ComputeBRDFColorFresnel");
                    context.PopComposition();
                }

                {
                    var __subMixin = new ShaderMixinSourceTree()
                    {
                        Parent = mixin
                    };
                    context.PushComposition(mixin, "DiffuseLighting", __subMixin);
                    context.Mixin(__subMixin, "ComputeBRDFDiffuseLambert");
                    context.PopComposition();
                }

                {
                    var __subMixin = new ShaderMixinSourceTree()
                    {
                        Parent = mixin
                    };
                    context.PushComposition(mixin, "SpecularColor", __subMixin);
                    context.Mixin(__subMixin, "ComputeBRDFColor");
                    context.PopComposition();
                }

                {
                    var __subMixin = new ShaderMixinSourceTree()
                    {
                        Parent = mixin
                    };
                    context.PushComposition(mixin, "SpecularLighting", __subMixin);
                    context.Mixin(__subMixin, "ComputeBRDFColorSpecularBlinnPhong");
                    context.PopComposition();
                }
            }
Exemplo n.º 20
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "McIntoshOptimizedShader");

                {
                    var __subMixin = new ShaderMixinSource() { Parent = mixin };
                    context.PushComposition(mixin, "directionalBlurA", __subMixin);
                    context.Mixin(__subMixin, "DepthAwareDirectionalBlurUtil", context.GetParam(DepthAwareDirectionalBlurKeys.Count), context.GetParam(DepthAwareDirectionalBlurKeys.TotalTap));
                    context.PopComposition();
                }

                {
                    var __subMixin = new ShaderMixinSource() { Parent = mixin };
                    context.PushComposition(mixin, "directionalBlurB", __subMixin);
                    context.Mixin(__subMixin, "DepthAwareDirectionalBlurUtil", context.GetParam(DepthAwareDirectionalBlurKeys.Count), context.GetParam(DepthAwareDirectionalBlurKeys.TotalTap));
                    context.PopComposition();
                }
            }
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "XenkoEffectBase");
                ShaderSource extensionPixelStageSurfaceShaders = context.GetParam(MaterialKeys.PixelStageSurfaceShaders);

                if (extensionPixelStageSurfaceShaders != null)
                {
                    context.Mixin(mixin, "MaterialSurfacePixelStageCompositor");

                    {
                        var __mixinToCompose__ = (extensionPixelStageSurfaceShaders);
                        var __subMixin         = new ShaderMixinSource();
                        context.PushComposition(mixin, "materialPixelStage", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }

                    {
                        var __mixinToCompose__ = context.GetParam(MaterialKeys.PixelStageStreamInitializer);
                        var __subMixin         = new ShaderMixinSource();
                        context.PushComposition(mixin, "streamInitializerPixelStage", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                    ShaderSource extensionPixelStageSurfaceFilter = context.GetParam(MaterialKeys.PixelStageSurfaceFilter);
                    if (extensionPixelStageSurfaceFilter != null)
                    {
                        context.Mixin(mixin, (extensionPixelStageSurfaceFilter));
                    }
                    if (context.ChildEffectName == "GBuffer")
                    {
                        context.Mixin(mixin, "GBuffer");
                        return;
                    }
                }
                context.Mixin(mixin, "XenkoLightingVXGI");
                if (context.ChildEffectName == "IsotropicVoxelFragmentEffect")
                {
                    context.Mixin(mixin, "IsotropicVoxelFragmentEffect");
                    return;
                }
            }
Exemplo n.º 22
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ToneMapShader");

                {
                    var __subMixin = new ShaderMixinSource() { Parent = mixin };
                    context.PushComposition(mixin, "ToneMapOperator", __subMixin);
                    context.Mixin(__subMixin, context.GetParam(ColorTransformKeys.Shader));
                    context.PopComposition();
                }
            }
Exemplo n.º 23
0
 public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
 {
     {
         var __mixinToCompose__ = (context.GetParam(LightShaftsEffectKeys.LightGroup));
         var __subMixin         = new ShaderMixinSource();
         context.PushComposition(mixin, "lightGroup", __subMixin);
         context.Mixin(__subMixin, __mixinToCompose__);
         context.PopComposition();
     }
     context.Mixin(mixin, "LightShaftsShader", context.GetParam(LightShaftsEffectKeys.SampleCount));
 }
Exemplo n.º 24
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "McIntoshOptimizedShader");

                {
                    var __mixinToCompose__ = "DepthAwareDirectionalBlurUtil";
                    var __subMixin         = new ShaderMixinSource();
                    context.PushComposition(mixin, "directionalBlurA", __subMixin);
                    context.Mixin(__subMixin, __mixinToCompose__, context.GetParam(DepthAwareDirectionalBlurKeys.Count), context.GetParam(DepthAwareDirectionalBlurKeys.TotalTap));
                    context.PopComposition();
                }

                {
                    var __mixinToCompose__ = "DepthAwareDirectionalBlurUtil";
                    var __subMixin         = new ShaderMixinSource();
                    context.PushComposition(mixin, "directionalBlurB", __subMixin);
                    context.Mixin(__subMixin, __mixinToCompose__, context.GetParam(DepthAwareDirectionalBlurKeys.Count), context.GetParam(DepthAwareDirectionalBlurKeys.TotalTap));
                    context.PopComposition();
                }
            }
Exemplo n.º 25
0
            public void Generate(ShaderMixinSourceTree mixin, ShaderMixinContext context)
            {
                if (context.GetParam(MaterialParameters.SpecularModel) == MaterialSpecularModel.None || context.GetParam(MaterialParameters.SpecularModel) == MaterialSpecularModel.Phong)
                {
                    context.Mixin(mixin, "ComputeBRDFColorSpecularPhong");
                }
                else if (context.GetParam(MaterialParameters.SpecularModel) == MaterialSpecularModel.BlinnPhong)
                {
                    context.Mixin(mixin, "ComputeBRDFColorSpecularBlinnPhong");
                }
                else if (context.GetParam(MaterialParameters.SpecularModel) == MaterialSpecularModel.CookTorrance)
                {
                    context.Mixin(mixin, "ComputeBRDFColorSpecularCookTorrance");
                }
                if (context.GetParam(MaterialParameters.SpecularPowerMap) != null)
                {
                    context.Mixin(mixin, "SpecularPower");

                    {
                        var __subMixin = new ShaderMixinSourceTree()
                        {
                            Parent = mixin
                        };
                        context.PushComposition(mixin, "SpecularPowerMap", __subMixin);
                        context.Mixin(__subMixin, context.GetParam(MaterialParameters.SpecularPowerMap));
                        context.PopComposition();
                    }
                }
                if (context.GetParam(MaterialParameters.SpecularIntensityMap) != null)
                {
                    {
                        var __subMixin = new ShaderMixinSourceTree()
                        {
                            Parent = mixin
                        };
                        context.PushComposition(mixin, "SpecularIntensityMap", __subMixin);
                        context.Mixin(__subMixin, context.GetParam(MaterialParameters.SpecularIntensityMap));
                        context.PopComposition();
                    }
                }
            }
Exemplo n.º 26
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ToneMapShader", context.GetParam(ToneMapKeys.AutoKey), context.GetParam(ToneMapKeys.AutoExposure));

                {
                    var __mixinToCompose__ = context.GetParam(ColorTransformKeys.Shader);
                    var __subMixin         = new ShaderMixinSource();
                    context.PushComposition(mixin, "ToneMapOperator", __subMixin);
                    context.Mixin(__subMixin, __mixinToCompose__);
                    context.PopComposition();
                }
            }
Exemplo n.º 27
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ToneMapShader", context.GetParam(ToneMapKeys.AutoKey), context.GetParam(ToneMapKeys.AutoExposure));

                {
                    var __mixinToCompose__ = context.GetParam(ColorTransformKeys.Shader);
                    var __subMixin = new ShaderMixinSource();
                    context.PushComposition(mixin, "ToneMapOperator", __subMixin);
                    context.Mixin(__subMixin, __mixinToCompose__);
                    context.PopComposition();
                }
            }
Exemplo n.º 28
0
            public void Generate(ShaderMixinSourceTree mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ShaderBase");
                context.Mixin(mixin, "TransformationWAndVP");
                context.Mixin(mixin, "PositionVSStream");
                context.Mixin(mixin, "NormalVSStream");
                mixin.Mixin.AddMacro("RENDER_TARGET_COUNT", 3);
                context.Mixin(mixin, "ShadingBase");
                if (context.GetParam(MaterialParameters.AlbedoDiffuse) != null)

                {
                    var __subMixin = new ShaderMixinSourceTree()
                    {
                        Parent = mixin
                    };
                    context.PushComposition(mixin, "ShadingColor0", __subMixin);
                    context.Mixin(__subMixin, context.GetParam(MaterialParameters.AlbedoDiffuse));
                    context.PopComposition();
                }

                {
                    var __subMixin = new ShaderMixinSourceTree()
                    {
                        Parent = mixin
                    };
                    context.PushComposition(mixin, "ShadingColor1", __subMixin);
                    context.Mixin(__subMixin, "LinearDepth");
                    context.PopComposition();
                }

                {
                    var __subMixin = new ShaderMixinSourceTree()
                    {
                        Parent = mixin
                    };
                    context.PushComposition(mixin, "ShadingColor2", __subMixin);
                    context.Mixin(__subMixin, "NormalColor");
                    context.PopComposition();
                }
            }
Exemplo n.º 29
0
            public void Generate(ShaderMixinSourceTree mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ShaderBase");
                context.Mixin(mixin, "TransformationWAndVP");
                context.Mixin(mixin, "AlbedoFlatShading");
                if (context.GetParam(MaterialParameters.AlbedoDiffuse) != null)

                    {
                        var __subMixin = new ShaderMixinSourceTree() { Parent = mixin };
                        context.PushComposition(mixin, "albedoDiffuse", __subMixin);
                        context.Mixin(__subMixin, context.GetParam(MaterialParameters.AlbedoDiffuse));
                        context.PopComposition();
                    }
                else

                    {
                        var __subMixin = new ShaderMixinSourceTree() { Parent = mixin };
                        context.PushComposition(mixin, "albedoDiffuse", __subMixin);
                        context.Mixin(__subMixin, "ComputeColorTextureCubeReflect", TexturingKeys.TextureCube0);
                        context.PopComposition();
                    }
            }
Exemplo n.º 30
0
            public void Generate(ShaderMixinSourceTree mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ShaderBase");
                context.Mixin(mixin, "TransformationWAndVP");
                context.Mixin(mixin, "AlbedoFlatShading");

                {
                    var __subMixin = new ShaderMixinSourceTree() { Parent = mixin };
                    context.PushComposition(mixin, "albedoDiffuse", __subMixin);
                    context.Mixin(__subMixin, "ComputeColorTextureCubeBasic", TexturingKeys.TextureCube0);
                    context.PopComposition();
                }
            }
Exemplo n.º 31
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "LightVoxelShader");
                if (context.GetParam(LightVoxelShaderKeys.diffuseMarcher) != null)
                {
                    {
                        var __mixinToCompose__ = context.GetParam(LightVoxelShaderKeys.diffuseMarcher);
                        var __subMixin         = new ShaderMixinSource();
                        context.PushComposition(mixin, "diffuseMarcher", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                }
                if (context.GetParam(LightVoxelShaderKeys.specularMarcher) != null)
                {
                    {
                        var __mixinToCompose__ = context.GetParam(LightVoxelShaderKeys.specularMarcher);
                        var __subMixin         = new ShaderMixinSource();
                        context.PushComposition(mixin, "specularMarcher", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                }
                if (context.GetParam(MarchAttributesKeys.AttributeSamplers) != null)
                {
                    foreach (var attr in context.GetParam(MarchAttributesKeys.AttributeSamplers))

                    {
                        {
                            var __mixinToCompose__ = (attr);
                            var __subMixin         = new ShaderMixinSource();
                            context.PushCompositionArray(mixin, "AttributeSamplers", __subMixin);
                            context.Mixin(__subMixin, __mixinToCompose__);
                            context.PopComposition();
                        }
                    }
                }
            }
Exemplo n.º 32
0
 public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
 {
     context.Mixin(mixin, "SkyboxShader");
     if (context.GetParam(SkyboxKeys.Shader) != null)
     {
         {
             var __mixinToCompose__ = context.GetParam(SkyboxKeys.Shader);
             var __subMixin         = new ShaderMixinSource();
             context.PushComposition(mixin, "skyboxColor", __subMixin);
             context.Mixin(__subMixin, __mixinToCompose__);
             context.PopComposition();
         }
     }
 }
Exemplo n.º 33
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ShaderBase");
                context.Mixin(mixin, "TransformationWAndVP");
                context.Mixin(mixin, "AlbedoFlatShading");

                {
                    var __mixinToCompose__ = "ComputeColorTextureCubeBasic";
                    var __subMixin         = new ShaderMixinSource();
                    context.PushComposition(mixin, "albedoDiffuse", __subMixin);
                    context.Mixin(__subMixin, __mixinToCompose__, TexturingKeys.TextureCube0);
                    context.PopComposition();
                }
            }
Exemplo n.º 34
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ToneMapShader");

                {
                    var __subMixin = new ShaderMixinSource()
                    {
                        Parent = mixin
                    };
                    context.PushComposition(mixin, "ToneMapOperator", __subMixin);
                    context.Mixin(__subMixin, context.GetParam(ColorTransformKeys.Shader));
                    context.PopComposition();
                }
            }
 public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
 {
     context.Mixin(mixin, "IsotropicVoxelFragment");
     if (context.GetParam(IsotropicVoxelFragmentKeys.Storage) != null)
     {
         {
             var __mixinToCompose__ = (context.GetParam(IsotropicVoxelFragmentKeys.Storage));
             var __subMixin         = new ShaderMixinSource();
             context.PushComposition(mixin, "Storage", __subMixin);
             context.Mixin(__subMixin, __mixinToCompose__);
             context.PopComposition();
         }
     }
 }
Exemplo n.º 36
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "A");
                context.Mixin(mixin, "B");
                context.Mixin(mixin, "C");

                {
                    var __mixinToCompose__ = "X";
                    var __subMixin         = new ShaderMixinSource();
                    context.PushComposition(mixin, "x", __subMixin);
                    context.Mixin(__subMixin, __mixinToCompose__);
                    context.PopComposition();
                }
            }
Exemplo n.º 37
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "A");
                context.Mixin(mixin, "B");
                context.Mixin(mixin, "C");

                {
                    var __mixinToCompose__ = "X";
                    var __subMixin = new ShaderMixinSource();
                    context.PushComposition(mixin, "x", __subMixin);
                    context.Mixin(__subMixin, __mixinToCompose__);
                    context.PopComposition();
                }
            }
 public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
 {
     context.Mixin(mixin, "LightVoxelShader");
     if (context.GetParam(LightVoxelShaderKeys.LightDiffuseVoxelColor) != null)
     {
         {
             var __mixinToCompose__ = context.GetParam(LightVoxelShaderKeys.LightDiffuseVoxelColor);
             var __subMixin         = new ShaderMixinSource();
             context.PushComposition(mixin, "lightDiffuseVoxelColor", __subMixin);
             context.Mixin(__subMixin, __mixinToCompose__);
             context.PopComposition();
         }
     }
 }
Exemplo n.º 39
0
 public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
 {
     context.Mixin(mixin, "Voxel2x2x2Mipmap");
     if (context.GetParam(Voxel2x2x2MipmapKeys.mipmapper) != null)
     {
         {
             var __mixinToCompose__ = context.GetParam(Voxel2x2x2MipmapKeys.mipmapper);
             var __subMixin         = new ShaderMixinSource();
             context.PushComposition(mixin, "mipmapper", __subMixin);
             context.Mixin(__subMixin, __mixinToCompose__);
             context.PopComposition();
         }
     }
 }
Exemplo n.º 40
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "SkyboxShader");
                if (context.GetParam(SkyboxKeys.Shader) != null)
                {

                    {
                        var __subMixin = new ShaderMixinSource() { Parent = mixin };
                        context.PushComposition(mixin, "skyboxColor", __subMixin);
                        context.Mixin(__subMixin, context.GetParam(SkyboxKeys.Shader));
                        context.PopComposition();
                    }
                }
            }
 public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
 {
     context.Mixin(mixin, "VoxelVisualizationRawShader");
     if (context.GetParam(VoxelVisualizationRawShaderKeys.Attribute) != null)
     {
         {
             var __mixinToCompose__ = context.GetParam(VoxelVisualizationRawShaderKeys.Attribute);
             var __subMixin         = new ShaderMixinSource();
             context.PushComposition(mixin, "Attribute", __subMixin);
             context.Mixin(__subMixin, __mixinToCompose__);
             context.PopComposition();
         }
     }
 }
Exemplo n.º 42
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                if (context.GetParam(TestParameters.UseComputeColor2))
                {
                    context.Mixin(mixin, "ComputeColor2");
                }
                else if (context.GetParam(TestParameters.UseComputeColorRedirect))
                {
                    context.Mixin(mixin, "ComputeColorRedirect");

                    {
                        var __mixinToCompose__ = "ComputeColor2";
                        var __subMixin = new ShaderMixinSource();
                        context.PushComposition(mixin, "ColorRedirect", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                }
                else
                {
                    context.Mixin(mixin, "ComputeColor");
                }
            }
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "XenkoEffectBase");
                var extensionPixelStageSurfaceShaders = context.GetParam(MaterialKeys.PixelStageSurfaceShaders);
                if (extensionPixelStageSurfaceShaders != null)
                {
                    context.Mixin(mixin, "MaterialSurfacePixelStageCompositor");

                    {
                        var __mixinToCompose__ = (extensionPixelStageSurfaceShaders);
                        var __subMixin = new ShaderMixinSource();
                        context.PushComposition(mixin, "materialPixelStage", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }

                    {
                        var __mixinToCompose__ = context.GetParam(MaterialKeys.PixelStageStreamInitializer);
                        var __subMixin = new ShaderMixinSource();
                        context.PushComposition(mixin, "streamInitializerPixelStage", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                    var extensionPixelStageSurfaceFilter = context.GetParam(MaterialKeys.PixelStageSurfaceFilter);
                    if (extensionPixelStageSurfaceFilter != null)
                    {
                        context.Mixin(mixin, (extensionPixelStageSurfaceFilter));
                    }
                }
                context.Mixin(mixin, "XenkoLighting");
                if (context.ChildEffectName == "ShadowMapCaster")
                {
                    context.Mixin(mixin, "ShadowMapCaster");
                    return;
                }
            }
Exemplo n.º 44
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ShaderBase");
                context.Mixin(mixin, "TransformationWAndVP");
                mixin.AddMacro("MAX_VERTEX_COUNT", 9);
                context.Mixin(mixin, "CameraCube");
                context.Mixin(mixin, "AlbedoFlatShading");
                if (context.GetParam(MaterialParameters.AlbedoDiffuse) != null)

                    {
                        var __mixinToCompose__ = context.GetParam(MaterialParameters.AlbedoDiffuse);
                        var __subMixin = new ShaderMixinSource();
                        context.PushComposition(mixin, "albedoDiffuse", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
            }
Exemplo n.º 45
0
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ShaderBase");
                context.Mixin(mixin, "ShadingBase");
                var extensionPreVertexStageSurfaceShaders = context.GetParam(MaterialKeys.VertexStageSurfaceShaders);
                if (extensionPreVertexStageSurfaceShaders != null)
                {
                    context.Mixin(mixin, "MaterialSurfaceVertexStageCompositor");

                    {
                        var __mixinToCompose__ = (extensionPreVertexStageSurfaceShaders);
                        var __subMixin = new ShaderMixinSource();
                        context.PushComposition(mixin, "materialVertexStage", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }

                    {
                        var __mixinToCompose__ = context.GetParam(MaterialKeys.VertexStageStreamInitializer);
                        var __subMixin = new ShaderMixinSource();
                        context.PushComposition(mixin, "streamInitializerVertexStage", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                }
                context.Mixin(mixin, "TransformationBase");
                context.Mixin(mixin, "NormalStream");
                context.Mixin(mixin, "TransformationWAndVP");
                if (context.GetParam(MaterialKeys.HasNormalMap))
                {
                    context.Mixin(mixin, "NormalFromNormalMapping");
                }
                else
                {
                    context.Mixin(mixin, "NormalFromMesh");
                }
                if (context.GetParam(MaterialKeys.HasSkinningPosition))
                {
                    mixin.AddMacro("SkinningMaxBones", context.GetParam(MaterialKeys.SkinningMaxBones));
                    context.Mixin(mixin, "TransformationSkinning");
                    if (context.GetParam(MaterialKeys.HasSkinningNormal))
                    {
                        context.Mixin(mixin, "NormalMeshSkinning");
                    }
                    if (context.GetParam(MaterialKeys.HasSkinningTangent))
                    {
                        context.Mixin(mixin, "TangentMeshSkinning");
                    }
                    if (context.GetParam(MaterialKeys.HasSkinningNormal))
                    {
                        if (context.GetParam(MaterialKeys.HasNormalMap))
                        {
                            context.Mixin(mixin, "NormalVSSkinningNormalMapping");
                        }
                        else
                        {
                            context.Mixin(mixin, "NormalVSSkinningFromMesh");
                        }
                    }
                }
                var extensionTessellationShader = context.GetParam(MaterialKeys.TessellationShader);
                if (extensionTessellationShader != null)
                {
                    context.Mixin(mixin, (extensionTessellationShader));
                    var extensionDomainStageSurfaceShaders = context.GetParam(MaterialKeys.DomainStageSurfaceShaders);
                    if (extensionDomainStageSurfaceShaders != null)
                    {
                        context.Mixin(mixin, "MaterialSurfaceDomainStageCompositor");

                        {
                            var __mixinToCompose__ = (extensionDomainStageSurfaceShaders);
                            var __subMixin = new ShaderMixinSource();
                            context.PushComposition(mixin, "materialDomainStage", __subMixin);
                            context.Mixin(__subMixin, __mixinToCompose__);
                            context.PopComposition();
                        }

                        {
                            var __mixinToCompose__ = context.GetParam(MaterialKeys.DomainStageStreamInitializer);
                            var __subMixin = new ShaderMixinSource();
                            context.PushComposition(mixin, "streamInitializerDomainStage", __subMixin);
                            context.Mixin(__subMixin, __mixinToCompose__);
                            context.PopComposition();
                        }
                    }
                }
                var extensionPostVertexStage = context.GetParam(XenkoEffectBaseKeys.ExtensionPostVertexStageShader);
                if (extensionPostVertexStage != null)
                {
                    context.Mixin(mixin, (extensionPostVertexStage));
                }
            }
            public void Generate(ShaderMixinSource mixin, ShaderMixinContext context)
            {
                context.Mixin(mixin, "ParadoxEffectBase");
                var extensionPixelStageSurfaceShaders = context.GetParam(MaterialKeys.PixelStageSurfaceShaders);
                if (extensionPixelStageSurfaceShaders != null)
                {
                    context.Mixin(mixin, "MaterialSurfacePixelStageCompositor");

                    {
                        var __mixinToCompose__ = (extensionPixelStageSurfaceShaders);
                        var __subMixin = new ShaderMixinSource();
                        context.PushComposition(mixin, "materialPixelStage", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }

                    {
                        var __mixinToCompose__ = context.GetParam(MaterialKeys.PixelStageStreamInitializer);
                        var __subMixin = new ShaderMixinSource();
                        context.PushComposition(mixin, "streamInitializerPixelStage", __subMixin);
                        context.Mixin(__subMixin, __mixinToCompose__);
                        context.PopComposition();
                    }
                    var extensionPixelStageSurfaceFilter = context.GetParam(MaterialKeys.PixelStageSurfaceFilter);
                    if (extensionPixelStageSurfaceFilter != null)
                    {
                        context.Mixin(mixin, (extensionPixelStageSurfaceFilter));
                    }
                }
                var directLightGroups = context.GetParam(LightingKeys.DirectLightGroups);
                if (directLightGroups != null)
                {
                    foreach(var directLightGroup in directLightGroups)

                    {

                        {
                            var __mixinToCompose__ = (directLightGroup);
                            var __subMixin = new ShaderMixinSource();
                            context.PushCompositionArray(mixin, "directLightGroups", __subMixin);
                            context.Mixin(__subMixin, __mixinToCompose__);
                            context.PopComposition();
                        }
                    }
                }
                var environmentLights = context.GetParam(LightingKeys.EnvironmentLights);
                if (environmentLights != null)
                {
                    foreach(var environmentLight in environmentLights)

                    {

                        {
                            var __mixinToCompose__ = (environmentLight);
                            var __subMixin = new ShaderMixinSource();
                            context.PushCompositionArray(mixin, "environmentLights", __subMixin);
                            context.Mixin(__subMixin, __mixinToCompose__);
                            context.PopComposition();
                        }
                    }
                }
            }