-
Notifications
You must be signed in to change notification settings - Fork 803
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
Internal/2021.3/staging #8075
Merged
Merged
Internal/2021.3/staging #8075
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backport trivial changes to shaders that were generating warnings due to returns inside conditionals. In particular, these two: `use of potentially uninitialized variable (GetParticleIndex)` `use of potentially uninitialized variable (CompareKVP)`
Backports the following docs bug fix PRs to 2021.3 docs: - #48382 - #48425
…ering playmode and the panel count changes. There are debug panels that only appear when the editor is in playmode. Such as Display Stats. Display stats, always appears on top of the Rendering Debugger panels list. This makes the indexes shift. The editor debug window is storing the id of the selected panel, and not the name. Names do not change between entering/exiting playmode. So is safer to keep the display name, And retrieve the current panel index from the DebugManager when requested.
…with escape key Jira: UUM-61583 Steps to repro: - Create a new HDRP/URP project - Create a new VFX Graph - Create two operators that have incompatible slots (`Float` and `Sample Gradient` for instance) - Drag `Float` connection out and hover it over gradient input slot - Hit escape to cancel - Observe wrong type popup gets stuck and moves around with graph ![Unity_IrNrWdfUSY](https://media.github.cds.internal.unity3d.com/user/4003/files/2a6b8809-0eb9-4e74-bc33-dd4ed7e326b4) ![video](https://jira.unity3d.com/secure/attachment/1368545/WrontTypePopup.mp4)
…d is current target platform This fix works around a shader miscompilation when targeting mobile. In practice this causes artifacts in code that uses octahedral encoding/decoding functions. A bit of history is warranted here. In this PR https://github.cds.internal.unity3d.com/unity/unity/pull/46787 I fixed a similar issue, and the explanation in that PR still holds. That fix addressed a case where we call the octahedral encoding function, which expects a float as input, with a half on mobile. I 'fixed' it by making the function take half's on mobile. Unfortunately, that fix introduced a regression in cookie shading. The cookie issue is sort of the opposite - we are passing floats where the function expects half on mobile. To make it completely clear, both of these setups _should_ work - half<->float conversion should be happening without issues. I'm convinced we are dealing with a miscompilation here. In order to make a fix that works for both kinds of inputs, both half and float, I drilled into the shadercode to find the minimal repro. The problematic instructions are a few calls to abs() which give incorrect outputs. When the abs() is present, instead of half<->float conversion, we seem to get something more akin to a direct bit-cast between the 2 datatypes, which results in reading uninitialized memory when converting half->float (hence why the repro in https://github.cds.internal.unity3d.com/unity/unity/pull/46787 is violently shaking), and truncation of bits when converting float->half (hence why the repro in the cookie bug is completely static, but corrupt looking). **As a fix**, I've reverted the function back to its initial state of taking floats as input, and replaced the abs() calls with a manual sign check. This fixes both of the aforementioned issues.
Backports the following PRs to 2021.3 version of URP docs with any version appropriate changes: - #44239 - #44926 - #45311 - #45429
It appears that you made a non-draft PR! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please read the Contributing guide before making a PR.
Checklist for PR maker
need-backport-*
label. After you backport the PR, the label changes tobackported-*
.CHANGELOG.md
file.Purpose of this PR
Why is this PR needed, what hard problem is it solving/fixing?
Testing status
Describe what manual/automated tests were performed for this PR
Comments to reviewers
Notes for the reviewers you have assigned.