Skip to content
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/2022.3/staging #8074

Merged
merged 19 commits into from
May 17, 2024
Merged

Internal/2022.3/staging #8074

merged 19 commits into from
May 17, 2024

Conversation

UnityAljosha
Copy link
Collaborator

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

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.

adrien-de-tocqueville and others added 19 commits April 30, 2024 03:22
…or soft particles

*This PR partly addresses: https://jira.unity3d.com/browse/XRVOSB-20

In the original issue, particles that have the Soft Partilces feature enabled would appear wildly distorted on the Vision Pro. Soft particles perform a sample of the depth buffer in order to neatly fade their texture when close to other objects. Previously, when foveated rendering was enabled, the shader would sample the depth buffer at the wrong coordinates, resulting in a heavily distorted image. 

This PR allows shaders to use Foveated Rendering code when on the Vision OS platform, and modifes the particle shader to properly take foveation into account when querying the depth buffer.
…others)

Jira: UUM-70986

*Steps to reproduce:*
    1. Create VFX
    2. Create operator transform
    3. Observe output slot

*Actual results:* Observe missing collapse triangle
![](https://jira.unity3d.com/secure/attachment/1439573/1439573_image-2024-04-29-10-09-27-964.png)
*Expected results:* 
![](https://jira.unity3d.com/secure/attachment/1439572/1439572_image-2024-04-29-10-13-39-831.png)

 *Reproducible with versions:* 2022.3.25f1
 *Not reproducible with versions:* 2022.3.24f1, 6000.0.1f1
 *Can’t test with versions:* N/A

 *Tested on (OS):* Windows
 *Notes:*
 - See https://unity.slack.com/archives/G1BTWN88Z/p1714374026007519
 - See https://x.com/srrafles/status/1784232267012882825
…ersalRPAsset inspector

Some fields use shared data through different renderer instances.

Was not able to produce it on my computer at all, but was able to produce it on Kirill ones and we pair debugged it on 6000. The root of issue is in the end that the Renderer is shared between the RPAsset in use and the RPAsset edited through the inspector. To assess the compatibility of the renderer, it need to be constructed again with the current architecture. And then when the inspector is modified we destroy the constructed copy. It could have work but they share some data that got destroyed and caused the null reference if the rendering occures between shared data is recreated.

Note that the architecture is as is since the implementation of Renderer as an asset. So changing anything here is really touchy. Aggregated test seems to be green but this _require extended QA tests_.
This PR fixes a NullReferenceException occuring when changing decals settings in HDRP while VFX window is present but hidden in the layout.
…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.
Backport of the following PR (with some 2022-specific changes):
https://github.cds.internal.unity3d.com/unity/unity/pull/48736

DOCG-5296. "a combination of 2D and 3D Lights and 2D and 3D Renderers in a single Scene"

DOCG-4772. Unlit shaders edit.

DOCG-5083 cameraOutput is not a property of UniversalAdditionalCamera…

DOCG-4935 There should be {} at the end of the property after "white"
…reDescriptor when rendering into a texture and having a renderScale

When Render scale != 1 and we are rendering to a Render Texture. The NativeRender pass was creating the RenderTextureDescriptor with an invalid dimensions.

Make sure that Attachements sizes are the same as pass sizes.

This is a backport from @alex-vazquez fix:
[Original PR](https://github.cds.internal.unity3d.com/unity/unity/pull/48301)
[Original Jira Bug](https://jira.unity3d.com/browse/UUM-61468)

This PR fixes:
https://jira.unity3d.com/browse/UUM-58611
https://jira.unity3d.com/browse/UUM-59081

Port Jira tickets: [UUM-69058](https://jira.unity3d.com/browse/UUM-69058) and [UUM-69115](https://jira.unity3d.com/browse/UUM-69115)
Added the missing references to the landing page.
…ple VFX at the same time on inspector

When selecting multiple VFX with exposed properties, if those exposed properties had different values, any change in the inspector was resetting the values of the exposed properties, because we were not tracking GUI changes locally.

This issue was also responsible of the Allow Instancing property not being properly applied when selecting multiple objects.

This PR also adds a property drawer for animation curves, that were not displayed if multiple objects with different exposed animation curves were selected.
<img width="533" alt="image" src="https://media.github.cds.internal.unity3d.com/user/2805/files/f6c2c4e1-a4b5-4cc4-8793-c2acd541ae11">
Backports the following docs bug fix PRs to 2022.3 docs:

- #48382 
- #48425
…(UUM-70142)

Fixes UUM-70142.
The issue is that the constructor was allocating shadow maps in the constructor, which caused memory leakage when switching between graphics quality. This PR changes it so the textures are only allocated when needed and with a check for if it has already been created.
…arch Request was wrongly handled and disposed before it was completed.

As the Search request is executed asyncronously. if we dispose the context. The RP converter for Buit in materials can not finish properly.

Disposing the context, when is finished.
Fix unexpected return value of spawnCount while using GPUEvent, it was returning zero. The expected value is available with GPUEvent through elementCount.
…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.
… 61913

Fixes a bug with terrain rendering on Quest2/Pico4 where holes would not display properly. [UUM-61913](https://jira.unity3d.com/browse/UUM-61913)
Backports the following PRs to 2022.3 version of URP docs with any version appropriate changes:
- #44239 
- #44926 
- #45311 
- #45429
@UnityAljosha UnityAljosha requested review from a team as code owners May 17, 2024 14:35
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!

@UnityAljosha UnityAljosha merged commit 823f3b3 into 2022.3/staging May 17, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.