Skip to content

[9.x.x] Fixed Quality Settings changing without user interaction v2. #181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions com.unity.render-pipelines.universal/Runtime/ForwardRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,9 @@ void CreateCameraRenderTarget(ScriptableRenderContext context, ref CameraData ca
void SetupBackbufferFormat(int msaaSamples, bool stereo)
{
#if ENABLE_VR && ENABLE_VR_MODULE
if (!stereo)
return;

bool msaaSampleCountHasChanged = false;
int currentQualitySettingsSampleCount = QualitySettings.antiAliasing;
if (currentQualitySettingsSampleCount != msaaSamples &&
Expand All @@ -435,10 +438,11 @@ void SetupBackbufferFormat(int msaaSamples, bool stereo)
// By settings antiAliasing we match what the amount of samples in camera data with backbuffer
// We only do this for the main camera and this only takes effect in the beginning of next frame.
// This settings should not be changed on a frame basis so that's fine.
QualitySettings.antiAliasing = msaaSamples;

if (stereo && msaaSampleCountHasChanged)
if (msaaSampleCountHasChanged)
{
QualitySettings.antiAliasing = msaaSamples;
XR.XRDevice.UpdateEyeTextureMSAASetting();
}
#endif
}

Expand Down