GraphicsDevice.UseHalfPixelOffset Property (Microsoft.Xna.Framework.Graphics)

Indicates if DX9 style pixel addressing or current standard pixel addressing should be used. This flag is set to false by default. If `UseHalfPixelOffset` is `true` you have to add half-pixel offset to a Projection matrix. See also PreferHalfPixelOffset.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.1082)
  • C#
  • VB
  • F#
public bool UseHalfPixelOffset { get; private set; }

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

Property Value

Type: System.Boolean
XNA uses DirectX9 for its graphics. DirectX9 interprets UV coordinates differently from other graphics API's. This is typically referred to as the half-pixel offset. MonoGame replicates XNA behavior if this flag is set to true.
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web