//--------------------------------------------------------------- #endregion //--------------------------------------------------------------- //--------------------------------------------------------------- #region Methods //--------------------------------------------------------------- /// <summary> /// Method for updating a shader with the light direction in object space. /// </summary> /// <param name="sc">The shader to update.</param> public void UpdateObjectSpaceDirection(ShaderConstant sc) { Transformations trans = Device.Instance.Transformations; sc.Set(direction * Matrix4.Invert(trans.World)); }
/// <summary> /// Method for updating a shader with the light direction in object space. /// </summary> /// <param name="sc">The shader to update.</param> public void UpdateObjectSpaceDirection(ShaderConstant sc) { Transformations trans = Device.Instance.Transformations; sc.Set(direction * Matrix3.Transpose(trans.World.RotationMatrix)); }