Skip to content

Commit 2ecb711

Browse files
authored
Merge pull request #8133 from Unity-Technologies/internal/master
Internal/master
2 parents a36d8dd + 1057c35 commit 2ecb711

File tree

840 files changed

+395701
-11366
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

840 files changed

+395701
-11366
lines changed

Packages/com.unity.render-pipelines.core/CHANGELOG.md

+88
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,94 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
Version Updated
1111
The version number for this package has increased due to a version update of a related graphics package.
1212

13+
## [17.0.3] - 2025-02-13
14+
15+
This version is compatible with Unity 6000.2.0a17.
16+
17+
### Added
18+
- Added Variable Rate Shading API support for (Raster)CommandBuffer(s), RenderGraph and RTHandles.
19+
Various VRS utilities.
20+
- helper functions to Render Graph.
21+
22+
### Changed
23+
- Modified the Rendering Debugger to prevent resource transfers in retail builds.
24+
- Rendering Debugger - Moved the GPU Resident Drawer to the Rendering Section.
25+
- Rendering Debugger - Moved Render Graph to the Rendering Section.
26+
- Added an API to query the preferred depth-only format for target platforms.
27+
- Improved Depth usage performance for some platforms.
28+
- Improved the Native Render Pass CPU performance by implementing a Render Pass pooling system (URP RG).
29+
- Reworked the additional properties.
30+
- Improved Render Graph warning message in URP when missing RecordRenderGraph implementation.
31+
- Displayed subpass and attachment index on Render Graph Viewer.
32+
- Added a new icon and tooltip if there are multiple usage details for a resource block on Render Graph Viewer.
33+
- Fixed Render Graph Viewer being called before Render Graph execution and its resource deallocation.
34+
- Added What's New in Unity 6 to SRP Core Package.
35+
36+
### Fixed
37+
- Fixed an issue in Render Graph Viewer where text would overlap after searching in the Pass List.
38+
- Fix pass culling corner case where resources are never deallocated when the last pass using them is culled
39+
- Fix RenderGraphObjectPool and GetTempMaterialPropertyBlock() usage in URP RenderGraph
40+
- Fix async compute corner case where URP RenderGraph was waiting for a resource not written by any pass
41+
- Serialization errors are thrown when "com.unity.render-pipelines.core" is added as a custom package
42+
- Add missing check for count parameter in DynamicArray.FindIndex
43+
- Fixed incorrect format of default shadow texture
44+
- Fixed render graph incorrectly handling rendering to array slices and mipmaps other than 0 in some cases.
45+
- Fixed an issue where Lens Flare was not rendering properly in OpenGLES3.
46+
- Fixed missing STP shaders & visual artifacts when targeting GLCore renderer.
47+
- Render Graph Viewer - Improved UI lock when searching on side panels.
48+
- Render Graph Viewer - Padding corrected on burger menu on the side panels.
49+
- Fixed the crash happening when APV tried to stream in block data.
50+
- Fixed VRS initialization errors. Now init may fail explicitly and must be checked by the user code.
51+
- Fixed Rendering Debugger - Silent crash when selecting a Volume component with public RTHandles.
52+
- Fixed Transient Resources support in Native RenderPass Render Graph (used in URP).
53+
- Fixed an issue where the Adaptive Probe Volume (APV) streaming buffer could leak into the current pool when chunk sizes were mismatched, leading to memory contamination and potential crashes.
54+
- Fixed an issue in the Render Graph Viewer where text overlapped after performing a search in the Pass List.
55+
- Fixed an issue in pass culling where resources were not deallocated if the last pass using them was culled.
56+
- Fixed `RenderGraphObjectPool` and `GetTempMaterialPropertyBlock()` usage in URP RenderGraph.
57+
- Fixed an issue in URP Render Graph where, in an async compute edge case, it was waiting for a resource that was not written by any pass.
58+
- Added messaging to the Rendering Debugger UI to make it clearer that GPU Resident Drawer settings do not work if GPU Resident Drawer is not enabled.
59+
- GPU Resident Drawer: Changed BatchRendererGroup variants was not reinitializing the system.
60+
- Improved the compiler logic that detects if the current render target is being used outside the current native render pass (e.g., when the pass is broken up by an unsafe pass), and determines the store action for this case. The fix now ensures that the `StoreAndResolve` action is used when the resource is read by an Unsafe Pass.
61+
- Rendering Debugger - Keep the correct selected panel when entering and exiting from playmode.
62+
- Removed "depth only surface" warning message appearing when using Game View Gizmos in URP RG.
63+
- Render Graph Viewer: Fixed missing min height when resizing side panel vertical splitter.
64+
- Render Graph Viewer: Fixed possible NullReferenceException when opening the project.
65+
- Render Graph Viewer: Fixed side panel splitter state after returning from empty pass/resource filter.
66+
- Render Graph Viewer: Fixed long resource name clipping issues in side panel.
67+
- Render Graph Viewer: Fixed tooltip size bug and restructure tooltip messages.
68+
- Fixed memory usage regression causing up to 150MB higher memory usage in URP player builds.
69+
- Added missing user-facing text when inspecting volume profile when render pipeline has not been properly initialized yet.
70+
- Game view background turn yellow after enable render graph.
71+
- Fixed light.useViewFrustumForShadowCasterCull previously being ignored for shadow cascades. light.useViewFrustumForShadowCasterCull now works as expected.
72+
- Fixed an exception thrown when Render Graph pass was missing its renderFunc but tried to compute its hash value.
73+
- Fixed Render Graph Compiler logic bug where UnsafePass using MSAA texture could result in missing resolve surface errors.
74+
- Fixed incorrect default source texture name for Render Graph blit util function.
75+
- Fixed NullReferenceException when jumping to pass code from Render Graph Viewer.
76+
- Fixed _FOVEATED_RENDERING_NON_UNIFORM_RASTER shader compilation errors.
77+
- Fixed a null reference exception on the Graphics Settings stripper.
78+
- Avoid that the same volume can be registered more than 1 time in the VolumeManager.
79+
- Fixed crash caused by indirect argument buffer being one item too small.
80+
- [GLES3] Fixed an issue where Blitter.GetBlitMaterial(TextureDimension.Tex2DArray) returns null.
81+
- Fixed alignment of the columns on DebugUI.Foldouts.
82+
- Fixed BlitTexture(RenderTargetIdentifier) to be affected by PostProcessing.
83+
- Fixed errors that could happen when interacting with the Default Volume Profile context menu in Project Settings > Graphics.
84+
- Fixed a numerical error of ComputeEdgeFactor(V1, V2) when two vectors are colinear.
85+
- Fixed potential data corruption due to incorrect native render pass store action in NRP compiler.
86+
- Added stencil flag to read-only depth logic in NRP compiler to avoid unintentional usage of depth read and stencil write states on some APIs.
87+
- Added more error checking to `RenderGraph.ImportTexture` to prevent importing RenderTextures that have both color and depth.
88+
An exception will now be thrown in this case.
89+
- Fixed an issue when using multiple AddBlitPass would binds the _BlitTexture wrongly.
90+
- Modified TextureDesc so it can now use GraphicsFormat to set the depthStencil format (TextureDesc.format). The TextureDesc.depthBufferBits and TextureDesc.colorFormat fields are now properties that call GraphicsFormatUtilities functions for backwards compatibility. The descriptor now unambiguously describes a single resource, either color or depth. Therefore, TextureHandle clearly represents a single resource.
91+
- Modified RTHandle allocators so they can now use GraphicsFormat to set the depthStencil format (TextureDesc.format). The allocators take a single format for either color or depth stencil to avoid incorrectly creating depth instead of color or vice versa.
92+
- Fixed a crash on DX12 due to invalid subpass flags passed by native render pass compiler.
93+
- Fixed an issue where Lens Flare was not rendering properly in OpenGLES3.
94+
- Fixed render graph incorrectly handling rendering to array slices and mipmaps other than 0 in some cases.
95+
- Render Graph Viewer - Improved UI lock when searching on side panels.
96+
- Render Graph Viewer - Padding corrected on burger menu on the side panels.
97+
- Fixed missing STP shaders & visual artifacts when targeting GLCore renderer
98+
- Rendering Debugger - Silent crash when selecting a Volume component with public RTHandles.
99+
- Fixed a crash on leaking streaming scratch buffer differently sized into the current pool.
100+
13101
## [17.0.2] - 2024-04-02
14102

15103
This version is compatible with Unity 6000.0.0b15.

Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugState.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public sealed class DebugStateInt : DebugState<int> { }
179179
/// <summary>
180180
/// Object Debug State.
181181
/// </summary>
182-
[Serializable, DebugState(typeof(DebugUI.ObjectPopupField))]
182+
[Serializable, DebugState(typeof(DebugUI.ObjectPopupField), typeof(DebugUI.CameraSelector))]
183183
public sealed class DebugStateObject : DebugState<UnityEngine.Object>
184184
{
185185
/// <summary>

Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugUIDrawer.Builtins.cs

+33-7
Original file line numberDiff line numberDiff line change
@@ -292,14 +292,40 @@ protected override UnityEngine.Object DoGUI(Rect rect, GUIContent label, DebugUI
292292
rect = EditorGUI.PrefixLabel(rect, label);
293293

294294
var elements = field.getObjects();
295-
if (elements?.Any() ?? false)
295+
var count = elements != null ? elements.Count() : -1;
296+
if (count > 0) // Check if elements are not null and have any items
296297
{
297-
var elementsArrayNames = elements.Select(e => e.name).ToArray();
298-
var elementsArrayIndices = Enumerable.Range(0, elementsArrayNames.Length).ToArray();
299-
var selectedIndex = selectedValue != null ? Array.IndexOf(elementsArrayNames, selectedValue.name) : 0;
300-
var newSelectedIndex = EditorGUI.IntPopup(rect, selectedIndex, elementsArrayNames, elementsArrayIndices);
298+
// Initialize arrays for names and indices, with +1 for the "None" option
299+
string[] elementsArrayNames = new string[count + 1]; // +1 for the "None" option
300+
int[] elementsArrayIndices = new int[elementsArrayNames.Length]; // Same size as elementsArrayNames
301+
302+
// Add the "None" option at the beginning
303+
elementsArrayNames[0] = "None";
304+
elementsArrayIndices[0] = 0; // "None" corresponds to index 0
305+
306+
// Populate the rest of the arrays with the element names and indices
307+
int index = 1;
308+
foreach (var element in elements)
309+
{
310+
elementsArrayNames[index] = element.name;
311+
elementsArrayIndices[index] = index; // Set the index to match the element's position
312+
index++;
313+
}
314+
315+
// Determine the selected index
316+
int selectedIndex = selectedValue != null
317+
? Array.IndexOf(elementsArrayNames, selectedValue.name)
318+
: 0;
319+
320+
// Show the dropdown and get the new selected index
321+
int newSelectedIndex = EditorGUI.IntPopup(rect, selectedIndex, elementsArrayNames, elementsArrayIndices);
322+
323+
// If the selected index changed, update selectedValue
301324
if (selectedIndex != newSelectedIndex)
302-
selectedValue = elements.ElementAt(newSelectedIndex);
325+
{
326+
// If "None" is selected, set selectedValue to null
327+
selectedValue = newSelectedIndex == 0 ? null : elements.ElementAt(newSelectedIndex - 1);
328+
}
303329
}
304330
else
305331
{
@@ -476,7 +502,7 @@ public override void Begin(DebugUI.Widget widget, DebugState state)
476502
}
477503

478504
bool previousValue = (bool)w.GetValue();
479-
bool value = CoreEditorUtils.DrawHeaderFoldout(title, previousValue, isTitleHeader: w.isHeader, customMenuContextAction: fillContextMenuAction);
505+
bool value = CoreEditorUtils.DrawHeaderFoldout(title, previousValue, isTitleHeader: w.isHeader, customMenuContextAction: fillContextMenuAction, documentationURL: w.documentationUrl);
480506
if (previousValue != value)
481507
Apply(w, s, value);
482508

Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugWindow.cs

+43-24
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,32 @@ void UpdateWidgetStates()
262262
UpdateWidgetStates(panel);
263263
}
264264

265+
DebugState GetOrCreateDebugStateForValueField(DebugUI.Widget widget)
266+
{
267+
// Skip runtime & readonly only items
268+
if (widget.isInactiveInEditor)
269+
return null;
270+
271+
if (widget is not DebugUI.IValueField valueField)
272+
return null;
273+
274+
string guid = widget.queryPath;
275+
if (!m_WidgetStates.TryGetValue(guid, out var state) || state == null)
276+
{
277+
var widgetType = widget.GetType();
278+
if (s_WidgetStateMap.TryGetValue(widgetType, out Type stateType))
279+
{
280+
Assert.IsNotNull(stateType);
281+
state = (DebugState)CreateInstance(stateType);
282+
state.queryPath = guid;
283+
state.SetValue(valueField.GetValue(), valueField);
284+
m_WidgetStates[guid] = state;
285+
}
286+
}
287+
288+
return state;
289+
}
290+
265291
void UpdateWidgetStates(DebugUI.IContainer container)
266292
{
267293
// Skip runtime only containers, we won't draw them so no need to serialize them either
@@ -273,26 +299,10 @@ void UpdateWidgetStates(DebugUI.IContainer container)
273299
{
274300
// Skip non-serializable widgets but still traverse them in case one of their
275301
// children needs serialization support
276-
if (widget is DebugUI.IValueField valueField)
277-
{
278-
// Skip runtime & readonly only items
279-
if (widget.isInactiveInEditor)
280-
return;
302+
var state = GetOrCreateDebugStateForValueField(widget);
281303

282-
string guid = widget.queryPath;
283-
if (!m_WidgetStates.TryGetValue(guid, out var state) || state == null)
284-
{
285-
var widgetType = widget.GetType();
286-
if (s_WidgetStateMap.TryGetValue(widgetType, out Type stateType))
287-
{
288-
Assert.IsNotNull(stateType);
289-
var inst = (DebugState)CreateInstance(stateType);
290-
inst.queryPath = guid;
291-
inst.SetValue(valueField.GetValue(), valueField);
292-
m_WidgetStates[guid] = inst;
293-
}
294-
}
295-
}
304+
if (state != null)
305+
continue;
296306

297307
// Recurse if the widget is a container
298308
if (widget is DebugUI.IContainer containerField)
@@ -317,7 +327,7 @@ public void ApplyStates(bool forceApplyAll = false)
317327

318328
void ApplyState(string queryPath, DebugState state)
319329
{
320-
if (!(DebugManager.instance.GetItem(queryPath) is DebugUI.IValueField widget))
330+
if (state == null || !(DebugManager.instance.GetItem(queryPath) is DebugUI.IValueField widget))
321331
return;
322332

323333
widget.SetValue(state.GetValue());
@@ -544,17 +554,26 @@ void OnWidgetGUI(DebugUI.Widget widget)
544554
if (widget.isInactiveInEditor || widget.isHidden)
545555
return;
546556

547-
// State will be null for stateless widget
548-
m_WidgetStates.TryGetValue(widget.queryPath, out DebugState state);
549-
550557
GUILayout.Space(4);
551558

552559
if (!s_WidgetDrawerMap.TryGetValue(widget.GetType(), out DebugUIDrawer drawer))
553560
{
554-
EditorGUILayout.LabelField("Drawer not found (" + widget.GetType() + ").");
561+
foreach (var pair in s_WidgetDrawerMap)
562+
{
563+
if (pair.Key.IsAssignableFrom(widget.GetType()))
564+
{
565+
drawer = pair.Value;
566+
break;
567+
}
568+
}
555569
}
570+
571+
if (drawer == null)
572+
EditorGUILayout.LabelField("Drawer not found (" + widget.GetType() + ").");
556573
else
557574
{
575+
var state = GetOrCreateDebugStateForValueField(widget);
576+
558577
drawer.Begin(widget, state);
559578

560579
if (drawer.OnGUI(widget, state))

Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.LightTransport.cs

-7
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,6 @@ public override bool Step()
151151
context.Dispose();
152152
}
153153

154-
// Fixup lighting for probes part of bricks with different subdivision levels
155-
// When baking reflection probes, we want to skip this step
156-
if (m_BakingBatch != null)
157-
{
158-
FixSeams(s_BakeData.positionRemap, positions, irradiance, validity, renderingLayerMasks);
159-
}
160-
161154
return true;
162155
}
163156

0 commit comments

Comments
 (0)