-
Notifications
You must be signed in to change notification settings - Fork 817
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 #8123
Merged
Merged
Internal/2022.3/staging #8123
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ution. Jira : [UUM-83862](https://jira.unity3d.com/browse/UUM-83862) The 'resolution' field of the Reflection Probe is an integer, but it is displayed as an enum value (256, 512, etc.). When comparing two resolution values, they should be treated as integers, but they were being treated as enum values.
…ullscreen Master Stack pages. Added a reference to the custom renderer feature page. Added a reference to custom-post-processing.md on the customizing-urp.md page. Implemented the same structure as in the 6000 version. Copied Fullscreen Master Stack pages, the feature is implemented in 2022.3 and was not documented in URP. Converted the formatting from the main manual to URP.
Part 7 of minor fixes from feedback tickets Jira tickets: - https://jira.unity3d.com/browse/DOCG-5586 - remove incorrect multidisplay info (already removed in U6 docs) - https://jira.unity3d.com/browse/DOCG-4812 - add experimental to VFX blocks (already done in U6 docs)
Fix anchor link to light limit in 2022.3 docs Jira ticket: https://jira.unity3d.com/browse/DOCG-5291
…re node in Shade… UUM-90053: Prevent shader warnings when using the NormalFromTexture node in ShaderGraph
…sk not blending UUM-78038 There were issues where blending would occur further than the maximum distance for cascade shadows and could be broken depending on the camera view. The alpha value of EvalShadow_GetSplitIndex is intended for blending between cascades. This is also used where the last cascade and shadowmask are blended, which is why the blending is not working properly. Modified to blend cascade shadows and shadowmask in the same way as URP. The images below compare the modified HDRP and URP. * Blending of cascade shadows and shadowmask.  * To visualize the blending, cascade shadows are represented as 0 (black area) and shadowmask as 0.5 (gray area). Blending occurs at the maximum distance of cascade shadows.  Comparison of original HDRP and modified HDRP as the camera distance increases. You can see that the blending works properly regardless of the distance. * Original  * Modified 
Jira: [UUM-72279](https://jira.unity3d.com/browse/UUM-72279) As reported in JIRA, the Scene view flickers due to `NaN` output from the hair shader. It is because in `GetHairAngleWorld`, `angles.sinThetaI` can exceed the range [-1, 1] depending on the input hair `normalWS`. (The `L` vector may not be a unit vector in some cases.) * `half3x3 localToWorld = GetLocalFrame(bsdfData.normalWS, bsdfData.hairStrandDirectionWS);` * `half3 L = mul(localL, localToWorld);` I was able to see that this `NaN` problem could happen if both `T` and `L` vectors are a unit vector due to precision. `angles.sinThetaI` can slightly exceed 1.0 so the `FastASin` result will be `NaN` in this case.  By explicitly clamping the angles, we can prevent `NaN` output from `FastASin` calculation.
…ormWorldToShadowCoord Jira: [UUM-73947](https://jira.unity3d.com/browse/UUM-73947) This PR adds ScreenSpace Shadow coord transform to fix incorrect SS shadow sampling from some shaders, especially for ShaderGraph shaders. URP shaders support a correct SS shadow sampling by directly using `inputData.shadowCoord` which has a cascaded position or a screen position depending on `_MAIN_LIGHT_SHADOWS_SCREEN`. However, since we cannot use vertex output in ShaderGraph, it may be difficult to calculate a correct shadow coord using only `TransformWorldToShadowCoord` unless the user manually adds `_MAIN_LIGHT_SHADOWS_SCREEN` check if SS Shadow is enabled. | Before | After | | -- | -- | |||
Fix Graphics Corruption on Silicon Device which can generates artifact in every single Unity rendering.  The problem was due to an unexpected call from `Graphics.DrawMeshNow` while *not* being within a Repaint event (see also this [OnSceneGUI documentation](https://docs.unity3d.com/ScriptReference/Editor.OnSceneGUI.html)) - Issue with while rendering mesh in wireframe with mesh module in ParticleSystem, initial repro 🔽 https://media.github.cds.internal.unity3d.com/user/42/files/45a4c51e-b236-4c3a-907a-5610c5e7b55b - Found a repro of the wrong DrawHull in HDRP (this is a theoretical repro, I tested on windows) 🔽 https://media.github.cds.internal.unity3d.com/user/42/files/9057b6d4-c8b4-481e-9421-783e16cbbb6f - Checked other usage of DrawMeshNow in VFX - With DrawCurve ✅  - With Draw Context Border ✅  - With Gizmo rendering `Graphics.DrawMeshNow`, we can trust the `EventType.Repaint` https://github.cds.internal.unity3d.com/unity/unity/blob/eaea05a25d195f7c6e58128434cc9a5130ef3b91/Packages/com.unity.visualeffectgraph/Editor/Gizmo/VFXGizmo.cs#L88
… prefix. Our resolution for name conflicts couldn't handle biasing for conflicts where an underscore was already present. Under some circumstances it could allow identifiers to conflict with unity macros (such as `_Weight`) or result in double underscore (such as `__Weight`); the double underscore is reserved in some environments and therefore invalid for userspace.
…used and fix renderer features Fix UUM-86922 UUM-83351
…ta.OnDestroy Fix error in Dedicated Server [UUM-75237](https://jira.unity3d.com/browse/UUM-75237) What happened is that when destroying a UniversalCameraAdditionalData, in order to clear the buffer, the code was actually constructing the URP pipeline in case the pipeline was null. Fix do the same without trying to construct the pipeline if it is not constructed (aka multiple pipeline scenario or headless server).
This is an almost automated backport based on https://github.cds.internal.unity3d.com/unity/unity/pull/55248 for branch 2022.3/staging requested by [[email protected]](mailto:[email protected]). This backport was created by [Backport Automation](https://backports.ds.unity3d.com/). Make sure that changes are correct!
Backport fixes from the following PRs: - https://github.cds.internal.unity3d.com/unity/unity/pull/57104 - https://github.cds.internal.unity3d.com/unity/unity/pull/57144 - https://github.cds.internal.unity3d.com/unity/unity/pull/57377 - https://github.cds.internal.unity3d.com/unity/unity/pull/57397 - https://github.cds.internal.unity3d.com/unity/unity/pull/57449 - https://github.cds.internal.unity3d.com/unity/unity/pull/57488 - https://github.cds.internal.unity3d.com/unity/unity/pull/57532 - https://github.cds.internal.unity3d.com/unity/unity/pull/57161 - https://github.cds.internal.unity3d.com/unity/unity/pull/57564
Forward port of https://github.cds.internal.unity3d.com/unity/unity/pull/56678 I didn't use the automatic tool because 100_Fog generated a conflict.
…ith a clear coat value of 0 Jira : [UUM-84980](https://jira.unity3d.com/browse/UUM-84980) **Short Description:** When 'Clear Coat'(Surface Option) is activated in the Shader Graph, _MATERIAL_FEATURE_CLEAR_COAT is enabled regardless of the actual Clear Coat value. In this case, if the coatMask value is 0 in the EvaluateBSDF_ScreenSpaceReflection() of Lit.hlsl, there is an issue with specular calculation (no problems arise with small values such as 0.001 or 0.00001). Therefore, I resolve this issue by handling the Clear Coat calculation even when the value is 0. **Long Description:** - When 'Clear Coat'(Surface Option) is activated and the clearCoat value is 0 in the shader graph, the ssrLighting value in EvaluateBSDF_ScreenSpaceReflection() is not zero. - For HDRP/Lit with a 'clear coat' value of 0, the ssrLighting value is 0, 0, 0, 0. (Therefore, no issue occurs) - In the 'Render SSR' pass, during the 'ScreenSpaceReflectionsTracing' call, the rays are killed at the killRay step for HDRP/Lit, but they pass through in the shader graph. - This issue arises due to different normalData.perceptualRoughness values, which are computed in the ForwardDepthPrepass. - During the ForwardDepthPrepass when calculating normalData for each Object, the value changes depending on whether the _MATERIAL_FEATURE_CLEAR_COAT keyword is enabled. - For HDRP/Lit, in LitGUI.cs, the _MATERIAL_FEATURE_CLEAR_COAT is disabled when the clear coat value is 0, but in the shader graph, the keyword is enabled based on the 'Clear Coat'(Surface Option) regardless of the actual Clear Coat value. - Due to the nature of the shader graph, accessing the 'Clear Coat' value of the Fragment Node directly is difficult, and the variable name connected to the Clear Coat value can be set differently for each user, making it challenging to check if the Clear Coat value is 0 in ShaderGraphAPI.cs. (See the code below for reference) ``` float _Property_622a98e8ad5742088e5c548ea3797750_Out_0_Float = _Coat; surface.CoatMask = _Property_622a98e8ad5742088e5c548ea3797750_Out_0_Float; ``` - Therefore, I modified EvaluateBSDF_ScreenSpaceReflection() in Lit.hlsl.
…ng into the material preview inspector Fixes: [UUM-84064](https://jira.unity3d.com/browse/UUM-84064), by binding an empty spherical harmonics buffer when a preview camera is detected.
**This is a partial backport based on https://github.cds.internal.unity3d.com/unity/unity/pull/58698 for branch 6000.0/staging** Minor fixes from graphics docs feedback tickets. Jira tickets: - https://jira.unity3d.com/browse/DOCG-6327 - fix link to DOTS instancing docs - https://jira.unity3d.com/browse/DOCG-6328 - remove link to missing sample - https://jira.unity3d.com/browse/DOCG-6294 - remove note from min and max - https://jira.unity3d.com/browse/DOCG-6289 - remove incorrect use of 'naming conventions' - https://jira.unity3d.com/browse/DOCG-5082 - add link to RenderingLayerMask API - https://jira.unity3d.com/browse/DOCG-5803 - add link to depth texture information
…can prevent opening a VFX How to reproduce: 1. Open the attached “IN-82864” project 2. In the Assets folder open the “EnemyDeath” VFX Graph file 3. Observe the Console log and the Windows prompt Expected result: VFX Graph window opens as intended without any errors Actual result: VFX Graph window doesn’t open, a Windows prompt “Select an app to open this .vfx file” appears and an error is logged into the console Reproducible in: 2022.3.38f1, 6000.0.22f1 Reproducible on: Windows 11 Not reproducible on: No other environments tested Note: Not reproduced internally by CQA  [Provided file](https://jira.unity3d.com/secure/attachment/1568363/EnemyDeath.vfx)
…raph **This is an backport based on https://github.cds.internal.unity3d.com/unity/unity/pull/59076.** Add note about SRP Blitter API and Shader Graph. Jira ticket: https://jira.unity3d.com/browse/DOCG-5341
**This is a backport of https://github.cds.internal.unity3d.com/unity/unity/pull/59034** Minor docs fixes for January 2025, from user feedback. Jira tickets: - https://jira.unity3d.com/browse/DOCG-5765 - clarify underwater settings in HDRP
…ls in HDRP **This is a backport of https://github.cds.internal.unity3d.com/unity/unity/pull/59117** Add note about converting read-only materials in HDRP Jira ticket: https://jira.unity3d.com/browse/DOCG-5432
… when the original resolution is odd Fixed black border artifact when using DLSS at certain resolution. The issue is that DRS causes the camera to have odd resolutions which the downsampled SSAO algorithm didn't handled well.
…ariants when "Strip Unused Variants" is disabled (UUM-91646) This PR does the following: - Fixes UUM-91646 - Makes sure that when "strip unused variants" is disabled, every keyword URP strips out or prefilters is included - Adds editor tests for this and removes some redundant ones
Minor docs fixes for January 2025, from user feedback. Part 2. Jira tickets: - https://jira.unity3d.com/browse/DOCG-6479 - move experimental warnings to below h1s - https://jira.unity3d.com/browse/DOCG-6481 - add a link to RenderDoc from shader debugging landing page
This change backports the FSR banding fixes from #49299 to 2022.3.
… is disabled This PR fixes HDRP sky rendering when Camera Relative Rendering is disabled. `ComputePixelCoordToWorldSpaceViewDirectionMatrix()` in `HDCamera.cs` contains: ``` ... if (useGenericMatrix) { var viewSpaceRasterTransform = new Matrix4x4( new Vector4(2.0f * resolution.z, 0.0f, 0.0f, -1.0f), new Vector4(0.0f, -2.0f * resolution.w, 0.0f, 1.0f), new Vector4(0.0f, 0.0f, 1.0f, 0.0f), new Vector4(0.0f, 0.0f, 0.0f, 1.0f)); var transformT = viewConstants.invViewProjMatrix.transpose * Matrix4x4.Scale(new Vector3(-1.0f, -1.0f, -1.0f)); return viewSpaceRasterTransform * transformT; } ... ``` Here the view matrix that was used to build `viewConstants.invViewProjMatrix` has translation component if Camera Relative Rendering is disabled when it shouldn't.  Scene View  Game View, bugged  Game View, fixed
… docs **This is a backport of https://github.cds.internal.unity3d.com/unity/unity/pull/59127** Add steps to the 2D sprite lit shader graph URP docs, to clarify connecting up transparency/alpha, and setting the normal map input. Response to user feedback. Jira tickets: - https://jira.unity3d.com/browse/DOCG-6464 - https://jira.unity3d.com/browse/DOCG-6465
…a warning This is to fix some warnings when using the multiplayer VR template and creating a build. Some shaders generated via shadergraph were doing an implicit truncation of values (specifically the 2 UV sets passed to the UnityMetaVertexPosition function). This has been fixed. Jira: https://jira.unity3d.com/browse/UUM-84269
This is an **edited backport** of https://github.cds.internal.unity3d.com/unity/unity/pull/58119, which fixes some issues with the blitting documentation in URP. Jira ticket: https://jira.unity3d.com/browse/DOCG-6268
It appears that you made a non-draft PR! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please read the Contributing guide before making a PR.
Checklist for PR maker
need-backport-*
label. After you backport the PR, the label changes tobackported-*
.CHANGELOG.md
file.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.