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/master #7975

Merged
merged 27 commits into from
Oct 16, 2023
Merged

Internal/master #7975

merged 27 commits into from
Oct 16, 2023

Commits on Oct 11, 2023

  1. [HDRP] Light management refactor for light optimization and API to ca…

    …che light for RTGI
    
    POI: https://jira.unity3d.com/browse/POI-816 - SRP production ready
    
    This PR add a new API "forceVisible" on the C++ Light class. This is use in HDRP to allow to have a light that is forced visible even if outside of the view and have no pixels on screen.  The light will still generate a cached shadow map - reserve memory in the Atlas etc., but will be removed before going in to the main light loop. 
    Thus an offscreen light could be cached and reuse by system like realtime GI even if not visible on screen.
    
    To get correct behavior with shadow caching, this is the change include in the PR: 
    
    1. Force lights visible and cache shadows for them
    2. Remove frustum limiting the shadow culling
    3. Use default shadow value set by user
    4. Cache shadow value in the hit point
    
    They are explain in the slides: https://docs.google.com/presentation/d/1qlMkPFOGgxHsvvbYan3DGWY09uj5kHJVIO-PilKOULM/edit#slide=id.g1a443f2ccf9_0_432
    
    In addition, this PR refactor the light management code to share more culling code between rasterizer, raytracing and path tracing and optimize it a bit. This is name world light management:
    
    World light manager handles all lights in a scene and makes them accessible on the GPU. This includes
    information about their shape.
    1. First create WorldLights object and populate it using CollectWorldLights().
    2. Pass the WorldLights object to BuildWorldLightDatas() to create the GPU representation of the lights.
    3. (optionally) Pass the WorldLights object to BuildWorldLightVolumes() to create the GPU representation of the light bounds.
    4. Bind the buffers using Bind
    
    WorldLights life time loop
    - Construct / Update
    - Reset
    
    WorldLightsGpu and WorldLightsVolumes life time loop
    - Construct / Update
      - PushToGpu
    - Bind
    - Release
    sebastienlagarde authored and Evergreen committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    97d4161 View commit details
    Browse the repository at this point in the history
  2. [POI-817][2023.3][URP] Main thread performance improvements - V1

    * [POI-817](https://jira.unity3d.com/browse/POI-817)
    * [URP-1998](https://jira.unity3d.com/browse/URP-1998)
    * [URP-2044](https://jira.unity3d.com/browse/URP-2044)
    * [URP-2040](https://jira.unity3d.com/browse/URP-2040)
    
    This PR makes sure URP...
    * ...uses PlatformAutoDetect to cache the results of `GraphicsSettings.HasShaderDefine(BuiltinShaderDefine.SHADER_API_MOBILE)`
    * ...doesn't call `BuildAdditionalLightsShadowAtlasLayout` when additional light shadows are disabled in URP Asset
    * ...doesn't call `InitializeMainLightShadowResolution` when main light shadows are disabled in URP Asset
    * ...doesn't calculate rendering/light layers when the feature is disabled in the URP Asset
    * ...uses the SHAutoDetect function in PlatformAutoDetect
    ellioman authored and Evergreen committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    9801f15 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2023

  1. Added 9008 Animation Frustum Culling test to HDRP

    Add a new test
    Carl-Harrison authored and Evergreen committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    fcdb3e5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    75d10d6 View commit details
    Browse the repository at this point in the history
  3. [URP][RG] FB Fetch and SSAO fix

    This PR fixes deferred renderer not working correctly on RenderGraph path due to the fact, that render pass breaks if SSAO is used inbetween GBuffer and Deferred passes
    
    This also renames UseRenderPass to UseFramebufferFetch in DeferredLights to be more clear and less confusing.
    
    
    RenderGraph Epic:
    https://jira.unity3d.com/browse/URP-1297
    
    POI:
    https://jira.unity3d.com/browse/POI-817
    jonuuukas authored and Evergreen committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    6f73ac3 View commit details
    Browse the repository at this point in the history
  4. [POI-816][HDRP]Migrating RTX resources

    Migrate HDRP Raytracing resources to IRenderPipelineResources, directly on GraphicsSettings.
    
    ![image](https://media.github.cds.internal.unity3d.com/user/3279/files/deb941b9-4a79-4e5f-942c-bc7d85c9d541)
    
    Also last minute add (see comments): Hidding [GPU Pipeline Tiers 0](https://github.cds.internal.unity3d.com/unity/unity/pull/22897) wrongly exposed resources in the UI (discovered when resolving conflicts)
    alex-vazquez-unity3d authored and Evergreen committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    b3e65ba View commit details
    Browse the repository at this point in the history
  5. Probe API revamp

    https://jira.unity3d.com/browse/LIGHT-1685
    
    **FYI: I've already landed this PR in `light-transport/unified-dev`, and am now bringing it back to trunk. Keep in mind the code changes have already been reviewed once. The documentation changes however have not.**
    
    This PR makes some changes to the public light probe API, in response to some issues I found while working on a compute based probe integrator. The changes are listed below.
    - Renamed `WaitForAsyncOperation` and `IsAsyncOperationComplete` to `Wait` and `IsComplete`. The async nature is implicit.
    - Added `IDisposable` to a few interfaces that were missing it.
    - Made `BufferSlice` carry a type annotation, ie. `BufferSlice<T>`. `BufferSlice.Offset` is now in _elements_, not in bytes.
    - Change `WriteBuffer` and `ReadBuffer` to take a `BufferSlice` instead of BufferID. This lets you write to and read from sections of buffers, which is more flexible. I added some helpers for if you want to use `BufferID` directly.
    
    I ended up having to make quite a few changes to documentation accordingly.
    pema99 authored and Evergreen committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    5a8683c View commit details
    Browse the repository at this point in the history
  6. [URP] RenderGraph CopyDepth pass injection point location now matches…

    … the non-RenderGraph path
    
    The RG and non-RG paths CopyDepth pass location in the frame is different, the RG path one must match the non-RG path for consistency with projects ported from the old renderer.
    
    This PR moves the CopyDepth pass to be executed before the Skybox pass, which is the same behaviour as the non RG path.
    manuele-bonanno authored and Evergreen committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    224e831 View commit details
    Browse the repository at this point in the history
  7. [VFX][UUM-51509] Fix Spawner Callbacks used with instancing

    This PR fixes issues when using spawner callbacks in instanced effects. Only the first instance was receiving the correct attributes from the spawner.
    ludovic-theobald authored and Evergreen committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    64af377 View commit details
    Browse the repository at this point in the history
  8. Fixed layered lit displacement.

    Fixed Layered Lit Displacement
    JulienIgnace-Unity authored and Evergreen committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    536f82b View commit details
    Browse the repository at this point in the history
  9. [URP] Fix screenspace shadows clashing when depth priming 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
    jonuuukas authored and Evergreen committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    f9cd627 View commit details
    Browse the repository at this point in the history
  10. Disable SPI after rendering the render request.

    Jira: https://jira.unity3d.com/browse/UUM-49454
    Fixed XR SPI is not disabled after processing the render request.
    thomas-zeng authored and Evergreen committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    f44618c View commit details
    Browse the repository at this point in the history
  11. Rendergraph 2D Optimizations - Remove Clear Commands

    Rendergraph Adoption POI https://jira.unity3d.com/browse/POI-817 
    Optimizations
    - Remove clear commands
    - Decrease number of passes
    - Merged passes together
    - Remove SetGlobalTextures
    kennytann authored and Evergreen committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    2c1c707 View commit details
    Browse the repository at this point in the history
  12. [URP] Render Graph rendering debugger fixes

    Rendering debugger pixel validation is broken when RG is enabled. If postprocessing is disabled, the Map Overlays are broken as well.
    
    This PR fixes all the remaining issues and rendering debugger should now be fully functional in the RG path.
    manuele-bonanno authored and Evergreen committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    eb09441 View commit details
    Browse the repository at this point in the history
  13. Added push marker global define

    Add PushMarker API to help profile shaders on platforms that supports it (PS5 only)
    alelievr authored and Evergreen committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    787c292 View commit details
    Browse the repository at this point in the history
  14. Add buginfo file for HDRP package

    Add buginfo file for HDRP package
    JulienIgnace-Unity authored and Evergreen committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    beeb0de View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2023

  1. [ShaderGraph] Compare Properties by ID instead of Ref

    Fix for this issue: https://jira.unity3d.com/browse/UUM-52909.
    
    Due to some perf improvements and caching, a previous comparison by reference was no longer valid in undo/redo (which undergoes serialization). This quick fix compares properties by ID instead of reference.
    Esmeralda Salamone authored and Evergreen committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    24b2be8 View commit details
    Browse the repository at this point in the history
  2. [URP] Globals API

    Implements new globals api for textures. Provides better resource tracking, with the possibility to reclaim memory early and prevents api misuse that the previous command buffer approach allowed.
    
    https://docs.google.com/document/d/1AocoeM9R3QGQi4KVMNc_k_24ZeuHNt0FH1coAJdALkU/edit#heading=h.xd8euqu66dx4
    mcc-unity authored and Evergreen committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    779d616 View commit details
    Browse the repository at this point in the history
  3. [Jira # UUM-52109] Fixing half res transparent hardware DRS off by 1

    Fixing issues with hardware DRS on console (manifestation is usually bright qnan pixels on the right of the screen). 
    Lowres transparent (aka half res transparent) can be off by one pixel with the hardware resolution dynamic scale. The reason is a small mismatch between RTHandle and the runtime. Unfortunately fixing this problem might require a heavier rewrite to ensure the RTHandle scale works well. As a fix we can compute the error of this scale and plumb it in as a custom DRS scaler (only for the HW path) and fix the issue. Issue only present on xbox as qnans in the border (triggered by only certain resolutions using hardware DRS with transparent lowres).
    kecho authored and Evergreen committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    d9b3105 View commit details
    Browse the repository at this point in the history
  4. [ShaderGraph] Update main preview continuously

    https://jira.unity3d.com/browse/UUM-47201 addressing some of the issues detailed here
    elizabeth-legros authored and Evergreen committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    51c8502 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2023

  1. Fix Prefab view cloud rendering

    Fix regression of cloud rendering being applied on top of the prefab view.
    dsuttor authored and Evergreen committed Oct 14, 2023
    Configuration menu
    Copy the full SHA
    b7320a0 View commit details
    Browse the repository at this point in the history
  2. URP APV Scenario Blending Support using Compute

    POI: https://jira.unity3d.com/browse/POI-816 - SRP production ready
    
    This PR adds "Scenario Blending" support to URP using Compute Shaders. It is meant as a replacement for https://github.cds.internal.unity3d.com/unity/unity/pull/27688, which was a non-Compute version. This PR has the advantage of being simpler, with less code changed for the core Probe Volume System. However, it does have the downside of not being able to run on platforms that do not support Compute Shaders.
    jrs-unity authored and Evergreen committed Oct 14, 2023
    Configuration menu
    Copy the full SHA
    61d53b1 View commit details
    Browse the repository at this point in the history
  3. [ShaderGraph] Property generation fixes (Exposed/Global/Material perm…

    …utations)
    
    Previously, various circumstances resulted in incorrect material property generation for shadergraph blackboard properties.
    
    Exposed Global -> Generates a material property, but this configuration undermines its globality and we shouldn't allow it.
    Hidden Material -> causes the material property to not generate, which means default values are ignored.
    
    This fix causes globals to always work with the `Shader.SetGlobal...` scripting API. Hidden Materials now generate a material property with the [HideInInspector] attribute, which allows default values to be saved.
    
    Also fixed some minor/cosmetic 'custom binding' related bugs.
    
    
    This is the implementation of: https://jira.unity3d.com/browse/PLATGRAPH-2177.
    
    Further details can be found here: https://docs.google.com/document/d/1u9RHjVAuHa-Wx7NWoQGGaN99GqU4-cePQJTdAOIhV1o/edit?usp=sharing
    Additional considerations for keywords: https://docs.google.com/document/d/1Q78mx1O24kxJcYabbEBt37a1WAg7p92i80lhBvn3wSM/edit
    
    This is approved as a part of: https://jira.unity3d.com/browse/POI-816.
    Esmeralda Salamone authored and Evergreen committed Oct 14, 2023
    Configuration menu
    Copy the full SHA
    ed82b04 View commit details
    Browse the repository at this point in the history
  4. update TestCaseFilters.asset to add to 5020_PathTracing_Depth_1 consoles

    update TestCaseFilters.asset for HDRP_DXR to add to 5020_PathTracing_Depth_1 to be excluded on consoles
    peterjohnlong authored and Evergreen committed Oct 14, 2023
    Configuration menu
    Copy the full SHA
    eb0ac09 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    dede2c8 View commit details
    Browse the repository at this point in the history
  6. [VFX] Add missing buginfo

    This PR adds missing buginfo files to VFX package and module
    julienf-unity authored and Evergreen committed Oct 14, 2023
    Configuration menu
    Copy the full SHA
    a9f99ea View commit details
    Browse the repository at this point in the history
  7. [ShaderGraph] Fix sprite previews for URP

    Sets default material properties that are needed by sprite previews. This is a bit of a hotfix- it's probably better if the sprite target were to create these as hidden material properties so that these default values could be setup.
    elizabeth-legros authored and Evergreen committed Oct 14, 2023
    Configuration menu
    Copy the full SHA
    7553a37 View commit details
    Browse the repository at this point in the history