4 using System.Collections.Generic;
6 using SiliconStudio.Paradox.Effects.Modules;
7 using SiliconStudio.Paradox.Graphics;
9 namespace SiliconStudio.
Paradox.Effects.Images
18 private readonly InternalEffectInstance effectInstance;
28 : base(context, effectName)
30 if (effectName == null)
throw new ArgumentNullException(
"effectName");
35 parameters.Set(TexturingKeys.Sampler, GraphicsDevice.SamplerStates.LinearClamp);
38 effectInstance =
new InternalEffectInstance(parameters);
45 public string EffectName
49 return effectCompiler.EffectName;
67 base.PreDrawCore(name);
83 var
count = InputCount;
84 for (
int i = 0; i <
count; i++)
86 var texture = GetInput(i);
90 Parameters.Set(TexturingKeys.Texture0, texture);
93 Parameters.Set(TexturingKeys.Texture1, texture);
96 Parameters.Set(TexturingKeys.Texture2, texture);
99 Parameters.Set(TexturingKeys.Texture3, texture);
102 Parameters.Set(TexturingKeys.Texture4, texture);
105 Parameters.Set(TexturingKeys.Texture5, texture);
108 Parameters.Set(TexturingKeys.Texture6, texture);
111 Parameters.Set(TexturingKeys.Texture7, texture);
114 Parameters.Set(TexturingKeys.Texture8, texture);
117 Parameters.Set(TexturingKeys.Texture9, texture);
121 throw new InvalidOperationException(
"Expecting less than 10 textures in input");
129 effectCompiler.Update(effectInstance);
132 GraphicsDevice.DrawQuad(effectInstance.Effect, Parameters);
144 this.parameters = parameters;
147 public override void FillParameterCollections(IList<ParameterCollection> parameterCollections)
149 parameterCollections.Add(parameters);
A dynamic effect instance updated by DynamicEffectCompiler.
virtual void UpdateParameters()
Updates the effect Parameters from properties defined in this instance. See remarks.
ImageEffectShader(ImageEffectContext context, string effectName)
Initializes a new instance of the ImageEffectShader class.
IServiceRegistry Services
Gets the services registry.
Provides a dynamic compiler for an effect based on parameters changed.
Context for post effects.
override void PreDrawCore(string name)
Prepare call before DrawCore.
override void DrawCore()
Draws this post effect for a specific pass, implementation dependent.
A container to handle a hierarchical collection of effect variables.
Post effect using an Effect (either pdxfx or pdxsl).