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.
상속: DeferredLight
예제 #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();
        }
예제 #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();
        }
예제 #4
0
 void renderLight(DirLight light)
 {
     _lightEffect.updateForLight(light);
     _quadMesh.render();
 }
예제 #5
0
		void renderLight( DirLight light )
		{
			_lightEffect.updateForLight( light );
			_quadMesh.render();
		}
예제 #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();
        }