Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

Screen.currentBackbufferMSAASamples

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static int currentBackbufferMSAASamples;

Description

Get the actual MSAA sample count that the backbuffer is ready to use this frame.

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 msaaSamples, which returns the last requested value. After changing the MSAA sample count via 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.

See also: SetMSAASamples, msaaSamples, SystemInfo.supportsMultisampledBackBuffer