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(PointLight light)
        {
            setLightPosition(new Vector3(light.entity.transform.position + light.localOffset, light.zPosition));
            setColor(light.color);
            setLightRadius(light.radius * light.entity.transform.scale.X);
            setLightIntensity(light.intensity);
            var objToWorld = Matrix.CreateScale(light.radius * light.entity.transform.scale.X)
                             * Matrix.CreateTranslation(
                                 light.entity.transform.position.X + light.localOffset.X,
                                 light.entity.transform.position.Y + light.localOffset.Y,
                                 0);
            setObjectToWorldMatrix(objToWorld);
            pointLightPass.Apply();
        }
public void updateForLight ( PointLight light ) { setLightPosition ( new Vector3 ( light . entity . transform . position + light . localOffset , light . zPosition ) ) ; setColor ( light . color ) ; setLightRadius ( light . radius * light . entity . transform . scale . X ) ; setLightIntensity ( light . intensity ) ; var objToWorld = Matrix . CreateScale ( light . radius * light . entity . transform . scale . X ) * Matrix . CreateTranslation ( light . entity . transform . position . X + light . localOffset . X , light . entity . transform . position . Y + light . localOffset . Y , 0 ) ; setObjectToWorldMatrix ( objToWorld ) ; pointLightPass . 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
PointLight
None