Nez.Portable/Graphics/DeferredLighting/Effects/DeferredLightEffect.cs
/// <summary>
/// updates the shader values for the light and sets the appropriate CurrentTechnique
/// </summary>
/// <param name="light">Light.</param>
updates the shader values for the light and sets the appropriate CurrentTechnique
updates the shader values for the light and sets the appropriate CurrentTechnique
public void updateForLight(AreaLight light)
        {
            setColor(light.color);
            setAreaDirectionalLightDirection(light.direction);
            setLightIntensity(light.intensity);
            var objToWorld =
                Matrix.CreateScale(
                    light.bounds.width * light.entity.transform.scale.X,
                    light.bounds.height * light.entity.transform.scale.Y,
                    1f) * Matrix.CreateTranslation(
                    light.bounds.x - light.bounds.width * 0.5f,
                    light.bounds.y - light.bounds.height * 0.5f,
                    0);
            setObjectToWorldMatrix(objToWorld);
            areaLightPass.Apply();
        }
public void updateForLight ( AreaLight light ) { setColor ( light . color ) ; setAreaDirectionalLightDirection ( light . direction ) ; setLightIntensity ( light . intensity ) ; var objToWorld = Matrix . CreateScale ( light . bounds . width * light . entity . transform . scale . X , light . bounds . height * light . entity . transform . scale . Y , 1f ) * Matrix . CreateTranslation ( light . bounds . x - light . bounds . width * 0.5f , light . bounds . y - light . bounds . height * 0.5f , 0 ) ; setObjectToWorldMatrix ( objToWorld ) ; areaLightPass . Apply ( ) ; }
updates the shader values for the light and sets the appropriate CurrentTechnique
updates the shader values for the light and sets the appropriate CurrentTechnique
light
AreaLight
None