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/2023.2/staging #8059

Merged
merged 35 commits into from
Apr 11, 2024
Merged

Internal/2023.2/staging #8059

merged 35 commits into from
Apr 11, 2024

Commits on Mar 25, 2024

  1. [Port] [2023.2] [VFX] Remove error popup when cancelling a drag edge …

    …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)
    svc-reach-platform-support authored and Evergreen committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    29034c7 View commit details
    Browse the repository at this point in the history
  2. [2023.2][URP] Fixing a NullReferenceException when logging an error i…

    …n Server Builds (UUM-56965)
    
    When running server builds calling `{GetType().DeclaringType.Name}` will give a NullReferenceException. This happens in two places inside the URP Codebase. To fix this the calls are simply removed as they don't provide much value.
    svc-reach-platform-support authored and Evergreen committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    9563255 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2024

  1. [Port] [2023.2] Fix URP & HDRP material UI leaking LabelWidth state

    Fix https://jira.unity3d.com/browse/UUM-66215 where the layout of elements in DOTS Entity Baking Preview panel changes depending on if Material foldout UI is expanded or not.
    
    When the material foldout GUI is expanded on URP or HDRP, it affects other UI drawn afterwards because the UI logic modified persistent `EditorGUIUtility.labelWidth` value and didn't restore it properly after drawing its widgets. This PR fixes that by resetting the value to 0 after drawing the material options. The fix is made separately on CoreRP (used by URP Material Editor) and HDRP because the UI has separate implementations.
    
    Note: we are simply setting the labelWidth to 0 instead of restoring whatever value it was before, because 0 is a special value that cannot be retrieved by using the property getter of `EditorGUIUtility.labelWidth` - if the internal value is 0, it will return some predetermined values instead (see [implementation](https://github.cds.internal.unity3d.com/unity/unity/blob/trunk/Editor/Mono/EditorGUIUtility.cs#L1367-L1379)). Therefore we must make the assumption that 0 is the correct value to be restored in this case.
    svc-reach-platform-support authored and Evergreen committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    304cb5a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0d3c007 View commit details
    Browse the repository at this point in the history
  3. 2023.2/graphics/urp/backport/uum 49324 taa api

    Add public scripting API for URP TAA settings.
    eh-unity authored and Evergreen committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    419db23 View commit details
    Browse the repository at this point in the history
  4. 2023.2:[HDRP] multiply spec by opacity when not preserving spec in pr…

    …emultiplied alpha
    
    This PR fixes the issue Adds an option to multiply specular by opacity by disabling preserve specular
    This is not technically correct but offers similar control to transparents that are not in premultiply mode and helps for VFX.
    
    Disabling affect specular in material settings provides the same result as before, but now you have an option to get a different result, so maybe not really needed to mention in upgrade guide as now it's working more as expected (previously the option had no effect)
    
    * Bug:https://jira.unity3d.com/browse/UUM-48661
    * Backport:https://jira.unity3d.com/browse/UUM-51548
    ppandi-rythmos authored and Evergreen committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    df3488e View commit details
    Browse the repository at this point in the history
  5. [Port] [2023.2] URP: Ensure ScriptableRendererFeatures are compiled b…

    …efore validating them.
    
    This PR add an extra check to `ScriptableRendererData.OnValidate` to ensure we only validate `ScriptableRendererFeatures` when all scripts have been compiled. Not doing so can lead to errors being thrown to the console during import (see attached Jira ticket).
    
    Jira: https://jira.unity3d.com/browse/UUM-58944
    svc-reach-platform-support authored and Evergreen committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    abc211e View commit details
    Browse the repository at this point in the history
  6. [Port] [2023.2] Fix scene dirtiness issue with the HDRP compositor

    https://jira.unity3d.com/browse/UUM-58350
    
    An internal operation (addComponent) was registering an editor Undo, marking the scene as dirty every time we entered the  playmode.
    svc-reach-platform-support authored and Evergreen committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    d99241c View commit details
    Browse the repository at this point in the history
  7. [Port] [2023.2] [URP] Fix screenspace shadows clashing when depth pri…

    …ming is forced
    
    depth copy after depth priming happens after screenspace shadows and it should be vice versa due to the fact, that both events are the same. this PR increases the event of screenspace shadows by one just to guarantee the correct sequencing of the passes
    svc-reach-platform-support authored and Evergreen committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    eaa96c3 View commit details
    Browse the repository at this point in the history
  8. [2023.2][URP] Select correct depth target when doing SwapColorBuffer …

    …(UUM-44446)
    
    Backport of  #38151.
    ellioman authored and Evergreen committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    255f154 View commit details
    Browse the repository at this point in the history
  9. [Port] [2023.2] [URP] Fixed the NativeRenderPass camera target MSAA l…

    …ogic to match the non-NRP path
    
    In some edge cases, when NativeRenderPass is enabled, MSAA resolve errors are thrown, because of incorrect render target setup when using a camera target texture. This PR makes sure the same logic used in the non-NRP path is used when NRP is enabled
    svc-reach-platform-support authored and Evergreen committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    34bfb3e View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2024

  1. [2023.2][URP] Fixing URP PR Aggregate job.

    Currently the URP PR Aggregate job, which we run against PRs touching the URP codebase, is broken due to 4 jobs.
    This PR gets the URP PR Aggregate job green again by moving 3 jobs to unstable and disabling one test.
    ellioman authored and Evergreen committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    a49a27b View commit details
    Browse the repository at this point in the history
  2. Backport : Layout: changed the flexBasis to be calculated including t…

    …he min/max
    
    Fix UUM-51239
    simonduf authored and Evergreen committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    f5f5537 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2024

  1. [Port] [2023.2] [Core][HDRP] Fixing internally created Game Objects b…

    …eing deallocated on scene changes.
    
    This PR fixes GameObjects allocated by HDRP (CameraCache, HDAdditionalLightData/ComponentSingletons) being deallocated in some cases on scene changes. 
    It also slightly simplifies the Probe Camera cache to avoir re-setting the same values every frame. 
    This fix was discussed during previous bugfix with @julien.
    svc-reach-platform-support authored and Evergreen committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    bc3c1f7 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2024

  1. Configuration menu
    Copy the full SHA
    23acd29 View commit details
    Browse the repository at this point in the history
  2. [Port] [2023.2] Add doc for 'Screen Space - Overlay' in Graphics Comp…

    …ositor.
    
    Added documentation on how to use the Screen Space Overlay render mode alongside the Graphics Compositor. We decided not to change the actual behavior of SupportedRenderingFeatures.active.rendersUIOverlay when the Graphics Compositor is in use, but instead, to document a way force the rendering of the UI in this context.
    
    When the user follows the new documentation steps, the UI is indeed well renderer in the GameView. Tested manually and locally on my Windows machine.
    YohannVaastUnity authored and Evergreen committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    3646dda View commit details
    Browse the repository at this point in the history
  3. [Port] [2023.2] Fixed _ScreenParams after upscaling and update screen…

    … node doc
    
    As in title
    svc-reach-platform-support authored and Evergreen committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    3ac4e2e View commit details
    Browse the repository at this point in the history
  4. [Port] [2023.2] [HDRP] update graphics compositor limitation for VR

    update graphics compositor limitation for VR
    svc-reach-platform-support authored and Evergreen committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    626b5f0 View commit details
    Browse the repository at this point in the history
  5. [Port] [2023.2] Fixed Unity-specific #pragma directives being reporte…

    …d in #include files
    
    Backport of https://github.cds.internal.unity3d.com/unity/unity/pull/45790
    
    From trunk PR:
    Fixes [UUM-62756](https://jira.unity3d.com/browse/UUM-62756). The public documentation states the shader compiler will ignore Unity-specific #pragma directives in files included through #include, however this behavior was broken as they were being reported in both #include and #include_with_pragmas. This change fixes that so they're not reported in #include files.
    
    Also, added a warning message when someone uses #include_with_pragmas within a file that was itself included with #include. In that particular case, #include_with_pragmas will be treated as #include, meaning all Unity-specific pragmas it might contain will be ignored.
    
    Bug: https://jira.unity3d.com/browse/UUM-62756
    Backport: https://jira.unity3d.com/browse/UUM-63800
    zoe-bare-unity3d authored and Evergreen committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    05a3656 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2024

  1. Prefab preview thumbnails are not being rendered when a Project uses …

    …HDRP
    
    In 2023.2, assets preview thumbnails are not rendered properly sometimes, they are gray. It's not the case in `2023.3.0a7`, it works perfectly fine.
    
    It works because of the introduced changes in this PR: https://github.cds.internal.unity3d.com/unity/unity/pull/34816
    Specifically the changes for the `HDRenderPipeline.cs`. Removing the globalSettings null check in 2023.2 fixes the issue. 
    
    I don't know this code area, this is definitely more a question for @alex-vazquez 
    I have to jump in vacation this week, I apologize for that, but wanted to create this PR so I can help the next person investigating this issue. I don't mind resuming my work on it if we wanna wait a week!
    YohannVaastUnity authored and Evergreen committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    092691a View commit details
    Browse the repository at this point in the history
  2. [Port] [2023.2] Use half instead of float on mobile for octahedral no…

    …rmal packing functions.
    
    Fixes https://jira.unity3d.com/browse/UUM-62216, in which artifacts appear (looks like uninitialized memory) when using the accurate G-buffer normals feature when targeting mobile. This feature uses a pair for function for performing octrahedral encoding and decoding of normals.
    
    The function misbehaves when targeting mobile, but not desktop. The main difference between mobile and desktop in shadercode is that desktop treats `half` as float, whereas on mobile `half` actually works. The functions for octahedral encoding take `float`'s as input, and are given `half`'s in the mobile path. In the function, we use `abs()` on the input and then negate it. This combination seems to cause a miscompilation of some sort, presumably because `abs` and negation are both input modifiers rather than real instructions - I'm not entirely sure, but it's some mix of those 3 things - half to float conversion, abs and negation.
    
    The most minimal fix that worked was this:
    ```
    float3 UnpackNormalOctQuadEncode(float2 f)
    {
    -   float3 n = float3(f.x, f.y, 1.0 - abs(f.x) - abs(f.y));
    +   float3 n = float3(f.x, f.y, 1.0 - abs(real(f.x)) - abs(real(f.y)));
    ```
    But I instead decided to change the functions to use `real` instead of `float` throughout, as it it seemed cleaner. `real` is just an alias for `half` on mobile and `float` on desktop.
    svc-reach-platform-support authored and Evergreen committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    1c3e097 View commit details
    Browse the repository at this point in the history
  3. [Port] [2023.2] Add missing LightCookies keyword to screenspace decal…

    … projector pass
    
    Fixes https://jira.unity3d.com/browse/UUM-54404, where screen space decals weren't taking into account light cookies.
    
    The code to sample cookies is already present in the relevant shader (a shader made with shadergraph decal template), but the keyword for light cookies, `_LIGHT_COOKIES` is not declared. The fix is simply to add the keyword to the relevant pass descriptor.
    
    The keyword will automatically be set earlier in the render loop, in `LightCookiesManager.Setup`.
    svc-reach-platform-support authored and Evergreen committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    f5d1c38 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2024

  1. Configuration menu
    Copy the full SHA
    112a71a View commit details
    Browse the repository at this point in the history
  2. [Port] [2023.2] [URP] [2D] ShaderGraph Pass name is not generated whe…

    …n the pass is "LightMode" = "Universal2D"
    
    Fix missing pass name
    
    https://jira.unity3d.com/browse/UUM-36358
    svc-reach-platform-support authored and Evergreen committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    509a2b2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e7a1784 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c76c72f View commit details
    Browse the repository at this point in the history
  5. [Port] [2023.2] Try to blind fix the NaN issue in fog

    Fix NaN issue in volumetric fog reprojection
    svc-reach-platform-support authored and Evergreen committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    a96f634 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. [2023.2][UUM-59543] Fix Light2D shader warnings

    Fix shader warnings in URP 2D template
    kennytann authored and Evergreen committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    a32a45a View commit details
    Browse the repository at this point in the history
  2. [Port] [2023.2] [UUM-31719] Set default orthographic for pixel perfec…

    …t camera
    
    Set default projection orthographic for pixel perfect camera
    svc-reach-platform-support authored and Evergreen committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    57a8fae View commit details
    Browse the repository at this point in the history
  3. [23.2] Bump graphics packages

    - Bumped SRP packages from 16.0.5 to 16.0.6
    theopnv authored and Evergreen committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    915f4ea View commit details
    Browse the repository at this point in the history
  4. [Port] [2023.2] Fix for the preview rendering issue (no default sky a…

    …mbient)
    
    In the initial rendering of the preview in the inspector window, the ambient color of the default sky may not be ready (black ambient color), due to the lag of GPU readback of the SH coefficients. The ambient color is not updated until the preview is updated by some triggers like hovering the cursor over the inspector.
    This PR fixes the issue by using the hard-coded value of the default sky's SH.
    svc-reach-platform-support authored and Evergreen committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    e610241 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2024

  1. [Backport][2023.2][VFX] Multiple gizmos in same node could not be sel…

    …ected
    
    ### [UUM-52509](]https://jira.unity3d.com/browse/UUM-52509)
    Steps to repro
    1. Create a new VFX Graph
    2. Add position line sequential block
    3. Connect to VFX to enable gizmos, in scene view select Line End gizmo
    4. Move it, observe that it's still changing Line Start values
    
    Does not repro in a6. Possibly caused by https://github.cds.internal.unity3d.com/unity/unity/pull/32348
    julienamsellem authored and Evergreen committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    e591022 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2024

  1. [Port] [2023.2] Fixed recorder with DRS

    Fix a scaling issue with the recorder.
    svc-reach-platform-support authored and Evergreen committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    8b75a8d View commit details
    Browse the repository at this point in the history
  2. [Port] [2023.2] Update reflection probe atlas if probe runtime intens…

    …ity changes
    
    https://jira.unity3d.com/browse/UUM-67982
    
    The update logic in the reflection probe atlas was not taking into account the runtime intensity of non real-time probes
    svc-reach-platform-support authored and Evergreen committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    a5c4e53 View commit details
    Browse the repository at this point in the history
  3. [Backport 2023.2][HDRP] Fix clouds not affected by intensity multiplier

    Backport of #47069
    remi-chapelain authored and Evergreen committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    475e9f1 View commit details
    Browse the repository at this point in the history