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 #7521

Merged
merged 39 commits into from
Jun 30, 2022
Merged

Internal/master #7521

merged 39 commits into from
Jun 30, 2022

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.

JulienIgnace-Unity and others added 30 commits June 15, 2022 00:43
This PR improves a lot run time of HDRP playmode tests by re-enabling async compilation of shaders.
In the HDRP Test Runner itself, we enable async compilation before loading each scene and wait for all pending compilation to end before running the test.
Several workarounds had to be made for this to work:
- Render one frame with a camera set with a render texture at the resolution of the test in order to have correct aspect ratio and display all required objects to trigger compilation
- Run doBeforeTest at the same time in order to trigger any change in rendering that may need shader compilation.
- Reload the scene to reset time (that may have run an undeterministic amount of time because of async compilation)
- Disabled error logs in DrawProcedural functions when using loading shader. This is because when the loading shader is used it will not contain pass indices > 0 so any user code trying to use those will not work but it's not an actual error from the user. (draw call is skipped as it is now).

All playmode tests are roughly twice as fast.

https://unity-ci.cds.internal.unity3d.com/job/14361346/dependency-graph
Here is a non-exhaustive list of the things brought by this PR to the water system:
- Dynamic grid size based on the elevation.
- Fixing shader graph preview errors.
- Fix Nans.
- Change the number of bands band their distribution (swell, agitation, ripples)
- Fix shader graph errors.
- Update Gizmos and Icons.
- Change presets and reset behavior.
- Fix ambient Probe lighting
- Add a fade mecanic per signal
- Add a smoothness transition to simulate roughness.
- Correct the way the spectrum is generated to guarantee that the wave's travel speed takes into account the wave size.
- Fix the simulation speed being dependent on the simulation resolution.
- Remove procedural caustics.
- Support Max Amplitude estimation.
- Change the LOD pattern to be able to go to the horizon + increase the max number of LODs
- Fix a dissymetry in the spectrum for some wind orientations
- Support textures samplers for the foam and water mask.
- Add water currents + inheritance.
- Expose foam texture and tiling
![image](https://media.github.cds.internal.unity3d.com/user/1300/files/775f9b96-f20e-407b-a545-fa25c43dde47)
![image](https://media.github.cds.internal.unity3d.com/user/1300/files/2c8eb085-37b0-463a-a9cf-f03192b0a96d)
This PR improves the existing SSAO renderer feature in URP. 
We wanted to give users more options to control performance vs quality. 

New AO Method dropdown
  * Interleaved Gradient Noise (Original method)
  * Blue Noise (New)

New Blur Quality Dropdown
  * High: Bilateral (Original method)
  * Medium: Gaussian (New)
  * Low: Single-Pass Kawase (New)

Improved DownSampling:
It will now not only affect the AO pass but also the blur passes

New Samples Dropdown:
High(12), Medium(8) and Low(4) giving ~10-15% performance gain

New Falloff Field:
Option to control the falloff so the AO pass can early out and skip unnecessary work

Merged passes:
Merging of the AfterOpaque and the last blur passes

New AO Depth test:
To avoid casting AO in incorrect places.
When adding the NamedBuildTarget (https://ono.unity3d.com/unity/unity/pull-request/125925/_/platform/server/build-target) as part of the introduction of the DedicatedServer subtarget, we needed to mark the old PlayerSettings API using BuildTargetGroup as obsolete. The API updater could not be used in this case and so we had a blocker as all the usages in our packages were required to be updated first.
This PR completes the task as we coordinate with the different teams to make the update on their side and unblock us.
The Render Graph PR that recently landed caused a regression in Copy Depth pass and also there was a complication with Rendering Layer PR which broke RenderGraph path on deferred renderer.

This PR includes these two minor fixes
…nd shadergraph targets

Vertex color was incorrect getting applied in the pixel shader.
Fixes https://jira.unity3d.com/browse/UUM-1921
https://jira.unity3d.com/browse/RND-159

* Removed Profile list from HDRP Global Settings, now completely handled by volumes
* Changed **DiffusionProfileOverride** to not override profile list but accumulate, and renamed to **DiffusionProfileList**
* wrote what's new
* updated all relevant docs

As mentionned in doc, this should be non breaking.
Benefit is that now diffusion profile management is more centralized
Also additive accumulation of profiles makes it easier to handle when for example only 1 additional diffusion profile is needed in an area of a game.

Added a migration step to move profile list from the global settings to the default volume inside the global settings.
Upgraded all test projects (because migrations steps don't work in test projects), and cleaned up diffusion profile usage in some test cases

HDRP Global settings:
![image](https://media.github.cds.internal.unity3d.com/user/2154/files/514313a3-9324-4158-8e9b-01f5907ff74c)

Volume debugger: you can see volume with higher priority use the first slots in the final list, profiles that don't fit are ignored and don't throw an error
![image](https://media.github.cds.internal.unity3d.com/user/2154/files/24280df4-29e9-42cb-994b-8289b1c571ac)
…is enabled

Fixes a bug from blitter change that cause incorrect output in post process pass when using URP 2D.
This PR re-introduces the deprecations that were planned with the new RendererList PR (https://ono.unity3d.com/unity/unity/pull-request/136991/_/graphics/rendererlist_upgrade). We cut out the deprecations last-minute as they were causing conflicts with the ongoing SRP2Core efforts.

As part of this PR, I also updated both HDRP and URP to use the new API.

POI https://jira.unity3d.com/browse/RND-175
The purpose of this PR is to fix one major shader compilation issue and several graphics test related regressions that were caused by the automatic alpha-to-coverage change in URP.
Specifically:

- The SpeedTreeV8 shaders were failing to compile due to a compiler bug. A workaround has been added for this case.
- Updated test images for SpeedTreeV8 in URP Terrain and also adjusted image difference threshold in order for it to pass with MSAA and non-MSAA test variants due to XR
- Added missing test images for Switch for 250_AlphaToCoverage and also disabled backbuffer usage to work around another known issue related to camera projection
Bug Jira:
https://jira.unity3d.com/browse/UUM-5704

enabling depth priming when MSAA is on breaks the depth normals prepass, this is because the normal attachment has the wrong sample count, since depth priming causes the depth texture to be MSAA'd.

See this forum thread for more info:
https://forum.unity.com/threads/need-clarification-on-urps-use-of-the-depth-prepass.1004577/#post-8203467
…ale and slight improvement to central pixel filtering

As the title say there are a few improvements to ghosting. 

Mostly based on: 
 - Change the size of the color AABB based on velocity (smaller AABB when moving, larger when static) 
 - Change blend factor w/ velocity. 
 - Use aggressively clamped luma to do history contrast and to history contrast based blend factor on a lerp situation based on anti-flickering. 

See the following pathological cases (noisy background and high contrast) 

https://media.github.cds.internal.unity3d.com/user/582/files/f7314079-dd5c-4c66-b175-6de7c9472954

https://media.github.cds.internal.unity3d.com/user/582/files/712ddd61-d2d7-460a-9c90-5fd77aca4cb3


Also: 
 - Changed the central color filtering a bit, leading to a bit sharper result. 


https://media.github.cds.internal.unity3d.com/user/582/files/63f84d59-b601-4ebb-aeb9-0e8311f82cb7

And added control for jittering scale. Lowering the value leads to more aliased, but less jittery and less blurry results. (super zoomed results) 


https://media.github.cds.internal.unity3d.com/user/582/files/e6636651-ebeb-48cc-aa42-8fb85335691a
Fix DoF artifacts when the physically based mode is used. 
https://fogbugz.unity3d.com/f/cases/1375978/
https://fogbugz.unity3d.com/f/cases/1413534/

Some previous tiling optimizations left the pb dof mode in a bad state. This PR fixes many small issues in the shaders:
- Fixed "sticky" CoC reprojection when TAA and pb DoF is enabled
- Fixed tiling artifacts from early exit in low res dof pass
- Fixed (more) tiling artifacts by disabling the per-tile layer classification 
(the difference in sampling was visible in neightboring tiles)
- Fixed a corner case with background blending

Before:
![image](https://media.github.cds.internal.unity3d.com/user/1822/files/deabc55a-83ad-4237-9fc5-f99bda9a7c35)

After:
![image](https://media.github.cds.internal.unity3d.com/user/1822/files/b93dd569-39bd-4b46-9eb3-63006d533a2c)
- Remove `VFX_USE_RIM_LIGHT` in CubeMesh & VFXCubeTestOutput
- Update to produce the same kind of input using only ShaderGraph

There was an issue revealed by the instancing PR, this test was already inconsistent on some platform and the weird changes has been propagated to MacOS run.
…ransparency

Fogbugz fix: https://fogbugz.unity3d.com/f/cases/1423890/

Traditionally transparency objects occlude virtual texturing feedback, causing opaque objects that use virtual texturing to not load higher mips.
Because we are seeing the opaque geometry through a glass, this causes visual artifacts (missing texture or lower mips loaded).

This change supports seeing through glasses, by dithering the VT feedback output based on alpha / transmittance. This will allow transparency to behave naturally with virtual texturing transparency, with aboslutely no checkbox / settings for the user.

Test project: https://drive.google.com/file/d/1G_nq9APlvprwXzRWvo_4VVCIijKyvagH/view?usp=sharing

Before and after on attached test project (notice black background):
![image](https://media.github.cds.internal.unity3d.com/user/3327/files/15c9af95-1fdc-437e-bb30-b1ae9351aa91)

Fullscreen Debug Mode _RequestedVirtualTextureTIles_ from another angle:
![image](https://media.github.cds.internal.unity3d.com/user/3327/files/286be468-8ef8-4863-8911-a17bc68c79dd)

This change was implemented through blend modes instead of UAVs in order to keep MSAA compatibility and to avoid costly performance cost of writing to UAV from pixel shader.
Lighting attenuation data is stored as float in shader. The Lighting function took it incorrectly as half which would cause light falloff clipping with large high intensity lights on mobile platforms. This only affected pixel light path while the vertex light path was correct.
The Lighting function now takes attenuation as float.
This PR updates 5 reference images on iPhone.
* 008_AdditionalLights.png 
* 011_PBS_EnvironmentBRDF_SpecularSpheres.png 
* 011_PBS_EnvironmentBRDF_SpecularSpheres_deferred.png 
* 026_Shader_PBRscene.png 
* 026_Shader_PBRscene_AccurateGBuffer.png 

As well as removing compression for small color lookup texture.

The tests were broken when this PR landed in trunk
https://ono.unity3d.com/unity/unity/pull-request/140990/_/graphics/textures/upgrade-astcenc-3.5
Add a debug view to be able to visualize motion vectors intensities. The standard debug view is a bit hard to read w.r.t intensities. 

https://fogbugz.unity3d.com/f/cases/1430303/

![2022-05-24_14-25-31](https://media.github.cds.internal.unity3d.com/user/582/files/c788eb2f-144c-400c-8f9a-aa296c7b1e45)
… package

In platforms that support HW raytracing but do not support the denoising package, we were getting a compile error if the package was in the project manifest. 

With this PR we only enable the denoising code path on windows, since this is the only platform we support path tracing with denoising.

Related slack discussion: https://unity.slack.com/archives/GHD5LADU7/p1654610056852229
fix for case 1389330 and post-processing overall. In Camera Stack + MSAA scenarios it's strange this didn't come up earlier. This being true automatically resolves the render target which leads the next camera to render to empty target thus breaking the stack. This fix checks whether it's the last camera and only does this then

FORMATTING CHANGES WERE REVERTED IN NEWEST CHANGESET
…alf4> style syntax

We have helper macros for declaring samplers in shaders in a cross-platform way. However, these macros have been using outdated method of magically named Texture2D_float/Texture2D_half that were historically used for propagating the sampler precision to the shader translation process. However, with that approach FXC will treat the samplers as float and therefore we cannot generate 100% accurate shader code being generated for mobile targets.

This PR changes the macros to use Texture2D< half4 > style declarations which gives FXC all the needed information about the data types which therefore is able to add proper precision info on the sample operation and the following calculations on the data. This way the produced GLSL/Metal/Vulkan code will use correct precision for all of the processing.
…Asset Settings

Jira:
https://jira.unity3d.com/browse/URP-1406
https://jira.unity3d.com/browse/RND-175

As a preparation step to enable RenderGraph CI tests, it is necessary to have the RenderGraph setting in the URP asset setting, so it can be enabled without having to duplicate test projects
Initiative: https://jira.unity3d.com/browse/RND-205
JIRA card: https://jira.unity3d.com/browse/URP-1152

Currently URP has a lot of missing documentation for public API, over 600 functions, enums, etc. This PR adds minimal documentation to each of those and allows us to enable the "Find missing docs - urp" job on Yamato, preventing future developers from adding public API without documentation.
https://jira.unity3d.com/browse/ANT-692

Added the reference images for Apple Silicon testing for the 5 URP projects. This is extending our coverage.
Only images and .meta files were added in this PR.
[Fixing the clamp happening on the sum of ray tracing samples instead of per sample (case 1430042).](https://github.cds.internal.unity3d.com/unity/unity/pull/10879)

[Fix quad-like artifacts around silhouettes of moving objects when TAA](https://github.cds.internal.unity3d.com/unity/unity/pull/10881)

[[HDRP] Spec occlusion fallback on normal](https://github.cds.internal.unity3d.com/unity/unity/pull/10882)

[[HDRP] Fix error on material import](https://github.cds.internal.unity3d.com/unity/unity/pull/10883) 

[Fix a rounding issue in ray traced reflections at half resolution (case 1416403).](https://github.cds.internal.unity3d.com/unity/unity/pull/10884)

[Fix cullmode toggle shifting the material UI when enabling it](https://github.cds.internal.unity3d.com/unity/unity/pull/10886)

[Fix a discrpency between recursive rendering and path tracing for refraction models (case 1428846).](https://github.cds.internal.unity3d.com/unity/unity/pull/10876)

[Fix custom pass documentation script](https://github.cds.internal.unity3d.com/unity/unity/pull/10899)

[Disable Volumetric Clouds for Default Sky Volumes](https://github.cds.internal.unity3d.com/unity/unity/pull/10900)

[Fix custom pass reordering bug in inspector](https://github.cds.internal.unity3d.com/unity/unity/pull/10926)

[Fix the default DXR volume not having any DXR effects enabled (case 1418429)](https://github.cds.internal.unity3d.com/unity/unity/pull/10941)

[Update misleading tooltip in the environment lighting in HDRP](https://github.cds.internal.unity3d.com/unity/unity/pull/11007)

[Bugfix 1409782: "Switching back & forth the up direction f the light anchor when the elevation is a multiple of 90 looses the settings"](https://github.cds.internal.unity3d.com/unity/unity/pull/10943)

[Bugfix 1417894: Fixed reflection issue upon scene filtering](https://github.cds.internal.unity3d.com/unity/unity/pull/10891)

[Fixed leaks in ray tracing effects due to missing ambient probe for ray tracing effects (case UUM-589). ](https://github.cds.internal.unity3d.com/unity/unity/pull/10938)

[[Fogbugs # 1423891] Fixing PBR Dof corruption on camera cuts](https://github.cds.internal.unity3d.com/unity/unity/pull/11061)

[Disable renderer list culling for forward depth prepass and render forward opaque passes](https://github.cds.internal.unity3d.com/unity/unity/pull/11029)

[Fix Issue with DOTS and Look Dev](https://github.cds.internal.unity3d.com/unity/unity/pull/10908)

[Fixed issue 1394667: [HDRP] Noisy top shadows when using 'High' Filtering Quality with Tesselated Meshes (Lit Tesselation)](https://github.cds.internal.unity3d.com/unity/unity/pull/11012)

[[Jira #UUM-1294 ] Fix culling plane generation for HDRP point lights and spot lights ](https://github.cds.internal.unity3d.com/unity/unity/pull/11064)

[Async compute doc](https://github.cds.internal.unity3d.com/unity/unity/pull/11124)

[Fix Decal Layer Texture lifetime in rendergraph](https://github.cds.internal.unity3d.com/unity/unity/pull/11016)

[Fix Missing Reference Exception in graphics compositor ](https://github.cds.internal.unity3d.com/unity/unity/pull/11284)

[[Docs] Add missing using statements in example script](https://github.cds.internal.unity3d.com/unity/unity/pull/11315)

[[Fogbugz # 1418466] Fixing quarter resolution dof artifacts when dynamic resolution rendering changes.](https://github.cds.internal.unity3d.com/unity/unity/pull/11205)

[[Fogbugz # 1418461] Fixing distortion pyramid color for DRS](https://github.cds.internal.unity3d.com/unity/unity/pull/11164)

[Fix issues with ray tracing effects and SSGI temporal reprojection issues with dynamic resolution (case 1418319, 1418320 and 1415159)] (https://github.cds.internal.unity3d.com/unity/unity/pull/10928)
With the branch off to 23.1 we can update the graphics packages to 15.0.0.
The bump was done with the ant-package-bumper (https://github.cds.internal.unity3d.com/unity/ant-package-bumper).
- Fix Standalone XR compilation error introduce by Fullscreen master node PR
- Fix performance test on PS4 failing due to change in area light shadow
- Fixed many obsolete screenshots of Yamato HDRP in playmode / runtime
- Update every screenshots of standalone DXR
sebastienlagarde and others added 9 commits June 28, 2022 09:45
…check.

Fixing a broken script in URP's Post processing project.
The script is used for a Motion Blur test but breaks GameCoreScarlett + GameCoreXBoxOne because it's trying to access XR Settings that need to be in a #if conditional as they are not available there. A jira task will be created to address this issue so we can no longer get these kind of breakages but this PR focuses on getting the CI jobs back running.
Fix corner case when motion vector is applied on line using `targetOffset`, the VFXLoadParameter was missing.
This PR is adding the .buginfo file to URP folders for the Reducing Instabilities program. It is being added to these folders:

* Packages\com.unity.render-pipelines.universal
* Tests\SRPTests\Packages\com.unity.testing.urp
* Tests\SRPTests\Packages\com.unity.testing.urp-upgrade
* Tests\SRPTests\Projects\UniversalGfxTestStereo
* Tests\SRPTests\Projects\UniversalGraphicsTest_Foundation
* Tests\SRPTests\Projects\UniversalGraphicsTest_Lighting
* Tests\SRPTests\Projects\UniversalGraphicsTest_PostPro
* Tests\SRPTests\Projects\UniversalGraphicsTest_Terrain
* Tests\SRPTests\Projects\UniversalUpgradeTest

Is is *NOT* being added to these URP related folders, as they have other owners:

* Tests\SRPTests\Projects\BatchRendererGroup_URP
* Tests\SRPTests\Projects\UniversalGraphicsTest_2D
* Tests\SRPTests\Projects\VisualEffectGraph_URP
Fix https://fogbugz.unity3d.com/f/cases/1426394/

When a material has a diffusion profile that is not defined in the global settings, the material preview will now still render it with the diffusion profile.
This is helpful when for example a diffusion profile is assigned in a volume local to a scene, but you still want to inspect the material in the editor

Note: material thumbnail in the project will still be purple because there's no callback to hdrp that we can override in that case
Note 2: the pr is ready for testing but not for merging, it has conflicts with one in the next batch
Fix Fallback shaders for URP and HDRP when pipeline for the shader is not active.

https://jira.unity3d.com/browse/UUM-1417

The far line is HDRP, Closest 5 sphere is Builtin shaders as reference. URP line in between,
![ShaderFallback](https://media.github.cds.internal.unity3d.com/user/5932/files/2845592d-4bac-4e27-82ed-b74811f3caeb)

Beware that some materials invisible when used on spheres (Sprite Mask, VR shaders).
Some shaders fallback to the normal Builtin shaders so they remain visible.
The main check that object visible when corresponding pipeline active. It means that shaders may not be pink.
https://jira.unity3d.com/browse/UUM-6685

- Create or open a VFX Graph
- Right click to open the context menu
- Create an Output Particle Lit Decal

=> An exception is thrown in the console and the output context is broken (see screenshot)

Actual result
![](https://jira.unity3d.com/secure/attachment/491614/Unity_Q0marrXciA.png )
Expected result
![](https://jira.unity3d.com/secure/attachment/491615/Unity_Mp1e7nkKOj.png )
@UnityAljosha UnityAljosha requested review from a team as code owners June 30, 2022 07:58
@github-actions
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 223d810 into master Jun 30, 2022
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.