Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
437bed0
Fix dark screen HDR output and missing variants in HDRP Rendering Deb…
SuminCho1 Mar 27, 2026
47ff438
Disable unstable Upscalers test
AngelaDematte Mar 31, 2026
7781b1e
Disable unstable Materials test
AngelaDematte Apr 1, 2026
0e90fdd
[Port] [6000.5] Exposed serialized m_ShouldUseConservativeEnclosingSp…
svc-reach-platform-support Apr 1, 2026
0cba8f0
[Port] [6000.5] [UUM-136415][6000.6][URP 2D] Add capture pass for rec…
svc-reach-platform-support Apr 2, 2026
6da04e1
[Port] [6000.5] Missing null check when destroying runtime debug UI b…
svc-reach-platform-support Apr 2, 2026
8629989
[Port] [6000.5] Shader graph documentation feedback improvements - sp…
svc-reach-platform-support Apr 2, 2026
17d2476
[Port] [6000.5] DOCG-7573 - Shader Graph documentation for Custom Mat…
sebastienduverne Apr 7, 2026
8a0f989
[Port] [6000.5] Document variable rate shading
svc-reach-platform-support Apr 7, 2026
440f10d
[6000.5] Fix Shader truncation warning in CopyDepthPass
Apr 8, 2026
79569c6
[Backport] [6000.5] Fix Quad Views post-processing UV mapping for on-…
qgu-unity Apr 8, 2026
48e7736
[Port] [6000.5] Fix NRE in CustomPass editor when DRS is enabled
svc-reach-platform-support Apr 8, 2026
8e15ec0
[Port] [6000.5] [SRP] Fix building errors with RSUV sample
svc-reach-platform-support Apr 8, 2026
d36031d
[Port] [6000.5] HDRP: Rendering Debugger - "Freeze Camera For Culling…
svc-reach-platform-support Apr 9, 2026
d0d641e
[Port] [6000.5] SRP Core utils - Make sure the folder separator is th…
svc-reach-platform-support Apr 9, 2026
5c302c1
[Port] [6000.5] Fix On Tile PostProcessing not rendering properly wit…
svc-reach-platform-support Apr 9, 2026
1c1e679
[Port] [6000.5] Fixed Default Volume profile bugs
svc-reach-platform-support Apr 9, 2026
5fbd581
[Port] [6000.5] [Core] Fix obsolete use of FindFirstObjectByType in s…
svc-reach-platform-support Apr 9, 2026
54f1aaf
Search table view multi edit fixes (6.5 backport)
lochrist Apr 11, 2026
d23db76
[Port] [6000.5] [2d] Fix case where URP-2D shaders are used with Vfx …
svc-reach-platform-support Apr 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ internal static string GetBakingMode(ProbeVolumeBakingSet bakingSet)

internal static void SetBakingMode(ProbeVolumeBakingSet bakingSet, string mode)
{
Undo.RecordObject(bakingSet, "Change Baking Mode");
bakingSet.singleSceneMode = (mode == "Single Scene");
}

Expand All @@ -318,6 +319,7 @@ internal static int GetSkyOcclusionBakingSamples(ProbeVolumeBakingSet bakingSet)

internal static void SetSkyOcclusionBakingSamples(ProbeVolumeBakingSet bakingSet, int samples)
{
Undo.RecordObject(bakingSet, "Change Occlusion Baking");
bakingSet.skyOcclusionBakingSamples = samples;
}

Expand All @@ -334,6 +336,7 @@ internal static void SetVolumeMode(GameObject go, string mode)
if (!go.TryGetComponent<Volume>(out var volume))
return;

Undo.RecordObject(volume, "Change Volume Mode");
volume.isGlobal = (mode == "Global");
}

Expand All @@ -350,6 +353,7 @@ internal static void SetVolumeProfile(GameObject go, VolumeProfile profile)
if (!go.TryGetComponent<Volume>(out var volume))
return;

Undo.RecordObject(volume, "Change Volume Profile");
volume.sharedProfile = profile;
}

Expand All @@ -368,6 +372,7 @@ internal static void SetLightShape(GameObject go, LightType value)

if (IsLightShapeApplicable(value))
{
Undo.RecordObject(light, "Change light Shape");
light.type = value;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,41 @@ public CameraSelector()
private Camera[] m_CamerasArray;
private List<Camera> m_Cameras = new List<Camera>();

#if ENABLE_RENDERING_DEBUGGER_UI
/// <inheritdoc/>
protected override VisualElement Create()
{
var objectPopUpField = base.Create() as UIElements.PopupField<UnityEngine.Object>;

if (objectPopUpField == null)
return new Label("Error creating CameraSelector field");

objectPopUpField.choices ??= new List<UnityEngine.Object>() { null };

// Refresh the dropdown choices to keep it in sync with available cameras in the scene.
// NOTE: If the currently selected camera is deleted, PopupField handles it internally,
// so we only need to maintain the available choices list.
this.ScheduleTracked(objectPopUpField, () => objectPopUpField.schedule.Execute(() =>
{
// Using ListPool and SequenceEqual to avoid unnecessary allocations and UI updates
using (UnityEngine.Pool.ListPool<UnityEngine.Object>.Get(out var tmp))
{
tmp.Add(null);
tmp.AddRange(getObjects());

if (!tmp.SequenceEqual(objectPopUpField.choices))
{
objectPopUpField.choices.Clear();
objectPopUpField.choices.AddRange(tmp);
}
}

}).Every(500));

return objectPopUpField;
}
#endif

IEnumerable<Camera> cameras
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,22 +308,19 @@ internal VisualElement ToVisualElement(Context context)
m_Context = context;
m_VisualElement = Create();

//Debug.Log($"ToVisualElement for {queryPath}");

if (m_VisualElement == null)
{
Debug.LogWarning($"Unable to create a Visual Element for type {GetType()}");
return null;
}
m_VisualElement.AddToClassList("unity-inspector-element");

m_VisualElement.name = displayName;

#if UNITY_EDITOR
// Support for legacy state handling
if (this is ISupportsLegacyStateHandling legacyStateWidget)
{
m_RequiresLegacyStateHandling = legacyStateWidget.RequiresLegacyStateHandling();
//Debug.Log($"LegacyState: {m_RequiresLegacyStateHandling} ({queryPath})");
}
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void OnDestroy()

// Need to unregister here as well because when the UI is closed and reopened, it is a different object so the member
// function will be a different object and the Unregister call in RecreateGUI does nothing.
m_PanelRootElement.UnregisterCallback<NavigationMoveEvent>(ConvertNavigationMoveEvents, TrickleDown.TrickleDown);
m_PanelRootElement?.UnregisterCallback<NavigationMoveEvent>(ConvertNavigationMoveEvents, TrickleDown.TrickleDown);
}

DebugManager.instance.displayRuntimeUI = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1845,32 +1845,48 @@ public static IEnumerable<T> LoadAllAssets<T>(string extension = "asset", bool a
}
}

const char k_DirectorySeparatorChar = '/';

/// <summary>
/// Create any missing folders in the file path given.
/// </summary>
/// <param name="filePath">File or folder (ending with '/') path to ensure existence of each subfolder in. </param>
/// <param name="filePath">File or folder (ending with '/') path to ensure existence of each subfolder in.</param>
public static void EnsureFolderTreeInAssetFilePath(string filePath)
{
var path = filePath.Replace('\\', Path.DirectorySeparatorChar).Replace('/', Path.DirectorySeparatorChar);
if (!path.StartsWith("Assets" + Path.DirectorySeparatorChar, StringComparison.CurrentCultureIgnoreCase))
throw new ArgumentException($"Path should start with \"Assets/\". Got {filePath}.", filePath);
if (string.IsNullOrEmpty(filePath))
return;

// Normalize to forward slashes (Unity standard)
var path = filePath.Replace('\\', k_DirectorySeparatorChar);

if (!path.StartsWith("Assets/", StringComparison.Ordinal))
throw new ArgumentException($"Path should start with \"Assets/\". Got {filePath}.", nameof(filePath));

var folderPath = Path.GetDirectoryName(path);

if (!UnityEditor.AssetDatabase.IsValidFolder(folderPath))
if (string.IsNullOrEmpty(folderPath))
return;

// GetDirectoryName may reintroduce backslashes on Windows
folderPath = folderPath.Replace('\\', k_DirectorySeparatorChar);

// Early exit if folder already exists
if (AssetDatabase.IsValidFolder(folderPath))
return;

var folderNames = folderPath.Split(k_DirectorySeparatorChar);
string currentPath = "Assets";

for (int i = 1; i < folderNames.Length; ++i)
{
var folderNames = folderPath.Split(Path.DirectorySeparatorChar);
string rootPath = "";
foreach (var folderName in folderNames)
{
var newPath = rootPath + folderName;
if (!UnityEditor.AssetDatabase.IsValidFolder(newPath))
UnityEditor.AssetDatabase.CreateFolder(rootPath.TrimEnd(Path.DirectorySeparatorChar), folderName);
rootPath = newPath + Path.DirectorySeparatorChar;
}
string nextPath = currentPath + k_DirectorySeparatorChar + folderNames[i];
if (!UnityEditor.AssetDatabase.IsValidFolder(nextPath))
UnityEditor.AssetDatabase.CreateFolder(currentPath, folderNames[i]);
currentPath = nextPath;
}
}


/// <summary>
/// Returns the icon for the given type if it has an IconAttribute.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,25 +328,6 @@ internal void SetOverridesTo(IEnumerable<VolumeParameter> enumerable, bool state
}
}

/// <summary>
/// A custom hashing function that Unity uses to compare the state of parameters.
/// </summary>
/// <returns>A computed hash code for the current instance.</returns>
public override int GetHashCode()
{
unchecked
{
//return parameters.Aggregate(17, (i, p) => i * 23 + p.GetHash());

int hash = 17;

for (int i = 0; i < parameterList.Length; i++)
hash = hash * 23 + parameterList[i].GetHashCode();

return hash;
}
}

/// <summary>
/// Returns true if any of the volume properites has been overridden.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,16 +272,14 @@ public void Initialize(VolumeProfile globalDefaultVolumeProfile = null, VolumePr
void InitializeBaseTypesArray(VolumeProfile globalDefaultVolumeProfile = null)
{
using var profilerScope = k_ProfilerMarkerInitializeBaseTypesArray.Auto();
#if UNITY_EDITOR
LoadBaseTypesByReflection(GraphicsSettings.currentRenderPipelineAssetType);
#else
#if !UNITY_EDITOR
if (globalDefaultVolumeProfile == null)
{
var defaultVolumeProfileSettings = GraphicsSettings.GetRenderPipelineSettings<IDefaultVolumeProfileAsset>();
globalDefaultVolumeProfile = defaultVolumeProfileSettings?.defaultVolumeProfile;
}
LoadBaseTypes(globalDefaultVolumeProfile);
#endif
LoadBaseTypes(GraphicsSettings.currentRenderPipelineAssetType, globalDefaultVolumeProfile);
}

//This is called by test where the basetypes are tuned for the purpose of the test.
Expand Down Expand Up @@ -323,7 +321,7 @@ public void Deinitialize()
/// <param name="profile">The VolumeProfile to use as the global default profile.</param>
public void SetGlobalDefaultProfile(VolumeProfile profile)
{
LoadBaseTypes(profile);
LoadBaseTypes(GraphicsSettings.currentRenderPipelineAssetType, profile);
globalDefaultProfile = profile;
EvaluateVolumeDefaultState();
}
Expand Down Expand Up @@ -435,8 +433,9 @@ public void DestroyStack(VolumeStack stack)
/// LoadBaseTypes is responsible for loading the list of VolumeComponent types that will be used to build the default state of the VolumeStack. It uses the provided global default profile to determine which component types are relevant for the current render pipeline.
/// This will be called only once at runtime on app boot
/// </summary>
/// <param name="rpType">The Pipeline Type used to check if each VolumeComponent is supported.</param>
/// <param name="globalDefaultVolumeProfile">The global default volume profile to use to build the base component type array.</param>
internal void LoadBaseTypes(VolumeProfile globalDefaultVolumeProfile)
internal void LoadBaseTypesByDefaultVolume(Type rpType, VolumeProfile globalDefaultVolumeProfile)
{
if (globalDefaultVolumeProfile == null)
{
Expand All @@ -446,13 +445,13 @@ internal void LoadBaseTypes(VolumeProfile globalDefaultVolumeProfile)

using (ListPool<Type>.Get(out var list))
{
var pipelineAssetType = GraphicsSettings.currentRenderPipelineAssetType;
foreach (var comp in globalDefaultVolumeProfile.components)
{
if (comp == null) continue;
if (comp == null)
continue;

var componentType = comp.GetType();
if (!SupportedOnRenderPipelineAttribute.IsTypeSupportedOnRenderPipeline(componentType, pipelineAssetType))
if (!SupportedOnRenderPipelineAttribute.IsTypeSupportedOnRenderPipeline(componentType, rpType))
continue;

list.Add(componentType);
Expand Down Expand Up @@ -481,15 +480,30 @@ internal Type[] LoadBaseTypesByReflection(Type pipelineAssetType)
if (!SupportedOnRenderPipelineAttribute.IsTypeSupportedOnRenderPipeline(t, pipelineAssetType))
continue;

if (t.GetCustomAttribute<ObsoleteAttribute>() != null)
continue;

list.Add(t);
}

m_BaseComponentTypeArray = list.ToArray();
}

return m_BaseComponentTypeArray;
}
#endif
/// <summary>
/// Helper to choose a type loading depending if we are in Editor and Standalone.
/// </summary>
/// <param name="pipelineAssetType">The Pipeline Type used to check if each VolumeComponent is supported.</param>
/// <param name="globalDefaultVolumeProfile">The global default volume profile to use to build the base component type array.</param>
void LoadBaseTypes(Type pipelineAssetType, VolumeProfile globalDefaultVolumeProfile = null)
{
#if UNITY_EDITOR
LoadBaseTypesByReflection(pipelineAssetType);
#else
LoadBaseTypesByDefaultVolume(pipelineAssetType, globalDefaultVolumeProfile);
#endif
}

internal void InitializeVolumeComponents()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,33 +321,16 @@ public bool TryGetAllSubclassOf<T>(Type type, List<T> result)
return count != result.Count;
}

/// <summary>
/// A custom hashing function that Unity uses to compare the state of parameters.
/// </summary>
/// <returns>A computed hash code for the current instance.</returns>
public override int GetHashCode()
{
unchecked
{
int hash = 17;

for (int i = 0; i < components.Count; i++)
hash = hash * 23 + components[i].GetHashCode();

return hash;
}
}

internal int GetComponentListHashCode()
{
unchecked
{
int hash = 17;
var hashCode = HashFNV1A32.Create();

for (int i = 0; i < components.Count; i++)
hash = hash * 23 + components[i].GetType().GetHashCode();
hashCode.Append(components[i].GetType().GetHashCode());

return hash;
return hashCode.value;
}
}

Expand Down
5 changes: 5 additions & 0 deletions Packages/com.unity.render-pipelines.core/Runtime/Vrs/Vrs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ class VisualizationPassData
/// <summary>
/// Check if conversion of color texture to shading rate image is supported.
/// Convenience to abstract all capabilities checks.
///
/// The `IsColorMaskTextureConversionSupported` method checks for the following:
///- VRS hardware support through [ShadingRateInfo.supportsPerImageTile](xref:UnityEngine.Rendering.ShadingRateInfo.supportsPerImageTile). The `supportsPerImageTile` property determines whether your GPU can define different quality levels to different tiles.
///- Compute shader support through [SystemInfo.supportsComputeShaders](xref:UnityEngine.Device.SystemInfo.supportsComputeShaders)
///- Proper initialization of VRS utility functions and compute shaders required for converting color textures to shading rate image (SRI). This is automatically handled by the render pipeline. However, for custom implementations, you must call <see cref="InitializeResources"/> manually.
/// </summary>
/// <returns>Returns true if conversion of color texture to shading rate image is supported, false otherwise.</returns>
public static bool IsColorMaskTextureConversionSupported()
Expand Down
19 changes: 19 additions & 0 deletions Packages/com.unity.render-pipelines.core/Runtime/XR/XRLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,24 @@ public class XRLayout
{
readonly List<(Camera, XRPass)> m_ActivePasses = new List<(Camera, XRPass)>();

/// <summary>
/// State container for Quad View rendering, used to cache data across render passes.
/// </summary>
public QuadViewState quadView;

/// <summary>
/// Contains cached state for Quad View XR rendering.
/// Quad View is an XR rendering mode where peripheral (outer) and foveal (inner) views are rendered separately.
/// </summary>
public struct QuadViewState
{
/// <summary>
/// Cached vignette center from the peripheral (outer) view pass.
/// Used by the inner view pass to ensure vignette effect is consistent across both views.
/// </summary>
public Vector4 cachedPeripheralVignetteCenter;
}

/// <summary>
/// Configure the layout to render from the specified camera by generating passes from the the connected XR device.
/// </summary>
Expand Down Expand Up @@ -76,6 +94,7 @@ internal void Clear()
}

m_ActivePasses.Clear();
quadView = default;
}

internal void LogDebugInfo()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public XRLayout New()
return layout;
}

public bool hasLayout => m_Stack.Count > 0;

public XRLayout top => m_Stack.Peek();

public void Release()
Expand Down
Loading
Loading