Example #1
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);
 }
Example #2
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;
 }
Example #3
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;
 }
 public InstancedAnimatedPlaneEffect()
     : base("InstancedAnimatedPlaneEffect")
 {
     this.animatedTexture = new SemanticMappedTexture(this.effect.Parameters, "AnimatedTexture");
     this.ignoreFog       = new SemanticMappedBoolean(this.effect.Parameters, "IgnoreFog");
     this.sewerHax        = new SemanticMappedBoolean(this.effect.Parameters, "SewerHax");
     this.ignoreShading   = new SemanticMappedBoolean(this.effect.Parameters, "IgnoreShading");
     this.instanceData    = new SemanticMappedMatrixArray(this.effect.Parameters, "InstanceData");
     this.frameScale      = new SemanticMappedVector2(this.effect.Parameters, "FrameScale");
     this.Pass            = LightingEffectPass.Main;
 }
Example #5
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;
 }
Example #6
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;
 }
Example #7
0
 public FishEyeEffect()
   : base("ScreenSpaceFisheye")
 {
   this.texture = new SemanticMappedTexture(this.effect.Parameters, "BaseTexture");
   this.intensity = new SemanticMappedVector2(this.effect.Parameters, "Intensity");
 }
Example #8
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);
 }
Example #9
0
 public FishEyeEffect()
     : base("ScreenSpaceFisheye")
 {
     this.texture   = new SemanticMappedTexture(this.effect.Parameters, "BaseTexture");
     this.intensity = new SemanticMappedVector2(this.effect.Parameters, "Intensity");
 }