Skip to content

Commit a65be2c

Browse files
authored
Merge pull request #8111 from Unity-Technologies/internal/6000.0/staging
Internal/6000.0/staging
2 parents 6a723ff + bff5f11 commit a65be2c

105 files changed

Lines changed: 4382 additions & 441 deletions

File tree

Some content is hidden

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

Packages/com.unity.render-pipelines.core/Documentation~/custom-material-inspector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Custom Material Inspectors enable you to define how Unity displays properties in
66

77
The implementation for custom Material Inspectors differs between URP and HDRP. For example, for compatibility purposes, every custom Material Inspector in HDRP must inherit from `HDShaderGUI` which does not exist in URP. For information on how to create custom Material Inspectors for the respective render pipelines, see:
88

9-
- **HDRP**: [HDRP custom Material Inspectors](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/manual/hdrp-custom-material-inspector.html).
9+
- **HDRP**: [HDRP custom Material Inspectors](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/manual/custom-material-inspectors.html).
1010
- **URP**: [Unity Custom Shader GUI](https://docs.unity3d.com/Manual/SL-CustomShaderGUI.html).
1111

1212
## Assigning a custom Material Inspector

Packages/com.unity.render-pipelines.core/Documentation~/render-graph-writing-a-render-pipeline.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class MyRenderPipeline : RenderPipeline
1515

1616
void InitializeRenderGraph()
1717
{
18-
m_RenderGraph = new RenderGraph(MyRenderGraph);
18+
m_RenderGraph = new RenderGraph("MyRenderGraph");
1919
}
2020

2121
void CleanupRenderGraph()

Packages/com.unity.render-pipelines.core/Editor/HeaderFoldout.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,15 @@ public HeaderFoldout() : base()
7777
m_HelpButton.SetEnabled(!string.IsNullOrEmpty(m_DocumentationURL));
7878
line.Add(m_HelpButton);
7979

80-
m_ContextMenuButton = new Button(Background.FromTexture2D(CoreEditorStyles.paneOptionsIcon), () => ShowMenu());
80+
m_ContextMenuButton =
81+
new Button(Background.FromTexture2D(CoreEditorStyles.paneOptionsIcon), () => ShowMenu())
82+
{
83+
style =
84+
{
85+
paddingRight = 2
86+
}
87+
};
88+
8189
m_ContextMenuButton.SetEnabled(m_ContextMenuGenerator != null);
8290
line.Add(m_ContextMenuButton);
8391

Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/DynamicGI/DynamicGISkyOcclusion.urtshader

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal
1+
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal webgpu
22
#define UNIFIED_RT_GROUP_SIZE_X 64
33
#define UNIFIED_RT_GROUP_SIZE_Y 1
44

Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeCellDilation.compute

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma kernel DilateCell
22

3-
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
3+
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch webgpu
44

55
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
66
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonLighting.hlsl"

Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeSubdivide.compute

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#pragma kernel VoxelizeProbeVolumeData
77
#pragma kernel Subdivide
88

9-
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
9+
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch webgpu
1010

1111
// #pragma enable_d3d11_debug_symbols
1212

Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/VirtualOffset/TraceVirtualOffset.urtshader

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal
1+
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal webgpu switch
22
#define UNIFIED_RT_GROUP_SIZE_X 64
33
#define UNIFIED_RT_GROUP_SIZE_Y 1
44

Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.SidePanel.cs

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using UnityEditor.UIElements;
44
using UnityEditorInternal;
@@ -122,7 +122,37 @@ bool IsSearchFilterMatch(string str, string searchString, out int startIndex, ou
122122
return true;
123123
}
124124

125+
private IVisualElementScheduledItem m_PreviousSearch;
126+
private string m_PendingSearchString = string.Empty;
127+
private const int k_SearchStringLimit = 15;
125128
void OnSearchFilterChanged(Dictionary<VisualElement, List<TextElement>> elementCache, string searchString)
129+
{
130+
// Ensure the search string is within the allowed length limit (15 chars max)
131+
if (searchString.Length > k_SearchStringLimit)
132+
{
133+
searchString = searchString[..k_SearchStringLimit]; // Trim to max 15 chars
134+
Debug.LogWarning("[Render Graph Viewer] Search string limit exceeded: " + k_SearchStringLimit);
135+
}
136+
137+
// If the search string hasn't changed, avoid repeating the same search
138+
if (m_PendingSearchString == searchString)
139+
return;
140+
141+
m_PendingSearchString = searchString;
142+
143+
if (m_PreviousSearch != null && m_PreviousSearch.isActive)
144+
m_PreviousSearch.Pause();
145+
146+
m_PreviousSearch = rootVisualElement
147+
.schedule
148+
.Execute(() =>
149+
{
150+
PerformSearchAsync(elementCache, searchString);
151+
})
152+
.StartingIn(5); // Avoid spamming multiple search if the user types really fast
153+
}
154+
155+
private void PerformSearchAsync(Dictionary<VisualElement, List<TextElement>> elementCache, string searchString)
126156
{
127157
// Display filter
128158
foreach (var (foldout, descendants) in elementCache)
@@ -362,8 +392,12 @@ void CreateTextElement(VisualElement parent, string text, string className = nul
362392
{
363393
var attachmentFoldout = new Foldout();
364394

395+
string subResourceText = string.Empty;
396+
if (attachmentInfo.attachment.mipLevel > 0) subResourceText += $" Mip:{attachmentInfo.attachment.mipLevel}";
397+
if (attachmentInfo.attachment.depthSlice > 0) subResourceText += $" Slice:{attachmentInfo.attachment.depthSlice}";
398+
365399
// Abuse Foldout to allow two-line header (same as above)
366-
attachmentFoldout.text = $"<b>{attachmentInfo.resourceName}</b><br>";
400+
attachmentFoldout.text = $"<b>{attachmentInfo.resourceName + subResourceText}</b><br>";
367401
Label attachmentIndexLabel = new Label($"<br>Attachment #{attachmentInfo.attachmentIndex}");
368402
attachmentIndexLabel.AddToClassList(Classes.kInfoFoldoutSecondaryText);
369403

@@ -384,13 +418,13 @@ void CreateTextElement(VisualElement parent, string text, string className = nul
384418

385419
attachmentFoldout.Add(new TextElement
386420
{
387-
text = $"<b>Load action:</b> {attachmentInfo.loadAction}\n- {attachmentInfo.loadReason}"
421+
text = $"<b>Load action:</b> {attachmentInfo.attachment.loadAction}\n- {attachmentInfo.loadReason}"
388422
});
389423

390424
bool addMsaaInfo = !string.IsNullOrEmpty(attachmentInfo.storeMsaaReason);
391425
string resolvedTexturePrefix = addMsaaInfo ? "Resolved surface: " : "";
392426

393-
string storeActionText = $"<b>Store action:</b> {attachmentInfo.storeAction}" +
427+
string storeActionText = $"<b>Store action:</b> {attachmentInfo.attachment.storeAction}" +
394428
$"\n - {resolvedTexturePrefix}{attachmentInfo.storeReason}";
395429

396430
if (addMsaaInfo)

Packages/com.unity.render-pipelines.core/Runtime/Debug/ProbeVolumeDebugBase.hlsl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ float GetCurrentExposureMultiplier()
3535
return LOAD_TEXTURE2D(_ExposureTexture, int2(0, 0)).x;
3636
}
3737

38+
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureXR.hlsl"
3839
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl"
3940
#include "Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/DecodeSH.hlsl"
4041
#include "Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolume.hlsl"
@@ -267,6 +268,7 @@ bool ShouldCull(inout v2f o)
267268
bool shouldCull = false;
268269
if (distance(position.xyz + _APVWorldOffset, GetCurrentViewPosition()) > _CullDistance || brickSize > _MaxAllowedSubdiv || brickSize < _MinAllowedSubdiv)
269270
{
271+
ZERO_INITIALIZE(v2f, o);
270272
DoCull(o);
271273
shouldCull = true;
272274
}

Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceData/InstanceDataSystem.Jobs.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ private unsafe struct ProbesUpdateJob : IJobParallelForBatch
379379
{
380380
public const int k_BatchSize = 64;
381381

382-
[ReadOnly] public bool initialize;
383382
[NativeDisableContainerSafetyRestriction, NoAlias][ReadOnly] public NativeArray<InstanceHandle> instances;
384383
[NativeDisableParallelForRestriction][NativeDisableContainerSafetyRestriction, NoAlias] public CPUInstanceData instanceData;
385384
[ReadOnly] public CPUSharedInstanceData sharedInstanceData;
@@ -403,11 +402,6 @@ public void Execute(int startIndex, int count)
403402

404403
int sharedInstanceIndex = sharedInstanceData.InstanceToIndex(instanceData, instance);
405404
TransformUpdateFlags flags = sharedInstanceData.flags[sharedInstanceIndex].transformUpdateFlags;
406-
bool isStaticObject = (flags & TransformUpdateFlags.IsPartOfStaticBatch) != 0;
407-
408-
if (!initialize && isStaticObject)
409-
continue;
410-
411405
bool hasLightProbe = (flags & TransformUpdateFlags.HasLightProbeCombined) != 0;
412406

413407
if (!hasLightProbe)
@@ -976,7 +970,7 @@ public void Execute(int index)
976970
instanceData.editorData.selectedBits.Set(instanceData.InstanceToIndex(instance), true);
977971
}
978972
}
979-
973+
980974
#endif
981975
}
982976
}

0 commit comments

Comments
 (0)