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/2021.3/staging #8098

Merged
merged 30 commits into from
Sep 19, 2024
Merged

Internal/2021.3/staging #8098

merged 30 commits into from
Sep 19, 2024

Commits on Jun 28, 2024

  1. [Backport][2021.3][SRPF] Hide RenderMode field and remove documentation

    RenderMode was never supported by URP. Maybe it was planned to be added but I couldn't find anyone who knows anything about.
    Instead we hide the field and remove documentation for it.
    kirill-titov-u authored and Evergreen committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    bc010b0 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

  1. [Port 2021.3][BuiltTarget Extensions]API was accessing the target pla…

    …form by the wrong string
    
    UI is adding included/excluded platforms in the UI by NamedBuildTarget.
    
    So for instance, "Switch" is obtained from BuildTarget.Switch.ToString(), but if we do NamedBuildTarget(BuildTarget.Switch) it returns you "Nintendo Switch".
    
    This was including/excluding RP assets that were not supposed to match the call to the API of BuiltTarget extension
    
    https://jira.unity3d.com/browse/UUM-73363
    alex-vazquez-unity3d authored and Evergreen committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    2f01e03 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. Backport wireframe fixes (including Vulkan)

    Manual backport of [this PR](https://github.cds.internal.unity3d.com/unity/unity/pull/50412) + [this PR](https://github.cds.internal.unity3d.com/unity/unity/pull/25910).
    
    Tested on D3D11 and Vulkan. Works well, the wireframe is now rendered.
    It also fixes an issue with the DepthCopy, that is happening since 21.3 is not using the Blitter code introduced in 2022 + the changes for this pass.
    
    ![Fix_21_3_Wireframe](https://media.github.cds.internal.unity3d.com/user/1911/files/80ebf77a-4dee-4bec-96b5-e63032e60b1c)
    YohannVaastUnity authored and Evergreen committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    a17c2a7 View commit details
    Browse the repository at this point in the history
  2. [Backport][2021.3][VFX] Blackboard not visible when docked in small area

    Jira: UUM-65513
    
    Reproduction steps:
    1. Create a VFX Graph
    2. Show the control panel or the blackboard (use the buttons in the toolbar)
    3. Dock the “graph” Window to the bottom of the UI (for instance with the console)
    
    Expected result: Floating panel is visible
    Actual result: Floating panel disappears
    
    ![video](https://jira.unity3d.com/secure/attachment/1397173/IN-69565%20repro.mkv)
    julienamsellem authored and Evergreen committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    48d37c5 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2024

  1. [2021.3][HDRP] Simplify Screen Space Reflection and add missing fence…

    … when async
    
    Backport of [49983](https://github.cds.internal.unity3d.com/unity/unity/pull/49983) for [UUM-70273](https://jira.unity3d.com/browse/UUM-70273)
    
    From trunk PR:
    "This PR applies multiple fixes to HDRP Screen Space Reflection:
    - It removes the SSR lighting texture by reusing the SSR accumulation texture
    - It adds a fence before async work, so they wait for resources to be cleared when it reuses pooled resources. This fixes flickering on some platform where graphics and async command buffer are more sensitive to missing fences.
    - It changes the hit point texture and lighting texture clears to be async if the pass is async. Due to the new fence, it couldn't overlap with shadow rendering, but moving the clear to the same queue as the rest of the work, is more optimized and has no fence."
    
    Port ticket: https://jira.unity3d.com/browse/UUM-71296
    Bug ticket: https://jira.unity3d.com/browse/UUM-70273
    NdBree authored and Evergreen committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    bf4900d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    47a8a44 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2024

  1. [Port] [2021.3] Fix Linear01DepthFromNear

    Backport for UUM-19101
    
    The shader utility function Linear01DepthFromNear does not work for APIs with reversed Z buffer (all of our APIs except OpenGL/GLES). I changed the function into one that works and updated some comments in shader code.
    
    ```
    float Linear01DepthFromNear(float depth, float4 zBufferParam)
    {
        // Old:
        // return 1.0 / (zBufferParam.x + zBufferParam.y / depth);
    
        // New:
        #if UNITY_REVERSED_Z
        return (1.0 - depth) / (zBufferParam.x * depth + zBufferParam.y);
        #else
        return depth / (zBufferParam.x * depth + zBufferParam.y);
        #endif
    }
    ```
    
    ![image](https://media.github.cds.internal.unity3d.com/user/7119/files/beac76da-e6e4-4db1-8d3c-f4c6ef08b37d)
    svc-reach-platform-support authored and Evergreen committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    f65c21d View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2024

  1. [Port] [2021.3] Minor docs fixes

    Fix the issues from the following feedback tickets:
    
    Jira tickets: 
    
    - https://jira.unity3d.com/browse/DOCG-5823
    - https://jira.unity3d.com/browse/DOCG-5821
    markg-unity authored and Evergreen committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    531ff28 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2024

  1. [Port] [2021.3] DOCG-5438 Updated broken links to xref links

    Fixed broken link, and updated API links to xref links.
    svc-reach-platform-support authored and Evergreen committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    8c0896e View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2024

  1. [Port] [2021.3] DOCG-5041 Fix for RThandle broken link

    Fixing broken link mentioned in DOCG-5041.
    svc-reach-platform-support authored and Evergreen committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    b563761 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2024

  1. [Tests][iOS] Disabled three testscenes that were causing trouble

    https://unity.slack.com/archives/C06UZ1MTRAL/p1720242149217419
    
    The following three tests:
    ```
    ShaderGraphGraphicsTests.LogicNodes
    ShaderGraphGraphicsTests.NormalMapStressTests
    ShaderGraphGraphicsTests.InstancedRendering
    ```
    fail when running `ShaderGraph_iPhone_Metal_Standalone_il2cpp_Linear `. This PR disables them.
    
    
    Jira ticket on failure: https://jira.unity3d.com/browse/UUM-75644
    NdBree authored and Evergreen committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    9ecf44e View commit details
    Browse the repository at this point in the history
  2. [Port] [2021.3] Avoid that the same volume can be registered more tha…

    …n 1 time in the VolumeManager.
    
    Avoid that the same volume can be registered more than 1 time in the VolumeManager.
    svc-reach-platform-support authored and Evergreen committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    eae0377 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2024

  1. [Port] [2021.3] Fixed graphical issue when modifying Reflection Probe…

    … sizes
    
    There is a graphical issue when resizing Reflection Probe box sizes on macOS. The issue comes from trying to draw in the Editor (either using `GL` commands or `DrawMeshNow`, for example) while the `Event.current.type != EventType.Repaint` causes graphical issues on Metal. This PR fixes that issue by guarding against this case when rendering the filled in box.
    
    Jira: UUM-71467
    svc-reach-platform-support authored and Evergreen committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    6ea5067 View commit details
    Browse the repository at this point in the history
  2. [Port] [2021.3] Fixed compiler error when using half precision caused…

    … from `LightingSpecular`
    
    This PR fixes the compiler error, described in UUM-48035, when using `single` precision:
    
    ```
    Shader error in 'Lights Receiver URP/LightsReceiver': Program 'frag', error X8000: D3D11 Internal Compiler Error: Invalid Bytecode: Incompatible min precision type for operand #3 of opcode #40 (counts are 1-based). Expected int or uint. at line 47 (on metal)
    ```
    jrs-unity authored and Evergreen committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    ac44505 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2024

  1. 2021.3 Backport PR #49299 (Reduce Banding on FSR Upscaled Render Target)

    This change backports the FSR banding fixes from #49299 into 2021.3.
    gmitrano-unity authored and Evergreen committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    244b4f3 View commit details
    Browse the repository at this point in the history
  2. 2021.3 Backport #49172 (Add Missing Fallback Setting for FSR EASU Sha…

    …der)
    
    This PR backports the changes from #49172 to 2022.3
    gmitrano-unity authored and Evergreen committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    84d146f View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2024

  1. [UUM-70478] [2021.3] Backport fixes for HDRP mipmap debug views

    This backports the 2022.3 HDRP mipmap debug views fixes (https://github.cds.internal.unity3d.com/unity/unity/pull/50196) to 2021.3.
    This PR is identical to the 2022.3 PR outside of 2 very minor elements:
    - I've not backported [this commit](https://github.cds.internal.unity3d.com/unity/unity/pull/50196/commits/1a9fac5a131104805277e5a46de82c34130eaafc) from the 2022.3 PR because the behaviour of the `Terrain Texture` dropdown was, strangely enough, already correct in 2021.3.
    - 1 conflict in `LitDataIndividualLayer.hlsl` and 1 conflict in `UnlitData.hlsl`: in summary, in both cases, the code to calculate the `alpha` is a bit different (simpler) in 2021.3, so we just make sure that the code moved into the `if (_DebugMipMapMode == DEBUGMIPMAPMODE_NONE)` block truly is from 2021.3 and not 2022.3...
    Olof-AV authored and Evergreen committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    5db5c9d View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2024

  1. [2021.3][ShaderGraph] Variant Limit bug fix

    Address a few issues with shader graph shader variant limit.
    Esmeralda Salamone authored and Evergreen committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    b7ef1c4 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2024

  1. [Port] [2021.3] [UUM-76270] Fix resize and scrolling behavior of Cust…

    …om Function node's body field
    
    This PR fixes https://jira.unity3d.com/browse/UUM-76270.
    
    The Custom Function node's body field was difficult to use due to a combination of broken sizing and a lack of scrollbars. This fix prevents the body field from growing beyond the inspector width, ~~and enables horizontal/vertical scrollbars~~. **Note: TextField does not have scrolling support in 2021.3, so the scrollbar addition was not backported. Other ports are not affected**.
    
    ![image](https://media.github.cds.internal.unity3d.com/user/3965/files/053d0c59-a251-4484-b532-f72ab0f37eaf)
    svc-reach-platform-support authored and Evergreen committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    4c8ad67 View commit details
    Browse the repository at this point in the history
  2. 2021.3: Fixed an issue where glClientWaitSync: Expected application t…

    …o have kicked everything
    
    This PR fixes Errors "glClientWaitSync: Expected application to have kicked everything until job: 96089 (possibly by calling glFlush)" are thrown in the Android Player on some devices with PowerVR Rogue GE8320 GPU.
    
    * Parent : https://jira.unity3d.com/browse/UUM-59572
    * Backport : https://jira.unity3d.com/browse/UUM-63149
    skannan-rythmos authored and Evergreen committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    7631afa View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2024

  1. [Backport][2021.3][SRPF] Use FNV-1a 32 for caching and resource hashc…

    …ode in Render Graph
    
    The main issue goes to the hash method generation that was used for identifying Render Graph resources. We used the most performant way but it was too many collisions. After a bit of research the decision is to use FNV-1a implementation as it's the same performance but much more reliable. There's still a possibility for collision but a probability should be much smaller.
    kirill-titov-u authored and Evergreen committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    ed5f7c4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b3d4bcf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    852baa2 View commit details
    Browse the repository at this point in the history
  4. [Port] [2021.3] fix camera offset in the UI editor for the RenderObje…

    …ct feature UUM-76307
    
    fix camera offset in the UI editor for the RenderObject feature UUM-76307
    svc-reach-platform-support authored and Evergreen committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    43cc2c1 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2024

  1. [SpeedTree] backport-2021.3: Fix camera facing leaf effect

    Backport of https://github.cds.internal.unity3d.com/unity/unity/pull/48921
    
    This PR doesn't include SpeedTree9 changes as ST9 support is Unity6+.
    It also doesn't include the SpeedTree shadergraph/subgraph improvements in the original PR to keep changes minimal and only fix the bugs.
    
    | Shader | Leaf Facing | No-wind LOD Transition | 
    | :-- | :-- |  :-- |
    | BiRP | Fixed in PR | Already working |
    | URP_hlsl | Fixed in PR | Already working |
    | URP_sg | Already working for windy<br/>Fixed in PR no-wind | Fixed in PR |
    | HDRP_sg | Already working for windy<br/>Fixed in PR no-wind | Fixed in PR |
    volkan-unity authored and Evergreen committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    9c247e1 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2024

  1. [Port] [2021.3] Set no-op matrix for empty shadow-rendering.

    This PR fixes an issue where some leftover shadow-rendering uniforms aren't properly cleared when using the `Unlit Draw Mode` in the scene-view, leading to some visible artifacts when sampling the empty shadow-map set for this mode.
    amsXYZ authored and Evergreen committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    6c1be11 View commit details
    Browse the repository at this point in the history
  2. [Port] [2021.3] SG integration: Read unexposed global properties from…

    … cbuffer
    
    Shader Graph allows to declare properties in a global context. These properties can be set from script, globally to all shaders at the same time. (see [Shader.SetGlobalVector](https://docs.unity3d.com/ScriptReference/Shader.SetGlobalVector.html for instance)).
    These global properties work fine when used with a regular ShaderGraph material, but not with VFX outputs that use ShaderGraph.
    The reason is that we were grouping them in a structure with the other exposed properties, when these should be read directly from the constant buffer. Just changing the declaration in the shader makes it work fine.
    svc-reach-platform-support authored and Evergreen committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    5edb84b View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2024

  1. [Port] [2021.3] Only call MakeEditable on SG reimports triggered by a…

    … version upgrade.
    
    This PR is intended to remove the VCS local checkout (due to `AssetDatabase.MakeEditable`) that happened on any reimport of SG assets.
    
    Jira: https://jira.unity3d.com/browse/UUM-17912
    amsXYZ authored and Evergreen committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    d0c571c View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. [Port] [2021.3] Fix a bug that Normal From Height node generates inco…

    …rrect shader code for 16-bit half precision.
    
    JIRA: [UUM-72722](https://jira.unity3d.com/browse/UUM-72722)
    
    This PR fixes a bug that Normal From Height node in a shader graph might return an invalid value when using 16-bit half precision.
    
    <table><thead>
      <tr>
        <th><img src="https://media.github.cds.internal.unity3d.com/user/7006/files/2082dd6b-3b91-4f48-9c05-f440ccfea156" /></th>
        <th><img src="https://media.github.cds.internal.unity3d.com/user/7006/files/b31992b2-c6ae-45c9-989e-bacd86ac97c3" /></th>
      </tr></thead>
    <tbody>
      <tr>
        <td>before</td>
        <td>after</td>
      </tr>
    </tbody>
    </table>
    svc-reach-platform-support authored and Evergreen committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    d18c90e View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2024

  1. [Port] [2021.3] Fixed the BlockNode to display the name using Display…

    …Name.
    
    Jira: https://jira.unity3d.com/browse/UUM-76081
    
    Added a displayName to AbstractMaterialNode to use when displaying it in the Graph Inspector. displayName defaults to name, and is overridden by BlockNode to create it using shaderStage and displayName.
    ![image](https://media.github.cds.internal.unity3d.com/user/761/files/74c417ea-4dc5-43e9-8637-65ecb678eb63)
    
    The changed name looks like this:
    <table>
    <tr><th>Before</th><th>After</th></tr>
    <tr><td>VertexDescription.Position Node</td><td>Vertex Position Node</td></tr>
    <tr><td>VertexDescription.Normal Node</td><td>Vertex Normal Node</td></tr>
    <tr><td>VertexDescription.Tangent Node</td><td>Vertex Tangent Node</td></tr>
    <tr><td>SurfaceDescription.BaseColor Node</td><td>Fragment Base Color Node</td></tr>
    <tr><td>SurfaceDescription.NormalTS Node</td><td>Fragment Normal (Tangent Space) Node</td></tr>
    <tr><td>SurfaceDescription.Metalilc Node</td><td>Fragment Metallic Node</td></tr>
    <tr><td>SurfaceDescription.Smoothness Node</td><td>Fragment Smoothness Node</td></tr>
    <tr><td>SurfaceDescription.Emission Node</td><td>Fragment Emissiton Node</td></tr>
    <tr><td>SurfaceDescription.Occlusion Node</td><td>Fragment Ambient Occlusion Node</td></tr>
    </table>
    svc-reach-platform-support authored and Evergreen committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    b08c5f3 View commit details
    Browse the repository at this point in the history