Engines/FlatRedBallXNA/FlatRedBall/Graphics/GenericEffect.cs
/// <summary>
/// Sets the parameters for the environment map effect
/// </summary>
Sets the parameters for the environment map effect
Sets the parameters for the environment map effect
private void SetEnvironmentMapEffectParameters()
        {
#if !MONOGAME
            mEnvironmentMapEffect.World              = this.World;
            mEnvironmentMapEffect.View               = this.View;
            mEnvironmentMapEffect.Projection         = this.Projection;
            if (this.LightingEnabled)
            {
                mEnvironmentMapEffect.DirectionalLight0.DiffuseColor     = this.DirectionalLight0.DiffuseColor;
                mEnvironmentMapEffect.DirectionalLight0.Direction        = this.DirectionalLight0.Direction;
                mEnvironmentMapEffect.DirectionalLight0.Enabled          = this.DirectionalLight0.Enabled;
                mEnvironmentMapEffect.DirectionalLight0.SpecularColor    = this.DirectionalLight0.SpecularColor;
                mEnvironmentMapEffect.DirectionalLight1.DiffuseColor     = this.DirectionalLight1.DiffuseColor;
                mEnvironmentMapEffect.DirectionalLight1.Direction        = this.DirectionalLight1.Direction;
                mEnvironmentMapEffect.DirectionalLight1.Enabled          = this.DirectionalLight1.Enabled;
                mEnvironmentMapEffect.DirectionalLight1.SpecularColor    = this.DirectionalLight1.SpecularColor;
                mEnvironmentMapEffect.DirectionalLight2.DiffuseColor     = this.DirectionalLight2.DiffuseColor;
                mEnvironmentMapEffect.DirectionalLight2.Direction        = this.DirectionalLight2.Direction;
                mEnvironmentMapEffect.DirectionalLight2.Enabled          = this.DirectionalLight2.Enabled;
                mEnvironmentMapEffect.DirectionalLight2.SpecularColor    = this.DirectionalLight2.SpecularColor;
            }
            mEnvironmentMapEffect.DiffuseColor       = this.DiffuseColor;
            mEnvironmentMapEffect.AmbientLightColor  = this.AmbientLightColor;
            mEnvironmentMapEffect.FogColor           = this.FogColor;
            mEnvironmentMapEffect.FogEnabled         = this.FogEnabled;
            mEnvironmentMapEffect.FogStart           = this.FogStart;
            mEnvironmentMapEffect.FogEnd             = this.FogEnd;
            mEnvironmentMapEffect.Alpha              = this.Alpha;
            mEnvironmentMapEffect.Texture            = this.Texture;
            mEnvironmentMapEffect.EmissiveColor      = this.EmissiveColor;
            mEnvironmentMapEffect.EnvironmentMapAmount = this.EnvironmentMapAmount;
            mEnvironmentMapEffect.EnvironmentMap     = this.CubeMap;
            mEnvironmentMapEffect.EnvironmentMapSpecular = this.SpecularColor;
            mEnvironmentMapEffect.FresnelFactor      = this.FresnelFactor;
#endif
        }
private void SetEnvironmentMapEffectParameters ( ) { if ! MONOGAME mEnvironmentMapEffect . World = this . World ; mEnvironmentMapEffect . View = this . View ; mEnvironmentMapEffect . Projection = this . Projection ; if ( this . LightingEnabled ) { mEnvironmentMapEffect . DirectionalLight0 . DiffuseColor = this . DirectionalLight0 . DiffuseColor ; mEnvironmentMapEffect . DirectionalLight0 . Direction = this . DirectionalLight0 . Direction ; mEnvironmentMapEffect . DirectionalLight0 . Enabled = this . DirectionalLight0 . Enabled ; mEnvironmentMapEffect . DirectionalLight0 . SpecularColor = this . DirectionalLight0 . SpecularColor ; mEnvironmentMapEffect . DirectionalLight1 . DiffuseColor = this . DirectionalLight1 . DiffuseColor ; mEnvironmentMapEffect . DirectionalLight1 . Direction = this . DirectionalLight1 . Direction ; mEnvironmentMapEffect . DirectionalLight1 . Enabled = this . DirectionalLight1 . Enabled ; mEnvironmentMapEffect . DirectionalLight1 . SpecularColor = this . DirectionalLight1 . SpecularColor ; mEnvironmentMapEffect . DirectionalLight2 . DiffuseColor = this . DirectionalLight2 . DiffuseColor ; mEnvironmentMapEffect . DirectionalLight2 . Direction = this . DirectionalLight2 . Direction ; mEnvironmentMapEffect . DirectionalLight2 . Enabled = this . DirectionalLight2 . Enabled ; mEnvironmentMapEffect . DirectionalLight2 . SpecularColor = this . DirectionalLight2 . SpecularColor ; } mEnvironmentMapEffect . DiffuseColor = this . DiffuseColor ; mEnvironmentMapEffect . AmbientLightColor = this . AmbientLightColor ; mEnvironmentMapEffect . FogColor = this . FogColor ; mEnvironmentMapEffect . FogEnabled = this . FogEnabled ; mEnvironmentMapEffect . FogStart = this . FogStart ; mEnvironmentMapEffect . FogEnd = this . FogEnd ; mEnvironmentMapEffect . Alpha = this . Alpha ; mEnvironmentMapEffect . Texture = this . Texture ; mEnvironmentMapEffect . EmissiveColor = this . EmissiveColor ; mEnvironmentMapEffect . EnvironmentMapAmount = this . EnvironmentMapAmount ; mEnvironmentMapEffect . EnvironmentMap = this . CubeMap ; mEnvironmentMapEffect . EnvironmentMapSpecular = this . SpecularColor ; mEnvironmentMapEffect . FresnelFactor = this . FresnelFactor ; endif }
Sets the parameters for the environment map effect
Sets the parameters for the environment map effect