Skip to content

Fix for some post effects not scaling correctly when dynamic resolution is enabled on a camera's target texture#7383

Merged
sebastienlagarde merged 3 commits intomasterfrom
postprocessing/fix-multiscaleAO-dynamicresolution
Dec 15, 2022
Merged

Fix for some post effects not scaling correctly when dynamic resolution is enabled on a camera's target texture#7383
sebastienlagarde merged 3 commits intomasterfrom
postprocessing/fix-multiscaleAO-dynamicresolution

Conversation

@christine-johnson
Copy link
Copy Markdown
Contributor

@christine-johnson christine-johnson commented Apr 27, 2022

Please read the Contributing guide before making a PR.

Checklist for PR maker

  • Have you added a backport label (if needed)? For example, the need-backport-* label. After you backport the PR, the label changes to backported-*.
  • Have you updated the changelog? Each package has a CHANGELOG.md file.
  • Have you updated or added the documentation for your PR? When you add a new feature, change a property name, or change the behavior of a feature, it's best practice to include related documentation changes in the same PR. If you do add documentation, make sure to add the relevant Graphics Docs team member as a reviewer of the PR. If you are not sure which person to add, see the Docs team contacts sheet.
  • Have you added a graphic test for your PR (if needed)? When you add a new feature, or discover a bug that tests don't cover, please add a graphic test.

Purpose of this PR

Fixes https://fogbugz.unity3d.com/f/cases/1166603/ where some post effects were not scaling correctly when dynamic resolution is enabled on a camera's target texture. Dynamic resolution can be enabled on a camera (https://docs.unity3d.com/ScriptReference/Camera-allowDynamicResolution.html) or on a render texture (https://docs.unity3d.com/ScriptReference/RenderTexture-useDynamicScale.html), which means it can be enabled for a camera using Camera.allowDynamicResolution or Camera.targetTexture.useDynamicScale. We check both these cases internally but this isn't exposed in script, so we have to manually check both cases in ppv2.


Testing status

Tested manually against https://fogbugz.unity3d.com/f/cases/1166603/ on Windows/DX12.
Ran yamato postprocessing tests


Comments to reviewers

…was not handled properly if the camera has a target texture that has dynamic resolution enabled
Copy link
Copy Markdown

@ryanhy-unity ryanhy-unity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since post processing tests and manual verification done already I ran through some XR platforms not covered in the automated tests. Verified Oculus and Open XR runtimes both work fine and pass automated graphics tests. I was unable to verify Vulkan due to an existing issue however.

@christine-johnson christine-johnson marked this pull request as ready for review June 9, 2022 23:07
@sebastienlagarde sebastienlagarde merged commit 2b3474f into master Dec 15, 2022
@sebastienlagarde sebastienlagarde deleted the postprocessing/fix-multiscaleAO-dynamicresolution branch December 15, 2022 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants