EnvironmentMapEffect Class (Microsoft.Xna.Framework.Graphics)

Built-in effect that supports environment mapping.
System.Object
   Microsoft.Xna.Framework.Graphics.GraphicsResource
      Microsoft.Xna.Framework.Graphics.Effect
         Microsoft.Xna.Framework.Graphics.EnvironmentMapEffect

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.1082)
  • C#
  • VB
  • F#
public class EnvironmentMapEffect : Effect, IEffectMatrices, IEffectLights, IEffectFog

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

The EnvironmentMapEffect type exposes the following members.

  Platforms Name Description
EnvironmentMapEffect(GraphicsDevice) Creates a new EnvironmentMapEffect with default parameter settings. 
EnvironmentMapEffect(EnvironmentMapEffect) Creates a new EnvironmentMapEffect by cloning parameter settings from an existing instance. 
Top
  Platforms Name Description
Alpha Gets or sets the material alpha. 
AmbientLightColor The floating point ambient light color. (Implements IEffectLights.AmbientLightColor().)
CurrentTechnique  (Inherited from Effect.)
DiffuseColor Gets or sets the material diffuse color (range 0 to 1). 
DirectionalLight0 Returns the first directional light. (Implements IEffectLights.DirectionalLight0().)
DirectionalLight1 Returns the second directional light. (Implements IEffectLights.DirectionalLight1().)
DirectionalLight2 Returns the third directional light. (Implements IEffectLights.DirectionalLight2().)
EmissiveColor Gets or sets the material emissive color (range 0 to 1). 
EnvironmentMap Gets or sets the current environment map texture. 
EnvironmentMapAmount Gets or sets the amount of the environment map RGB that will be blended over the base texture. Range 0 to 1, default 1. If set to zero, the RGB channels of the environment map will completely ignored (but the environment map alpha may still be visible if EnvironmentMapSpecular is greater than zero). 
EnvironmentMapSpecular Gets or sets the amount of the environment map alpha channel that will be added to the base texture. Range 0 to 1, default 0. This can be used to implement cheap specular lighting, by encoding one or more specular highlight patterns into the environment map alpha channel, then setting EnvironmentMapSpecular to the desired specular light color. 
FogColor The floating point fog color. (Implements IEffectFog.FogColor().)
FogEnabled Used to toggle the rendering of fog. (Implements IEffectFog.FogEnabled().)
FogEnd The world space distance from the camera at which fogging is fully applied. (Implements IEffectFog.FogEnd().)
FogStart The world space distance from the camera at which fogging begins. (Implements IEffectFog.FogStart().)
FresnelFactor Gets or sets the Fresnel factor used for the environment map blending. Higher values make the environment map only visible around the silhouette edges of the object, while lower values make it visible everywhere. Setting this property to 0 disables Fresnel entirely, making the environment map equally visible regardless of view angle. The default is 1. Fresnel only affects the environment map RGB (the intensity of which is controlled by EnvironmentMapAmount). The alpha contribution (controlled by EnvironmentMapSpecular) is not affected by the Fresnel setting. 
GraphicsDevice  (Inherited from GraphicsResource.)
IsDisposed  (Inherited from GraphicsResource.)
Name  (Inherited from GraphicsResource.)
Parameters  (Inherited from Effect.)
Projection Gets or sets the projection matrix. (Implements IEffectMatrices.Projection().)
Tag  (Inherited from GraphicsResource.)
Techniques  (Inherited from Effect.)
Texture Gets or sets the current texture. 
View Gets or sets the view matrix. (Implements IEffectMatrices.View().)
World Gets or sets the world matrix. (Implements IEffectMatrices.World().)
Top
  Platforms Name Description
Clone Creates a clone of the current EnvironmentMapEffect instance. (Overrides Effect.Clone().)
Dispose()  (Inherited from GraphicsResource.)
Dispose(bool) The method that derived classes should override to implement disposing of managed and native resources. (Inherited from Effect.)
EnableDefaultLighting Sets up the standard key/fill/back lighting rig. (Implements IEffectLights.EnableDefaultLighting().)
Finalize  (Inherited from GraphicsResource.)
GraphicsDeviceResetting Called before the device is reset. Allows graphics resources to invalidate their state so they can be recreated after the device reset. Warning: This may be called after a call to Dispose() up until the resource is garbage collected. (Inherited from Effect.)
OnApply Lazily computes derived parameter values immediately before applying the effect. (Overrides Effect.OnApply().)
ToString  (Inherited from GraphicsResource.)
Top
  Platforms Name Description
Disposing  (Inherited from GraphicsResource.)
Top
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop