예제 #1
0
 internal void Copy(BasicDirectionalLight from)
 {
     this.enabled             = from.enabled;
     this.cachedDiffuseColor  = from.cachedDiffuseColor;
     this.cachedSpecularColor = from.cachedSpecularColor;
     this.diffuseColorParam.SetValue(this.cachedDiffuseColor);
     this.specularColorParam.SetValue(this.cachedSpecularColor);
 }
예제 #2
0
 internal void Copy(BasicDirectionalLight from)
 {
     this.enabled = from.enabled;
     this.cachedDiffuseColor = from.cachedDiffuseColor;
     this.cachedSpecularColor = from.cachedSpecularColor;
     this.diffuseColorParam.SetValue(this.cachedDiffuseColor);
     this.specularColorParam.SetValue(this.cachedSpecularColor);
 }
예제 #3
0
 private void SetParamsFromBasicLight(Microsoft.Xna.Framework.Graphics.BasicDirectionalLight
                                      source,
                                      BasicPaletteEffect.BasicDirectionalLight target)
 {
     target.SpecularColor = source.SpecularColor;
     target.Enabled       = source.Enabled;
     target.Direction     = source.Direction;
     target.DiffuseColor  = source.DiffuseColor;
 }
예제 #4
0
        private void InitializeParameters()
        {
            paletteParam = Parameters["MatrixPalette"];
            texParam = Parameters["BasicTexture"];
            texEnabledParam = Parameters["TextureEnabled"];
            worldParam = Parameters["World"];
            viewParam = Parameters["View"];
            projectionParam = Parameters["Projection"];
            ambientParam = Parameters["AmbientLightColor"];
            eyeParam = Parameters["EyePosition"];
            emissiveParam = Parameters["EmissiveColor"];
            lightEnabledParam = Parameters["LightingEnable"];
            diffuseParam = Parameters["DiffuseColor"];
            specColorParam = Parameters["SpecularColor"];
            specPowerParam = Parameters["SpecularPower"];
            alphaParam = Parameters["Alpha"];
            fogColorParam = Parameters["FogColor"];
            fogEnabledParam = Parameters["FogEnable"];
            fogStartParam = Parameters["FogStart"];
            fogEndParam = Parameters["FogEnd"];
            light0 = new BasicDirectionalLight(this, 0);
            light1 = new BasicDirectionalLight(this, 1);
            light2 = new BasicDirectionalLight(this, 2);

            FogColor = Vector3.Zero;
            FogStart = 0;
            FogEnd = 1;
            FogEnabled = false;
        }