Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


currentBackbufferMSAASamples

Get the actual MSAA sample count that the backbuffer is ready to use this frame.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static int currentBackbufferMSAASamples { get; }

Remarks

Use this property to determine the MSAA sample count when setting up render passes that target the backbuffer. Native render passes require all attachments to have matching sample counts; using this value ensures that intermediate MSAA attachments match what the backbuffer actually supports this frame.
This may differ from Screen.msaaSamples, which returns the last requested value. After changing the MSAA sample count via Screen.SetMSAASamples, some backends need time to apply the change. During that transition, this property returns 1 (no MSAA) until the backend is ready, ensuring render pass setup remains valid.
Returns 1 if SystemInfo.supportsMultisampledBackBuffer is false, or if the backbuffer surface does not yet exist.