Пример #1
0
 public FastBlurEffect()
     : base("FastBlurEffect")
 {
     this.texelSize = new SemanticMappedVector2(this.effect.Parameters, "TexelSize");
     this.texture   = new SemanticMappedTexture(this.effect.Parameters, "BaseTexture");
     this.blurWidth = new SemanticMappedSingle(this.effect.Parameters, "BlurWidth");
     this.direction = new SemanticMappedVector2(this.effect.Parameters, "Direction");
     this.effect.Parameters["Weights"].SetValue(new float[5]
     {
         0.08812122f,
         0.1675553f,
         0.1369112f,
         0.09517907f,
         0.05629372f
     });
     this.effect.Parameters["Offsets"].SetValue(new float[5]
     {
         0.0f,
         -0.01529978f,
         -0.03565004f,
         -0.05588228f,
         -0.07593089f
     });
     this.BlurWidth = 1f;
 }
Пример #2
0
 public FarawayEffect()
     : base("FarawayEffect")
 {
     this.texture       = new SemanticMappedTexture(this.effect.Parameters, "BaseTexture");
     this.actualOpacity = new SemanticMappedSingle(this.effect.Parameters, "ActualOpacity");
     this.ActualOpacity = 1f;
 }
Пример #3
0
 public ShimmeringPointsEffect()
   : base("ShimmeringPointsEffect")
 {
   this.randomSeed = new SemanticMappedVector3(this.effect.Parameters, "RandomSeed");
   this.saturation = new SemanticMappedSingle(this.effect.Parameters, "Saturation");
   this.saturation.Set(1f);
 }
Пример #4
0
 public VibratingEffect()
     : base("VibratingEffect")
 {
     this.intensity  = new SemanticMappedSingle(this.effect.Parameters, "Intensity");
     this.timeStep   = new SemanticMappedSingle(this.effect.Parameters, "TimeStep");
     this.fogDensity = new SemanticMappedSingle(this.effect.Parameters, "FogDensity");
 }
Пример #5
0
 public FarawayEffect()
   : base("FarawayEffect")
 {
   this.texture = new SemanticMappedTexture(this.effect.Parameters, "BaseTexture");
   this.actualOpacity = new SemanticMappedSingle(this.effect.Parameters, "ActualOpacity");
   this.ActualOpacity = 1f;
 }
Пример #6
0
 private void Initialize()
 {
     this.fog            = new FogEffectStructure(this.effect.Parameters);
     this.centerPosition = new SemanticMappedVector3(this.effect.Parameters, "CenterPosition");
     this.aspectRatio    = new SemanticMappedSingle(this.effect.Parameters, "AspectRatio");
     this.texelOffset    = new SemanticMappedVector2(this.effect.Parameters, "TexelOffset");
     this.time           = new SemanticMappedSingle(this.effect.Parameters, "Time");
     this.baseAmbient    = new SemanticMappedVector3(this.effect.Parameters, "BaseAmbient");
     this.eye            = new SemanticMappedVector3(this.effect.Parameters, "Eye");
     this.diffuseLight   = new SemanticMappedVector3(this.effect.Parameters, "DiffuseLight");
     this.eyeSign        = new SemanticMappedVector3(this.effect.Parameters, "EyeSign");
     this.levelCenter    = new SemanticMappedVector3(this.effect.Parameters, "LevelCenter");
     this.stopWatch      = Stopwatch.StartNew();
     this.EngineState.PauseStateChanged    += new Action(this.CheckPause);
     this.CameraProvider.ViewChanged       += new Action(this.RefreshViewProjection);
     this.CameraProvider.ProjectionChanged += new Action(this.RefreshViewProjection);
     this.RefreshViewProjection();
     this.CameraProvider.ViewChanged += new Action(this.RefreshCenterPosition);
     this.RefreshCenterPosition();
     this.CameraProvider.ProjectionChanged += new Action(this.RefreshAspectRatio);
     this.RefreshAspectRatio();
     this.FogProvider.FogSettingsChanged += new Action(this.RefreshFog);
     this.RefreshFog();
     this.LevelManager.LightingChanged += new Action(this.RefreshLighting);
     this.RefreshLighting();
     this.GraphicsDeviceService.DeviceReset += new EventHandler <EventArgs>(this.RefreshTexelSize);
     this.RefreshTexelSize();
     this.eyeSign.Set(BaseEffect.sharedEyeSign);
     this.levelCenter.Set(BaseEffect.sharedLevelCenter);
 }
Пример #7
0
 public ShimmeringPointsEffect()
     : base("ShimmeringPointsEffect")
 {
     this.randomSeed = new SemanticMappedVector3(this.effect.Parameters, "RandomSeed");
     this.saturation = new SemanticMappedSingle(this.effect.Parameters, "Saturation");
     this.saturation.Set(1f);
 }
Пример #8
0
 public VibratingEffect()
   : base("VibratingEffect")
 {
   this.intensity = new SemanticMappedSingle(this.effect.Parameters, "Intensity");
   this.timeStep = new SemanticMappedSingle(this.effect.Parameters, "TimeStep");
   this.fogDensity = new SemanticMappedSingle(this.effect.Parameters, "FogDensity");
 }
Пример #9
0
 public FastBlurEffect()
   : base("FastBlurEffect")
 {
   this.texelSize = new SemanticMappedVector2(this.effect.Parameters, "TexelSize");
   this.texture = new SemanticMappedTexture(this.effect.Parameters, "BaseTexture");
   this.blurWidth = new SemanticMappedSingle(this.effect.Parameters, "BlurWidth");
   this.direction = new SemanticMappedVector2(this.effect.Parameters, "Direction");
   this.effect.Parameters["Weights"].SetValue(new float[5]
   {
     0.08812122f,
     0.1675553f,
     0.1369112f,
     0.09517907f,
     0.05629372f
   });
   this.effect.Parameters["Offsets"].SetValue(new float[5]
   {
     0.0f,
     -0.01529978f,
     -0.03565004f,
     -0.05588228f,
     -0.07593089f
   });
   this.BlurWidth = 1f;
 }
Пример #10
0
 private DefaultEffect(string effectName)
     : base(effectName)
 {
     this.alphaIsEmissive = new SemanticMappedBoolean(this.effect.Parameters, "AlphaIsEmissive");
     this.fullbright      = new SemanticMappedBoolean(this.effect.Parameters, "Fullbright");
     this.emissive        = new SemanticMappedSingle(this.effect.Parameters, "Emissive");
     this.Pass            = LightingEffectPass.Main;
 }
Пример #11
0
 private DefaultEffect(string effectName)
   : base(effectName)
 {
   this.alphaIsEmissive = new SemanticMappedBoolean(this.effect.Parameters, "AlphaIsEmissive");
   this.fullbright = new SemanticMappedBoolean(this.effect.Parameters, "Fullbright");
   this.emissive = new SemanticMappedSingle(this.effect.Parameters, "Emissive");
   this.Pass = LightingEffectPass.Main;
 }
Пример #12
0
 public FoamEffect()
   : base("FoamEffect")
 {
   this.timeAccumulator = new SemanticMappedSingle(this.effect.Parameters, "TimeAccumulator");
   this.shoreTotalWidth = new SemanticMappedSingle(this.effect.Parameters, "ShoreTotalWidth");
   this.screenCenterSide = new SemanticMappedSingle(this.effect.Parameters, "ScreenCenterSide");
   this.isEmerged = new SemanticMappedBoolean(this.effect.Parameters, "IsEmerged");
   this.isWobbling = new SemanticMappedBoolean(this.effect.Parameters, "IsWobbling");
 }
Пример #13
0
 public FoamEffect()
     : base("FoamEffect")
 {
     this.timeAccumulator  = new SemanticMappedSingle(this.effect.Parameters, "TimeAccumulator");
     this.shoreTotalWidth  = new SemanticMappedSingle(this.effect.Parameters, "ShoreTotalWidth");
     this.screenCenterSide = new SemanticMappedSingle(this.effect.Parameters, "ScreenCenterSide");
     this.isEmerged        = new SemanticMappedBoolean(this.effect.Parameters, "IsEmerged");
     this.isWobbling       = new SemanticMappedBoolean(this.effect.Parameters, "IsWobbling");
 }
Пример #14
0
 public InstancedDotEffect()
     : base("InstancedDotEffect")
 {
     this.theta              = new SemanticMappedSingle(this.effect.Parameters, "Theta");
     this.eightShapeStep     = new SemanticMappedSingle(this.effect.Parameters, "EightShapeStep");
     this.distanceFactor     = new SemanticMappedSingle(this.effect.Parameters, "DistanceFactor");
     this.immobilityFactor   = new SemanticMappedSingle(this.effect.Parameters, "ImmobilityFactor");
     this.instanceData       = new SemanticMappedVectorArray(this.effect.Parameters, "InstanceData");
     this.SimpleGroupPrepare = true;
 }
Пример #15
0
 public CombineEffect()
     : base("CombineEffect")
 {
     this.rightTexture = new SemanticMappedTexture(this.effect.Parameters, "RightTexture");
     this.leftTexture  = new SemanticMappedTexture(this.effect.Parameters, "LeftTexture");
     this.redGamma     = new SemanticMappedSingle(this.effect.Parameters, "RedGamma");
     this.rightFilter  = new SemanticMappedMatrix(this.effect.Parameters, "RightFilter");
     this.leftFilter   = new SemanticMappedMatrix(this.effect.Parameters, "LeftFilter");
     this.LeftFilter   = new Matrix(0.2125f, 0.7154f, 0.0721f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
     this.RightFilter  = new Matrix(0.0f, 0.0f, 0.0f, 0.0f, 0.2125f, 0.7154f, 0.0721f, 0.0f, 0.2125f, 0.7154f, 0.0721f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
 }
Пример #16
0
 public CombineEffect()
   : base("CombineEffect")
 {
   this.rightTexture = new SemanticMappedTexture(this.effect.Parameters, "RightTexture");
   this.leftTexture = new SemanticMappedTexture(this.effect.Parameters, "LeftTexture");
   this.redGamma = new SemanticMappedSingle(this.effect.Parameters, "RedGamma");
   this.rightFilter = new SemanticMappedMatrix(this.effect.Parameters, "RightFilter");
   this.leftFilter = new SemanticMappedMatrix(this.effect.Parameters, "LeftFilter");
   this.LeftFilter = new Matrix(0.2125f, 0.7154f, 0.0721f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
   this.RightFilter = new Matrix(0.0f, 0.0f, 0.0f, 0.0f, 0.2125f, 0.7154f, 0.0721f, 0.0f, 0.2125f, 0.7154f, 0.0721f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
 }
Пример #17
0
 public LightingPostEffect()
     : base("LightingPostEffect")
 {
     this.dawnContribution  = new SemanticMappedSingle(this.effect.Parameters, "DawnContribution");
     this.duskContribution  = new SemanticMappedSingle(this.effect.Parameters, "DuskContribution");
     this.nightContribution = new SemanticMappedSingle(this.effect.Parameters, "NightContribution");
     this.passes            = new Dictionary <LightingPostEffect.Passes, EffectPass>((IEqualityComparer <LightingPostEffect.Passes>)LightingPostEffect.PassesComparer.Default);
     foreach (LightingPostEffect.Passes key in Util.GetValues <LightingPostEffect.Passes>())
     {
         this.passes.Add(key, this.currentTechnique.Passes[((object)key).ToString()]);
     }
 }
Пример #18
0
 public ProjectedNodeEffect()
   : base("ProjectedNodeEffect")
 {
   this.texture = new SemanticMappedTexture(this.effect.Parameters, "BaseTexture");
   this.textureSize = new SemanticMappedVector2(this.effect.Parameters, "TextureSize");
   this.viewportSize = new SemanticMappedVector2(this.effect.Parameters, "ViewportSize");
   this.cubeOffset = new SemanticMappedVector3(this.effect.Parameters, "CubeOffset");
   this.pixPerTrix = new SemanticMappedSingle(this.effect.Parameters, "PixelsPerTrixel");
   this.noTexture = new SemanticMappedBoolean(this.effect.Parameters, "NoTexture");
   this.complete = new SemanticMappedBoolean(this.effect.Parameters, "Complete");
   this.Pass = LightingEffectPass.Main;
 }
Пример #19
0
 public ProjectedNodeEffect()
     : base("ProjectedNodeEffect")
 {
     this.texture      = new SemanticMappedTexture(this.effect.Parameters, "BaseTexture");
     this.textureSize  = new SemanticMappedVector2(this.effect.Parameters, "TextureSize");
     this.viewportSize = new SemanticMappedVector2(this.effect.Parameters, "ViewportSize");
     this.cubeOffset   = new SemanticMappedVector3(this.effect.Parameters, "CubeOffset");
     this.pixPerTrix   = new SemanticMappedSingle(this.effect.Parameters, "PixelsPerTrixel");
     this.noTexture    = new SemanticMappedBoolean(this.effect.Parameters, "NoTexture");
     this.complete     = new SemanticMappedBoolean(this.effect.Parameters, "Complete");
     this.Pass         = LightingEffectPass.Main;
 }
Пример #20
0
 public GomezEffect()
     : base("GomezEffect")
 {
     this.animatedTexture = new SemanticMappedTexture(this.effect.Parameters, "AnimatedTexture");
     this.silhouette      = new SemanticMappedBoolean(this.effect.Parameters, "Silhouette");
     this.background      = new SemanticMappedSingle(this.effect.Parameters, "Background");
     this.colorSwap       = new SemanticMappedBoolean(this.effect.Parameters, "ColorSwap");
     this.redSwap         = new SemanticMappedVector3(this.effect.Parameters, "RedSwap");
     this.blackSwap       = new SemanticMappedVector3(this.effect.Parameters, "BlackSwap");
     this.whiteSwap       = new SemanticMappedVector3(this.effect.Parameters, "WhiteSwap");
     this.yellowSwap      = new SemanticMappedVector3(this.effect.Parameters, "YellowSwap");
     this.graySwap        = new SemanticMappedVector3(this.effect.Parameters, "GraySwap");
     this.noMoreFez       = new SemanticMappedBoolean(this.effect.Parameters, "NoMoreFez");
     this.Pass            = LightingEffectPass.Main;
 }
Пример #21
0
 public DotEffect()
   : base("DotEffect")
 {
   this.HueOffset = new SemanticMappedSingle(this.effect.Parameters, "HueOffset");
   this.ShiftSpeed = 1f;
 }
Пример #22
0
 public SplitCollectorEffect()
   : base("SplitCollectorEffect")
 {
   this.varyingOpacity = new SemanticMappedSingle(this.effect.Parameters, "VaryingOpacity");
   this.offset = new SemanticMappedSingle(this.effect.Parameters, "Offset");
 }
Пример #23
0
 public MatrixEffect()
   : base("MatrixEffect")
 {
   this.texture = new SemanticMappedTexture(this.effect.Parameters, "BaseTexture");
   this.maxHeight = new SemanticMappedSingle(this.effect.Parameters, "MaxHeight");
 }
Пример #24
0
 public SplitCollectorEffect()
     : base("SplitCollectorEffect")
 {
     this.varyingOpacity = new SemanticMappedSingle(this.effect.Parameters, "VaryingOpacity");
     this.offset         = new SemanticMappedSingle(this.effect.Parameters, "Offset");
 }
Пример #25
0
 private void Initialize()
 {
   this.fog = new FogEffectStructure(this.effect.Parameters);
   this.centerPosition = new SemanticMappedVector3(this.effect.Parameters, "CenterPosition");
   this.aspectRatio = new SemanticMappedSingle(this.effect.Parameters, "AspectRatio");
   this.texelOffset = new SemanticMappedVector2(this.effect.Parameters, "TexelOffset");
   this.time = new SemanticMappedSingle(this.effect.Parameters, "Time");
   this.baseAmbient = new SemanticMappedVector3(this.effect.Parameters, "BaseAmbient");
   this.eye = new SemanticMappedVector3(this.effect.Parameters, "Eye");
   this.diffuseLight = new SemanticMappedVector3(this.effect.Parameters, "DiffuseLight");
   this.eyeSign = new SemanticMappedVector3(this.effect.Parameters, "EyeSign");
   this.levelCenter = new SemanticMappedVector3(this.effect.Parameters, "LevelCenter");
   this.stopWatch = Stopwatch.StartNew();
   this.EngineState.PauseStateChanged += new Action(this.CheckPause);
   this.CameraProvider.ViewChanged += new Action(this.RefreshViewProjection);
   this.CameraProvider.ProjectionChanged += new Action(this.RefreshViewProjection);
   this.RefreshViewProjection();
   this.CameraProvider.ViewChanged += new Action(this.RefreshCenterPosition);
   this.RefreshCenterPosition();
   this.CameraProvider.ProjectionChanged += new Action(this.RefreshAspectRatio);
   this.RefreshAspectRatio();
   this.FogProvider.FogSettingsChanged += new Action(this.RefreshFog);
   this.RefreshFog();
   this.LevelManager.LightingChanged += new Action(this.RefreshLighting);
   this.RefreshLighting();
   this.GraphicsDeviceService.DeviceReset += new EventHandler<EventArgs>(this.RefreshTexelSize);
   this.RefreshTexelSize();
   this.eyeSign.Set(BaseEffect.sharedEyeSign);
   this.levelCenter.Set(BaseEffect.sharedLevelCenter);
 }
Пример #26
0
 public MaterialEffectStructure(EffectParameterCollection parameters)
 {
   this.diffuse = new SemanticMappedVector3(parameters, "Material_Diffuse");
   this.opacity = new SemanticMappedSingle(parameters, "Material_Opacity");
 }
Пример #27
0
 public DotEffect()
     : base("DotEffect")
 {
     this.HueOffset  = new SemanticMappedSingle(this.effect.Parameters, "HueOffset");
     this.ShiftSpeed = 1f;
 }
Пример #28
0
 public VignetteEffect()
     : base("VignetteEffect")
 {
     this.sinceStarted = new SemanticMappedSingle(this.effect.Parameters, "SinceStarted");
 }
Пример #29
0
 public HorizontalTrailsEffect()
     : base("HorizontalTrailsEffect")
 {
     this.timing = new SemanticMappedSingle(this.effect.Parameters, "Timing");
     this.right  = new SemanticMappedVector3(this.effect.Parameters, "Right");
 }
Пример #30
0
 public FogEffectStructure(EffectParameterCollection parameters)
 {
   this.fogType = new SemanticMappedInt32(parameters, "Fog_Type");
   this.fogColor = new SemanticMappedVector3(parameters, "Fog_Color");
   this.fogDensity = new SemanticMappedSingle(parameters, "Fog_Density");
 }
Пример #31
0
 public MatrixEffect()
     : base("MatrixEffect")
 {
     this.texture   = new SemanticMappedTexture(this.effect.Parameters, "BaseTexture");
     this.maxHeight = new SemanticMappedSingle(this.effect.Parameters, "MaxHeight");
 }
Пример #32
0
 public FakePointSpritesEffect()
     : base("FakePointSpritesEffect")
 {
     this.texture   = new SemanticMappedTexture(this.effect.Parameters, "BaseTexture");
     this.viewScale = new SemanticMappedSingle(this.effect.Parameters, "ViewScale");
 }
Пример #33
0
 public HorizontalTrailsEffect()
   : base("HorizontalTrailsEffect")
 {
   this.timing = new SemanticMappedSingle(this.effect.Parameters, "Timing");
   this.right = new SemanticMappedVector3(this.effect.Parameters, "Right");
 }
Пример #34
0
 public FakePointSpritesEffect()
   : base("FakePointSpritesEffect")
 {
   this.texture = new SemanticMappedTexture(this.effect.Parameters, "BaseTexture");
   this.viewScale = new SemanticMappedSingle(this.effect.Parameters, "ViewScale");
 }
Пример #35
0
 public VignetteEffect()
   : base("VignetteEffect")
 {
   this.sinceStarted = new SemanticMappedSingle(this.effect.Parameters, "SinceStarted");
 }
Пример #36
0
 public GomezEffect()
   : base("GomezEffect")
 {
   this.animatedTexture = new SemanticMappedTexture(this.effect.Parameters, "AnimatedTexture");
   this.silhouette = new SemanticMappedBoolean(this.effect.Parameters, "Silhouette");
   this.background = new SemanticMappedSingle(this.effect.Parameters, "Background");
   this.colorSwap = new SemanticMappedBoolean(this.effect.Parameters, "ColorSwap");
   this.redSwap = new SemanticMappedVector3(this.effect.Parameters, "RedSwap");
   this.blackSwap = new SemanticMappedVector3(this.effect.Parameters, "BlackSwap");
   this.whiteSwap = new SemanticMappedVector3(this.effect.Parameters, "WhiteSwap");
   this.yellowSwap = new SemanticMappedVector3(this.effect.Parameters, "YellowSwap");
   this.graySwap = new SemanticMappedVector3(this.effect.Parameters, "GraySwap");
   this.noMoreFez = new SemanticMappedBoolean(this.effect.Parameters, "NoMoreFez");
   this.Pass = LightingEffectPass.Main;
 }