directional light with a shortended name to avoid clashes with the XNA DirectionalLight. This light type has only a direction and is never culled. It is a global light and the only light that produces specular highlights.
Inheritance: DeferredLight
Exemplo n.º 1
0
        /// <summary>
        /// updates the shader values for the light and sets the appropriate CurrentTechnique
        /// </summary>
        /// <param name="light">Light.</param>
        public void UpdateForLight(DirLight light)
        {
            SetColor(light.Color);
            SetAreaDirectionalLightDirection(light.Direction);
            SetSpecularPower(light.SpecularPower);
            SetSpecularIntensity(light.SpecularIntensity);

            directionalLightPass.Apply();
        }
        /// <summary>
        /// updates the shader values for the light and sets the appropriate CurrentTechnique
        /// </summary>
        /// <param name="light">Light.</param>
        public void updateForLight(DirLight light)
        {
            setColor(light.color);
            setAreaDirectionalLightDirection(light.direction);
            setSpecularPower(light.specularPower);
            setSpecularIntensity(light.specularIntensity);

            directionalLightPass.Apply();
        }
Exemplo n.º 3
0
        /// <summary>
        /// updates the shader values for the light and sets the appropriate CurrentTechnique
        /// </summary>
        /// <param name="light">Light.</param>
        public void UpdateForLight(DirLight light)
        {
            SetColor(light.Color);
            SetAreaDirectionalLightDirection(light.Direction);
            SetSpecularPower(light.SpecularPower);
            SetSpecularIntensity(light.SpecularIntensity);

            CurrentTechnique = Techniques["DeferredDirectionalLight"];
            directionalLightPass.Apply();
        }
Exemplo n.º 4
0
 void renderLight(DirLight light)
 {
     _lightEffect.updateForLight(light);
     _quadMesh.render();
 }
Exemplo n.º 5
0
		void renderLight( DirLight light )
		{
			_lightEffect.updateForLight( light );
			_quadMesh.render();
		}
Exemplo n.º 6
0
        /// <summary>
        /// updates the shader values for the light and sets the appropriate CurrentTechnique
        /// </summary>
        /// <param name="light">Light.</param>
        public void updateForLight( DirLight light )
        {
            setColor( light.color );
            setAreaDirectionalLightDirection( light.direction );
            setSpecularPower( light.specularPower );
            setSpecularIntensity( light.specularIntensity );

            directionalLightPass.Apply();
        }