class EnvironmentMapEffect : Effect, System.IDisposable, IEffectMatrices, IEffectLights, IEffectFog

Built-in effect that supports environment mapping.

Matrix World

Gets or sets the world matrix.

Matrix View

Gets or sets the view matrix.

Matrix Projection

Gets or sets the projection matrix.

Vector3 DiffuseColor

Gets or sets the material diffuse color (range 0 to 1).

Vector3 EmissiveColor

Gets or sets the material emissive color (range 0 to 1).

float Alpha

Gets or sets the material alpha.

Vector3 AmbientLightColor

Gets or sets the ambient light color (range 0 to 1).

readonly DirectionalLight DirectionalLight0

Gets the first directional light.

readonly DirectionalLight DirectionalLight1

Gets the second directional light.

readonly DirectionalLight DirectionalLight2

Gets the third directional light.

bool FogEnabled

Gets or sets the fog enable flag.

float FogStart

Gets or sets the fog start distance.

float FogEnd

Gets or sets the fog end distance.

Vector3 FogColor

Gets or sets the fog color.

Texture2D Texture

Gets or sets the current texture.

TextureCube EnvironmentMap

Gets or sets the current environment map texture.

float 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).

Vector3 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.

float 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.

public Effect Clone()

Creates a clone of the current EnvironmentMapEffect instance.

public void EnableDefaultLighting()

Sets up the standard key/fill/back lighting rig.

void OnApply()

Lazily computes derived parameter values immediately before applying the effect.