-
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/6000.0/staging #8122
Merged
Merged
Internal/6000.0/staging #8122
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
… camera rendering in custom passes Rendering was broken after using the override camera rendering function in custom pass utils because of the state of the global CBuffer during render graph was in the future.
… 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.
…graph2D Fix UUM-83013
…ctive cameras This PR fixes [UUM-86686](https://jira.unity3d.com/browse/UUM-86686). In DebugDisplay.UpdateCameraFreezeOptions, the s_CameraNames list grow each time this method is called. This PR adds a "None" string when initializing the list, instead of doing it every time a camera is registered on unregistered.
Sample APV to get proper reflection probe normalization when doing SSGI. Implements https://jira.unity3d.com/browse/UUM-88018.
Jira: UUM-83678 Steps to reproduce: 1. Import the provided package 2. Open the VFX VFXG_PropertyOrdering 3. Open the Blackboard. 4. On the blackboard, try to re-order the different inside the category Actual results: -Property inside the Category cannot be ordered. -Also, the Category displayed in the Inspector when selecting the output are not in sync with the Order of the blackboard. -a mismatch of category order appears to be possible between the "ALL" tab and the "Properties" tab. Expected results: -Property inside Category should be orderable like when outside of properties. -When reordering Categories inside the Blackboard, the order should be reflected in the instance Inspector. -The Category order should be in sync between the different tabs. Reproducible with versions: 6000.0.20f1 Not reproducible with versions: 2022.3LTS
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
…t (UUM-83299) Fixes UUM-83299.
Fix shader sampling color pyramid after distortion.
Memory corruption / crashes when releasing APV data: https://jira.unity3d.com/browse/UUM-76437
…ld process without RP creation This issue appeared after https://github.cds.internal.unity3d.com/unity/unity/pull/54848 PR landed. It prevented RP creation and rendering from scene loading in the middle of the Building process. Now whenever we build we may have a situation when there's no current pipeline as no one called rendering. It should be okay but some of the API called GetRenderer and didn't dispose them after. To prevent this we check if URP is not ready yet and Destroy all existing Renderers.
…n in to account with ShadowMasks (UUM-83459) * Fixes UUM-83459. * Improves the Lighting test project (See Comments to reviewers)
This PR fixes an issue with the 2D renderers getting information about the SRP and the status of the Shaders under SRP. This caused an instability in the 080_TilemapRenderer_GPUSkinning URP test. The test was enabled again to validate this issue.
When the shadow mask mode was not used, we were still saving some 0 byte files, and this was creating some issues as the ticket descibes. https://jira.unity3d.com/browse/UUM-85411
…ettings set up Fix [UUM-86162](https://jira.unity3d.com/browse/UUM-86162) where information used to display helpbox for warning about miss configuration are not initialized correctly. The root of this issue is that the HDCamera structure is only correctly initialized for rendering. So if the camera do not render, there is missing informations such as FrameSettings. Also the way miss configuration was deduced is optimised here by actually redoing all the steps of the aggregation to understand at which point the miss configuration disable it. This also fix case of negative dependencies that was not covered. Along with this, there was a sibling method checking both volume and frame settings. I separated it to only check volume and proceed in a similar way. Though in case of volume, it still rely on HDCamera. The improvement is that we do not try to create HDCamera that are never updated and can lead to issue. Now it skip if never created from runtime part. Visual display is still the exact same for user and this can be slightly more costly (but not that much) as we recreate the frame settings aggregation.
…sabled while pending placement Jira: https://jira.unity3d.com/browse/UUM-90709 This PR addresses a reverses the changes made in https://github.cds.internal.unity3d.com/unity/unity/pull/56366 and provides an alternative way to fix the crash. When an HDAdditionalLightData is disabled, it contains an HDLightRenderEntity which is destroyed. When preserveCachedShadow is set to true, since the light is not evicted from the Atlas, In HDCachedShadowAtlas.m_RegisteredLightDataPendingPlacement, we end up with an entry that points to the older, now destroyed HDLightRenderEntity, causing a crash. This PR fixes this by ensuring that even when preserveCachedShadow is set, we evict the light if it has not been yet placed in the atlas. *[The PR comment commands commands and workflows to ready and land PR's can be found in the [pipeline documentation](https://internaldocs.unity.com/editor_and_runtime_development_guide/DevelopmentProcess/pr-process/evergreen-merge-queue/#rejoin-the-queue).]* *[Description of feature/change. Links to screenshots, design docs, user docs, etc. Link to Jira if applicable. Remember reviewers may be outside your team, and not know your feature/area that should be explained more.]*
…e a failing SRP creation Initial issue was connected to the GRD (UUM-78811). I couldn't replicate the crash in the Building process locally by some reason but there was an another issue. Whenever the project got built it will stop rendering and spam Blitter issue (UUM-83608). It appeared because RenderPipeline tried to recreate after an exception but failed and never succeed. Initial exception that was appearing after the Build was `InsufficientExecutionStackException: Insufficient stack to continue executing the program safely. This can happen from having too many functions on the call stack or function on the stack using too much stack space.` It's a bit long but here's the full stack: ``` InsufficientExecutionStackException: Insufficient stack to continue executing the program safely. This can happen from having too many functions on the call stack or function on the stack using too much stack space. UnityEngine.ScriptableObject.CreateScriptableObjectInstanceFromType (System.Type type, System.Boolean applyDefaultsAndReset) <0x26e75c712f0 + 0x0005a> in <b513437b2c4c4d11b3e96dd48342b628>:0 UnityEngine.ScriptableObject.CreateInstance (System.Type type) (at C:/UnitySrc/unity_review/Runtime/Export/Scripting/ScriptableObject.bindings.cs:35) UnityEngine.Rendering.VolumeStack.Reload (System.Type[] componentTypes) (at Library/PackageCache/com.unity.render-pipelines.core@637d86e54998/Runtime/Volume/VolumeStack.cs:50) UnityEngine.Rendering.VolumeManager.CreateStack () (at Library/PackageCache/com.unity.render-pipelines.core@637d86e54998/Runtime/Volume/VolumeManager.cs:331) UnityEngine.Rendering.HighDefinition.HDCamera.get_volumeStack () (at Library/PackageCache/com.unity.render-pipelines.high-definition@39aaede1aa83/Runtime/RenderPipeline/Camera/HDCamera.cs:133) UnityEngine.Rendering.HighDefinition.HDCamera.UpdateVolumeAndPhysicalParameters () (at Library/PackageCache/com.unity.render-pipelines.high-definition@39aaede1aa83/Runtime/RenderPipeline/Camera/HDCamera.cs:2227) UnityEngine.Rendering.HighDefinition.HDCamera.Update (UnityEngine.Rendering.HighDefinition.FrameSettings currentFrameSettings, UnityEngine.Rendering.HighDefinition.HDRenderPipeline hdrp, UnityEngine.Experimental.Rendering.XRPass xrPass, System.Boolean allocateHistoryBuffers) (at Library/PackageCache/com.unity.render-pipelines.high-definition@39aaede1aa83/Runtime/RenderPipeline/Camera/HDCamera.cs:1208) UnityEngine.Rendering.HighDefinition.HDRenderPipeline.TryCalculateFrameParameters (UnityEngine.Camera camera, UnityEngine.Experimental.Rendering.XRPass xrPass, UnityEngine.Rendering.HighDefinition.HDAdditionalCameraData& additionalCameraData, UnityEngine.Rendering.HighDefinition.HDCamera& hdCamera, UnityEngine.Rendering.ScriptableCullingParameters& cullingParams) (at Library/PackageCache/com.unity.render-pipelines.high-definition@39aaede1aa83/Runtime/RenderPipeline/HDRenderPipeline.cs:2953) UnityEngine.Rendering.HighDefinition.HDRenderPipeline.PrepareAndCullCamera (UnityEngine.Camera camera, UnityEngine.Experimental.Rendering.XRPass xrPass, System.Boolean cameraRequestedDynamicRes, System.Collections.Generic.List`1[T] renderRequests, UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Rendering.HighDefinition.HDRenderPipeline+RenderRequest& renderRequest, UnityEngine.CubemapFace cubemapFace) (at Library/PackageCache/com.unity.render-pipelines.high-definition@39aaede1aa83/Runtime/RenderPipeline/HDRenderPipeline.cs:1478) UnityEngine.Rendering.HighDefinition.HDRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List`1[T] cameras) (at Library/PackageCache/com.unity.render-pipelines.high-definition@39aaede1aa83/Runtime/RenderPipeline/HDRenderPipeline.cs:2307) UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at C:/UnitySrc/unity_review/Runtime/Export/RenderPipeline/RenderPipeline.cs:52) UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipelineAsset, System.IntPtr loopPtr, UnityEngine.Object renderRequest, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at C:/UnitySrc/unity_review/Runtime/Export/RenderPipeline/RenderPipelineManager.cs:152) UnityEditor.Handles:Internal_DrawCameraWithGrid_Injected(IntPtr, DrawCameraMode, DrawGridParameters&, Boolean, Boolean) UnityEditor.Handles:Internal_DrawCameraWithGrid(Camera, DrawCameraMode, DrawGridParameters&, Boolean, Boolean) UnityEditor.Handles:DrawCameraImpl(Rect, Camera, DrawCameraMode, Boolean, DrawGridParameters, Boolean, Boolean, Boolean, GameObject[]) (at C:/UnitySrc/unity_review/Editor/Mono/Handles/Handles.cs:1583) UnityEditor.Handles:DrawCameraStep1(Rect, Camera, DrawCameraMode, DrawGridParameters, Boolean, Boolean) (at C:/UnitySrc/unity_review/Editor/Mono/Handles/Handles.cs:1606) UnityEditor.SceneView:DoDrawCamera(Rect, Rect, Boolean&) (at C:/UnitySrc/unity_review/Editor/Mono/SceneView/SceneView.cs:2284) UnityEditor.SceneView:DoOnGUI() (at C:/UnitySrc/unity_review/Editor/Mono/SceneView/SceneView.cs:2613) UnityEditor.SceneView:OnSceneGUI() (at C:/UnitySrc/unity_review/Editor/Mono/SceneView/SceneView.cs:2526) UnityEngine.UIElements.IMGUIContainer:DoOnGUI(Event, Matrix4x4, Rect, Boolean, Rect, Action, Boolean) (at C:/UnitySrc/unity_review/Modules/UIElements/Core/IMGUIContainer.cs:403) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Matrix4x4, Rect, Action, Boolean) (at C:/UnitySrc/unity_review/Modules/UIElements/Core/IMGUIContainer.cs:718) UnityEngine.UIElements.IMGUIContainer:DoIMGUIRepaint() (at C:/UnitySrc/unity_review/Modules/UIElements/Core/IMGUIContainer.cs:583) UnityEngine.UIElements.UIR.RenderChainCommand:ExecuteNonDrawMesh(DrawParams, Single, Exception&) (at C:/UnitySrc/unity_review/Modules/UIElements/Core/Renderer/UIRenderer/UIRenderers.cs:128) UnityEngine.UIElements.UIR.UIRenderDevice:EvaluateChain(RenderChainCommand, Material, Material, Texture, Texture, Single, Exception&) (at C:/UnitySrc/unity_review/Modules/UIElements/Core/Renderer/UIRenderer/UIRenderDevice.cs:990) UnityEngine.UIElements.UIR.RenderChain:Render() (at C:/UnitySrc/unity_review/Modules/UIElements/Core/Renderer/UIRRenderChain.cs:541) UnityEngine.UIElements.UIRRepaintUpdater:Render() (at C:/UnitySrc/unity_review/Modules/UIElements/Core/Renderer/UIRRepaintUpdater.cs:124) UnityEngine.UIElements.BaseVisualElementPanel:Render() (at C:/UnitySrc/unity_review/Modules/UIElements/Core/Panel.cs:719) UnityEngine.UIElements.Panel:Render() (at C:/UnitySrc/unity_review/Modules/UIElements/Core/Panel.cs:1378) UnityEditor.UIElements.EditorPanel:Render() (at C:/UnitySrc/unity_review/Modules/UIElementsEditor/EditorPanel.cs:97) UnityEngine.UIElements.UIElementsUtility:DoDispatch(BaseVisualElementPanel) (at C:/UnitySrc/unity_review/Modules/UIElements/Core/UIElementsUtility.cs:484) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent(Int32, IntPtr, Boolean&) (at C:/UnitySrc/unity_review/Modules/UIElements/Core/UIElementsUtility.cs:232) UnityEngine.UIElements.UIEventRegistration:ProcessEvent(Int32, IntPtr) (at C:/UnitySrc/unity_review/Modules/UIElements/Core/UIElementsUtility.cs:76) UnityEngine.UIElements.<>c:<.cctor>b__1_2(Int32, IntPtr) (at C:/UnitySrc/unity_review/Modules/UIElements/Core/UIElementsUtility.cs:30) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at C:/UnitySrc/unity_review/Modules/IMGUI/GUIUtility.cs:219) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck_Injected(String[], ManagedSpanWrapper&, ManagedSpanWrapper&, BuildTargetGroup, BuildTarget, Int32, BuildOptions, String[], Boolean) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, Int32, BuildOptions, String[], Boolean) UnityEditor.DefaultBuildMethods:BuildPlayer(BuildPlayerOptions) (at C:/UnitySrc/unity_review/Editor/Mono/BuildPlayerWindowBuildMethods.cs:169) UnityEditor.BuildPlayerWindow:CallBuildMethods(Boolean, BuildOptions) (at C:/UnitySrc/unity_review/Editor/Mono/BuildPlayerWindowBuildMethods.cs:96) UnityEditor.Build.Profile.BuildProfileModuleUtil:CallInternalBuildMethods(Boolean, BuildOptions) (at C:/UnitySrc/unity_review/Editor/Mono/BuildProfile/BuildProfileModuleUtil.cs:206) UnityEditor.Build.Profile.BuildProfileWindow:OnBuildButtonClicked(BuildOptions) (at C:/UnitySrc/unity_review/Modules/BuildProfileEditor/BuildProfileWindow.cs:498) UnityEditor.Build.Profile.BuildProfileWindow:<CreateBuildDropdownButton>b__47_0() (at C:/UnitySrc/unity_review/Modules/BuildProfileEditor/BuildProfileWindow.cs:606) UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32) (at C:/UnitySrc/unity_review/Editor/Mono/GUI/GenericMenu.cs:127) ``` By looking at this stack we can see that we have a UI update call that triggered in the middle of the Building process. By some reason I couldn't catch Native part of it this time. Usually it goes through GUIView update or through update of camera preview window. As we had Domain Reload before because of the Build to execute Rendering correctly we have to create new Render Pipeline. This will trigger re-creation of the Volume Stack for Default Volume, for SkyManager and for available cameras in the scene. For this specific project it's 48 different ScriptableObjects that needs to be created. In some other tests it fails when starts creating for SkyManager. Here it's failing when Camera's ones are creating. Here we see that it actually fails inside ScriptableObject.CreateInstance method. Usually it succeed here without any issues otherwise we would see that all the time. Changing callstack like moving things around sometimes fix this issue but it's quite unreliable. To summarize we try to Render in the middle of the Building process. It's not clear why Mono is failing here. It could be that the context behave a bit differently in the Building process or it's occupied with some temp information from Building process. It seems there's no benefits to actually update GUIView at this point. Usually this call happens on the empty Scene that are temporary loaded and you will see just empty Skybox there. This is how GUIVIew update looks when there's an exception  If there were no exception there will be empty Skybox instead of scene. Kind of like this  I checked 829763 case that was specified in the code and this PR doesn't affect it. It actually doesn't work though.
**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 - https://jira.unity3d.com/browse/DOCG-6302 - fix broken links by removing snippet
…instance When GPU Resident Drawer (GRD) is enabled, we got an annoying "memory leak" message each time you create a new Material. It turns out U6 is also launching unity editor child process when creating material. During this import external process, a material preview rendering is issued. GRD lifetime is complex and the asset importer workflow is really different from editor mainloop. So some GRD tempjob memory isn't released when assetimporter quits. There is no reason to use GRD for material rendering preview in an external assetimporter process. To fix the leak warning message and also any future weird issue, this PR disables GRD in any AssetImporter instance.
…initialized pr… - https://jira.unity3d.com/browse/UUM-91650 - Fixed an issue where SoftShadowsHigh global shader keyword is not initialized properly.
…ls in HDRP Add note about converting read-only materials in HDRP Jira ticket: https://jira.unity3d.com/browse/DOCG-5432
When we [released UPM `8.10.0` in `trunk`](https://github.cds.internal.unity3d.com/unity/unity/pull/54655), we introduced an issue ([UUM-83706: Warnings spam the console when upgrading or creating a new projects in unity 6000.0.23f1](https://jira.unity3d.com/browse/UUM-83706)). To address this issue, we [downgraded UPM to 8.9.0](https://github.cds.internal.unity3d.com/unity/unity/pull/54918). However, a change in [UPM 8.9.0](https://github.cds.internal.unity3d.com/unity/unity/pull/53876) we introduced a HUP issue in the Rider IDE's Unity support because the Rider code used hard-coded assumptions about the location of packages on disk rather than relying on outputs from Unity's package manager. Again we [Downgraded UPM to 8.7.0](https://github.cds.internal.unity3d.com/unity/unity/pull/55174), to avoid this problem and give Rider time to make changes around the package project cache names. This two problems are not an issue anymore: * [UUM-83706](https://jira.unity3d.com/browse/UUM-83706) was fixed with [[PAK 7838] Exclude package modules from AssetDatabase Directory Monitoring](https://github.cds.internal.unity3d.com/unity/unity/pull/55755). * We received confirmation from Rider that the issue is fixed with UPM 9.0.0. [slack post confirming the fix was released on December 24th](https://unity.slack.com/archives/CP9UVU6MB/p1736169190637509?thread_ts=1728388524.010679&cid=CP9UVU6MB) This allow us to release the latest version we have of UPM available, which is 9.0.0. UPM 9.0.0 contains several breaking changes, as the update to Node 20, remove support of Windows 7 and removes `search` public function ([that is not consumed by the Editor anymore](https://github.cds.internal.unity3d.com/unity/unity/pull/55870)). It also fixes performance issue when upgrading from UPM 8.0.0+. UPM 8.10.0 adds new properties to the resolve output file. It includes the optimization on the way we handle packages with type `module` (The source of UUM-83706). The Stevedore artifacts now include a UPM executable compiled for Mac ARM64, although this is not being used. UPM 8.9.0 contains a fix for the EPERM errors that can happen on Windows when resolving packages. It also makes concurrent operations made on the same project from different processes (e.g. from the Editor and from MSBuild) more robust. [From UPM 9.0.0 Changelog](https://github.cds.internal.unity3d.com/unity/upm/blob/master/CHANGELOG.md#900---2024-12-04) : - (Changed) [BREAKING] [PAK-5130] Updated Node from 16.20.2 to 22.11.0. - (Removed) [BREAKING] [PAK-5309] Removed Windows 7 support from UPM. - (Removed) [BREAKING] [PAK-7667] Removed the packages:search IPC route implementation. This route was never used. - (Removed) [BREAKING] [PAK-7667] Removed the search public function. - (Fixed) Fixed a performance issue when upgrading from UPM 8.0.0+ to this version by not reinstalling existing packages. [From UPM v8.10.0 Changelog](https://github.cds.internal.unity3d.com/unity/upm/blob/master/CHANGELOG.md#8100---2024-09-26) : - (Added)[[PAK-7766]](https://jira.unity3d.com/browse/PAK-7766) Added new `testable` property to the package output object in the resolve output file. - (Added)[[PAK-7767]](https://jira.unity3d.com/browse/PAK-7767) Added the path to the `built-in` packages combined hash file path to the inputs object in the resolve output file. - (Added)[[PAK-7814]](https://jira.unity3d.com/browse/PAK-7814) Added new `displayName` property to the package output object in the resolve output file. - (Internal)[[PAK-4648]](https://jira.unity3d.com/browse/PAK-4648) The Stevedore artifacts now include a UPM executable compiled for Mac ARM64. - (Changed)[[PAK-4384]](https://jira.unity3d.com/browse/PAK-4384) Optimize handling of `builtin` packages with type `module`: no request will be issued onto the registry to get their metadata, they are no longer copied to the project cache. [From UPM v8.9.0 Changelog](https://github.cds.internal.unity3d.com/unity/upm/blob/master/CHANGELOG.md#890---2024-09-03) - (Changed )[PAK-7761] The [config:project:add-scoped-registry] and [config:project:update-scoped-registry] IPC routes now take in an optional parameter overrideBuiltIns and newOverrideBuiltIns, respectively. - (Fixed) [PAK-7758] Re-enabled the in-memory metadata cache in CLI mode to fix the performance regression introduced by [PAK-7740] in 8.8.0. [From UPM v8.8.0 Changelog](https://github.cds.internal.unity3d.com/unity/upm/blob/master/CHANGELOG.md#880---2024-08-22) - (Changed) [PAK-5226] Improved concurrency handling to use a file-based mutex to synchronize concurrent operations from different UPM processes. - (Fixed) [PAK-5250] Fixed an EPERM error that could occur on Windows during resolve by making resolved paths unique. - (Fixed) [PAK-7740] Fixed an issue where the resolve command appeared to hang for up to 30 seconds after printing its output to the console. [UPM source](https://github.cds.internal.unity3d.com/unity/upm/tree/v9.0.0) [UPM diff](https://github.cds.internal.unity3d.com/unity/upm/compare/v8.7.0...v9.0.0) manifest.stevedore taken from UPM 8.10.0 [Github Release artifacts](https://github.cds.internal.unity3d.com/unity/upm/releases/tag/v9.0.0). Note: UPM now uses [email protected]. [upm-core source](https://github.cds.internal.unity3d.com/unity/upm-core/tree/v10.0.0) [upm-core diff](https://github.cds.internal.unity3d.com/unity/upm-core/compare/v8.5.0...v10.0.0) UPM source code diff: https://github.cds.internal.unity3d.com/unity/upm/compare/v8.7.0...v9.0.0 upm-core source code diff: https://github.cds.internal.unity3d.com/unity/upm-core/compare/v8.5.0...v10.0.0
… 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
…n HDRP Add links from the SSR reference page back to the task and concept pages, where there's more information about using the override. Jira ticket: https://jira.unity3d.com/browse/DOCG-5466
…on (UUM-87935) Fixes UUM-87935. The problem is that the sampling functions are using half, which doesn't have enough precision for the 2K, 4K and 8K shadowmaps that URP offers. The solution is to create a version of those functions using float instead of half. New functions were added instead of changing the current ones to not break users who might be relying on those.
…irectly the volume parameters of the Volume Component. The Volume Debugger page was using reflection to obtain the volume parameters from the selected volume component in the stack. This code as was copy pasted from VolumeComponent and Volume Component editor was not taking into account the logic of . - Getting public fields without NonSerialize attribute - Getting private fields with SerializeField. The selected component of the jira, had an RTHandle that was doing an infinte loop, that was making a crash directly in mono. I've gotten rid of all this logic that was copy pasted, and instead I am using the Volume Parameter list, but I've added debug info to it. Making that, it allowed me to simplify the table generation. Having a single code that 1- Gets the chain of volumes 2- Generates the rows of the table 3- For each volume in the interpolation chain, we create a column. The code now is generic, instead of having granular cases for defaults, customs, etc. I've improved and simplified the code, and I've added alternate colors to the table.  Also, the values that are not interpolated show now "-", making it easier to see where the values are overriden.
This PR fixes the _WindEnabled implementation as a local variable. In the older engine versions, the speedtree shader received _WindEnabled variable, the variable hasn't passed to the shader since Unity6. Instead, it is fixed to create the windEnabled variable as a local variable in this PR. This PR covers both SpeedTree 7 and 8.
… unloading scenes with GPU Resident Drawer When scenes containing lightmapped renderers are loaded additively or unloaded, the lightmapping manager reshuffles the lightmap indices to accommodate the new lightmaps loaded in the scene's lighting data. Unfortunately, when using the GPU Resident Drawer, these new lightmap indices where not taken into account in the GRD's instance data, resulting in objects potentially using the incorrect lightmap after unloading of other scenes. This is because the GRD relies on the ObjectDispatcher to be notified in any changes in scene data. But the ObjectDispatcher tracks changes only if objects are marked as "dirty" after modification, which wasn't the case when the lightmap indices where modified after load / unload of scenes. The PR fixes that by adding an extra method in Renderer for setting lightmap indices with an extra `SetDirty` call so these modifications get tracked by the ObjectDispatcher. The dirty flag is set ONLY if the lightmap indices have really changed, though. Similarly, for symmetry, `SetDirty` was also added in `Terrain::SetLightmapIndices`. This is potentially not optimal for the GRD because the ObjectDispatcher doesn't distinguish between newly created objects and modified objects so any changes of lightmaps indices gets "seen" by the GRD as a newly created mesh renderer so results in a tear down and reconstruction of instance data for that renderer. In the future, especially in the case of streaming where we would want to minimize CPU cost of adding / removing objects, it might be interesting to either modify ObjectDispatcher so we can distinguish between creation & changes in objects, and even be finer grained in what has changed in terms of properties. The PR also adds a new GRDLightMap graphics test that verifies the issue with additive scene loading / unloading in the case of GRD with URP.
…ip any variants 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
…er sample Fix include in HDRP dynamic resolution shader sample Jira ticket: https://jira.unity3d.com/browse/DOCG-6300
Reverts #58972
…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
…waiting from asynchronous check Fix [UUM-85253](https://jira.unity3d.com/browse/UUM-85253). Due to the delayed response from package management, the status displayed between the fix and the checking of the fix was the default "fail". So it was really strange. And this was enforced even by the unexpectedly long delay for PackageManager to answer. To solve this, this PR introduce a "pending" state that is used while we are waiting for the answer instead of assuming it is OK or KO.  (wait it is a little long to get answer from PackageManager)
…Core SRP manual Improve graphics settings documentation in Core SRP manual, based on suggestions in https://github.cds.internal.unity3d.com/unity/unity/pull/57820/ Jira ticket: https://jira.unity3d.com/browse/DOCG-6321
…P for volume more explicite Fix [UUM-91000](https://jira.unity3d.com/browse/UUM-91000). This is indeed a regression but the previously allowed of being able to call this out of URP lifetime was a mistake. One cannot alter the volume for the rendering before the URP pipeline is created. So the fix for this is mainly to clarify the error message and encouraging user to use the pipeline creation event if they need to. Before this PR, the error was `NullReferenceException: Object reference not set to an instance of an object` when calling Universal.CameraExtensions.UpdateVolumeStack before URP is created. This happens by calling it in a Start of a Script and entering play mode. New Error message: `UpdateVolumeStack must not be called before VolumeManager.instance.Initialize. If you tries calling this from Awake or Start, try instead to use the RenderPipelineManager.activeRenderPipelineCreated callback to be sure your render pipeline is fully initialized before calling this`
…Real-Time Additional Shadows are disabled (UUM-93148) Fixes an issue when Real-Time Additional Light Shadows are disabled but using baked shadows. The issue is that `_AdditionalShadowParams` is not included nor updated when real-time shadows are disabled. This PR reverts the behaviour to what it was before. A follow-up PR may come to add the feature for baked shadows only.
… that lights are baked https://jira.unity3d.com/browse/UUM-78573 This fix addresses a bug that caused the various buttons for baking only Adaptive Probe Volumes to malfunction - they would update the lights in the scene to act as baked, to avoid double-contribution from realtime lighting, but would do so in a way that wasn't persistent across scene reloads. The root cause is not properly respecting the Lighting Data Asset (LDA). The baked state of each light is stored in the LDA, _not_ on the lights themselves. Changing only the state on the lights themselves will not make a persistent change, and reloading the scene will reload the old unmodified data. To make the change persistent, we need to modify the LDA. To fix this, I've taken an approach similar to what we do with reflection probes, which have the same issue: - When you bake only probe volumes, and the scene has no LDA, we create a new empty LDA, assign it to the scene, and fill in the up-to-date states. - When you bake only probes volumes, and the scene already has a LDA, we modify this LDA to contain up-to-date states for each light. I had to add a few pieces of public API to achieve this.
…ferent size not leak into the pool and dispose immediately JIRA: [UUM-83271](https://jira.unity3d.com/browse/UUM-83271) This PR is to prevent APV streaming buffer from not leaking into the current pool having different chunk size. Because NativeArray with fixed size is used while streaming in & out, memory contemination happens especially when the current pool's chunk size is bigger than the released scratch buffer's, and the behaviour tends to cause editor crash. In the JIRA ticket's repro case, the issue occurs because Lobby scene's baking set with greater chunk size becomes active while requests from MainMenu scene having smaller chunk size are cancelled and their attached scratch buffers leak into the newly created free buffer pool. The case happens in editor only, but as it doesn't seem like the only repro case the modification is applied into the player land. From this PR's inverstigation, refactorying the structure reagarding disk streaming scratch buffer and its pool will be more fundamental solution especially by changing the pool to be capable of managing various sizes & layouts. Please let me know which way you think more proper.
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.