BasicEffect.PreferPerPixelLighting Property
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Gets or sets a value indicating that per-pixel lighting should be used if it is available for the current adapter. Per-pixel lighting is available if a graphics adapter supports Pixel Shader Model 2.0.
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics.Extensions (in Microsoft.Xna.Framework.Graphics.Extensions.dll)
Syntax
'Declaration
Public Property PreferPerPixelLighting As Boolean
public bool PreferPerPixelLighting { get; set; }
Property Value
Type: System.Boolean
true to use per-pixel lighting if it is available; false to disable per-pixel lighting. The default value is true. When PreferPerPixelLighting is true, if the graphics adapter does not support a minimum of Pixel Shader Model 2.0, BasicEffect will automatically fall-back to per-vertex lighting. When PreferPerPixelLighting is false, per-vertex lighting is used regardless of whether per-pixel lighting is supported by the graphics adapter.
Version Information
Silverlight
Supported in: 5
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.