Skip to content

Fix invalid viewport being set during post process pass when using Pixel Perfect Camera #6014

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

Closed
wants to merge 1 commit into from

Conversation

kennytann
Copy link
Contributor

@kennytann kennytann commented Oct 14, 2021


Purpose of this PR

Why is this PR needed, what hard problem is it solving/fixing?

Fixes https://fogbugz.unity3d.com/f/cases/1363763/ where the frame doesn't scale correctly when post process is enabled with pixel perfect camera.


Testing status

Describe what manual/automated tests were performed for this PR

Tested on 2022.1.0a13
Open project in FB case.
Ensure changing resolution of game view doesn't create visual artifacts.
Ensure changing ReferenceResolutionX and ReferenceResolutionX on Pixel Perfect Camera component doesn't create visual artifacts.


Comments to reviewers

Notes for the reviewers you have assigned.

@github-actions
Copy link

Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed.
Link to Yamato: https://unity-ci.cds.internal.unity3d.com/project/902/
Search for your PR branch using the search bar at the top, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

URP
/jobDefinition/.yamato%252Fall-urp.yml%2523PR_URP_trunk
With changes to URP packages, you should also run
/jobDefinition/.yamato%252Fall-lightmapper.yml%2523PR_LightMapper_trunk

Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure.

@github-actions
Copy link

It appears that you made a non-draft PR!
Please convert your PR to draft (button on the right side of the page).
See the PR template for more information.
Thank you!

@BoonKiangTan
Copy link

Fix verified on branch:

2022.1.0a12.1604
Revision: trunk 816252c3efbb
Built: Wed, 06 Oct 2021 17:58:29 GMT
Package branch: 2d/fix-pixel-perfect-cam-post-processing (8630c77)

  • Verified tilemap in the Game view is not over-scaled and blurred
    Before:
    Unity_5XbNpDu1FW
    After:
    Unity_iRPalvbZ9x

  • Verified no issues when changing gameview resolution or changing ReferenceResolutionX and ReferenceResolutionX on Pixel Perfect Camera component
    Unity_kR6KdLrsJD

phi-lira added a commit that referenced this pull request Oct 20, 2021
…xel Perfect Camera #6014

commit 8630c77
Author: Kenny Tan <kenny.tan@unity3d.com>
Date:   Thu Oct 14 14:28:46 2021 +0800

    Fix invalid viewport being set during post process pass when using pixel perfect camera
@phi-lira phi-lira mentioned this pull request Oct 20, 2021
phi-lira added a commit that referenced this pull request Oct 22, 2021
…xel Perfect Camera #6014

commit 8630c77
Author: Kenny Tan <kenny.tan@unity3d.com>
Date:   Thu Oct 14 14:28:46 2021 +0800

    Fix invalid viewport being set during post process pass when using pixel perfect camera
@phi-lira
Copy link
Contributor

Merged on staging branch #6085

@phi-lira phi-lira closed this Oct 22, 2021
kennytann added a commit that referenced this pull request Oct 29, 2021
…xel Perfect Camera #6014

commit 8630c77
Author: Kenny Tan <kenny.tan@unity3d.com>
Date:   Thu Oct 14 14:28:46 2021 +0800

    Fix invalid viewport being set during post process pass when using pixel perfect camera

# Conflicts:
#	com.unity.render-pipelines.universal/CHANGELOG.md
#	com.unity.render-pipelines.universal/Runtime/2D/Renderer2D.cs
kennytann added a commit that referenced this pull request Nov 3, 2021
…xel Perfect Camera #6014 (#6170)

commit 8630c77
Author: Kenny Tan <kenny.tan@unity3d.com>
Date:   Thu Oct 14 14:28:46 2021 +0800

    Fix invalid viewport being set during post process pass when using pixel perfect camera

# Conflicts:
#	com.unity.render-pipelines.universal/CHANGELOG.md
#	com.unity.render-pipelines.universal/Runtime/2D/Renderer2D.cs
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.

6 participants