Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
81500ca
[Port] [6000.2] Fix for incorrect buffer size when switching XR On/Off
svc-reach-platform-support Nov 13, 2025
41c22ac
[Port] [6000.2] [APV] Loading a baking set using the Load Baking Set …
svc-reach-platform-support Nov 13, 2025
52e6f4f
[Port] [6000.2] Force fixed exposure in the editor while scene view f…
svc-reach-platform-support Nov 14, 2025
f71f112
[Port] [6000.2] docg-7322: Clarify Keyword node behavior
svc-reach-platform-support Nov 14, 2025
23b1ca1
[Port] [6000.2] [VFX] Override unity_SpriteProps with default value
svc-reach-platform-support Nov 15, 2025
9e86c58
[Port] [6000.2] [UUM-90714] Fix for ShadowCaster2D breaks on certain …
svc-reach-platform-support Nov 19, 2025
ae40f79
[Port] [6000.2] Clean up the Shader Graph docs landing page
svc-reach-platform-support Nov 20, 2025
b88edf4
[6000.2] [UUM-125463] Fix warning thrown by worker thread from URP in…
RSlysz Nov 21, 2025
b696ca0
[Port] [6000.2] [UUM-126809] Save renderPipelineAsset before build
Nov 21, 2025
1029d74
[Port] [6000.2] Work around HLSLcc miscompilation on Metal in APV ble…
svc-reach-platform-support Nov 21, 2025
f862223
[Port] [6000.2] docg-7654: Remove text related to missing screenshot
svc-reach-platform-support Nov 25, 2025
6fc25e7
[Port] [6000.2] Fixed Additional Data missing warning from Debug UI w…
svc-reach-platform-support Nov 25, 2025
afeb1ba
[Port] [6000.2] docg-7325: Specify that Shader Graph doesn't support …
svc-reach-platform-support Nov 27, 2025
b0927ef
[Port] [6000.2] Fix for UUM-119990
svc-reach-platform-support Nov 28, 2025
e50a291
[Port] [6000.2] docg-6776: clarify Custom Function uniform usage and …
svc-reach-platform-support Nov 28, 2025
fb56b49
[Port] [6000.2] docg-7297: Clarify explicit LOD behavior in Sample Te…
svc-reach-platform-support Nov 28, 2025
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 @@ -30,7 +30,7 @@ public int selectedPanel
get => Mathf.Max(0, DebugManager.instance.PanelIndex(selectedPanelDisplayName));
set
{
var displayName = DebugManager.instance.PanelDiplayName(value);
var displayName = DebugManager.instance.PanelDisplayName(value);
if (!string.IsNullOrEmpty(displayName))
selectedPanelDisplayName = displayName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ void BakingGUI()
activeSet = newSet;

ProbeReferenceVolume.instance.Clear();
ProbeReferenceVolume.instance.SetActiveBakingSet(newSet);
}

if (activeSet != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ private void Reset()
/// <param name="settings"><see cref="IDebugDisplaySettings"/> to be registered</param>
public void RegisterDebug(IDebugDisplaySettings settings)
{
#if UNITY_EDITOR
if (UnityEditor.BuildPipeline.isBuildingPlayer)
return;
#endif
DebugManager debugManager = DebugManager.instance;
List<IDebugDisplaySettingsPanelDisposable> panels = new List<IDebugDisplaySettingsPanelDisposable>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,24 @@ public int PanelIndex([DisallowNull] string displayName)
return -1;
}


/// <summary>
/// Returns the panel display name
/// </summary>
/// <param name="panelIndex">The panelIndex for the panel to get the name</param>
/// <returns>The display name of the panel, or empty string otherwise</returns>
[Obsolete("Method is obsolete. Use PanelDisplayName instead. #from(6000.4) (UnityUpgradable) -> PanelDisplayName", true)]
public string PanelDiplayName(int panelIndex)
{
return PanelDisplayName(panelIndex);
}

/// <summary>
/// Returns the panel display name
/// </summary>
/// <param name="panelIndex">The panelIndex for the panel to get the name</param>
/// <returns>The display name of the panel, or empty string otherwise</returns>
public string PanelDiplayName([DisallowNull] int panelIndex)
public string PanelDisplayName(int panelIndex)
{
if (panelIndex < 0 || panelIndex > m_Panels.Count - 1)
return string.Empty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,7 @@ IEnumerable<Camera> cameras

if (camera.cameraType != CameraType.Preview && camera.cameraType != CameraType.Reflection)
{
if (!camera.TryGetComponent<IAdditionalData>(out var additionalData))
Debug.LogWarning($"Camera {camera.name} does not contain an additional camera data component. Open the Game Object in the inspector to add additional camera data.");
else
if (camera.TryGetComponent<IAdditionalData>(out _))
m_Cameras.Add(camera);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@ struct APVResources

struct APVResourcesRW
{
#ifdef SHADER_API_METAL
// We need to use float4 on Metal, since HLSLcc will generate invalid MSL otherwise.
// See https://jira.unity3d.com/browse/UUM-127198
RWTexture3D<float4> L0_L1Rx;
#else
RWTexture3D<half4> L0_L1Rx;
#endif
RWTexture3D<unorm float4> L1G_L1Ry;
RWTexture3D<unorm float4> L1B_L1Rz;
RWTexture3D<unorm float4> L2_0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ Texture3D<float4> _State1_L0_L1Rx;
Texture3D<float4> _State1_L1G_L1Ry;
Texture3D<float4> _State1_L1B_L1Rz;

#ifdef SHADER_API_METAL
// We need to use float4 on Metal, since HLSLcc will generate invalid MSL otherwise.
// See https://jira.unity3d.com/browse/UUM-127198
RWTexture3D<float4> _Out_L0_L1Rx;
#else
RWTexture3D<half4> _Out_L0_L1Rx;
#endif
RWTexture3D<unorm float4> _Out_L1G_L1Ry;
RWTexture3D<unorm float4> _Out_L1B_L1Rz;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
#pragma multi_compile_local _ PROBE_VOLUMES_SKY_SHADING_DIRECTION
#pragma multi_compile_local _ PROBE_VOLUMES_PROBE_OCCLUSION

#ifdef SHADER_API_METAL
// We need to use float4 on Metal, since HLSLcc will generate invalid MSL otherwise.
// See https://jira.unity3d.com/browse/UUM-127198
RWTexture3D<float4> _Out_L0_L1Rx;
#else
RWTexture3D<half4> _Out_L0_L1Rx;
#endif
RWTexture3D<unorm float4> _Out_L1G_L1Ry;
RWTexture3D<unorm float4> _Out_L1B_L1Rz;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,11 @@ void UnregisterRenderingDebug()

internal void RegisterDebug()
{
#if UNITY_EDITOR
if (UnityEditor.BuildPipeline.isBuildingPlayer)
return;
#endif

RegisterMaterialDebug();
RegisterLightingDebug();
RegisterRenderingDebug();
Expand All @@ -2142,6 +2147,9 @@ internal void UnregisterDebug()

void UnregisterDebugItems(string panelName, DebugUI.Widget[] items)
{
if (items == null || items.Length == 0)
return;

var panel = DebugManager.instance.GetPanel(panelName);
if (panel != null)
panel.children.Remove(items);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ String resToString(uint a, uint b)

private void UpdateDebugUITable()
{
if (m_DlssViewStateTableRows == null)
return;

for (int r = 0; r < m_DlssViewStateTableRows.Length; ++r)
{
var d = m_Data.dlssFeatureInfos[r].data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,7 @@ internal static void SetExposureTextureToEmpty(RTHandle exposureTexture)
bool IsExposureFixed(HDCamera camera) => m_Exposure.mode.value == ExposureMode.Fixed || m_Exposure.mode.value == ExposureMode.UsePhysicalCamera
#if UNITY_EDITOR
|| (camera.camera.cameraType == CameraType.SceneView && HDAdditionalSceneViewSettings.sceneExposureOverriden)
|| (UnityEditor.SceneView.lastActiveSceneView != null && UnityEditor.SceneView.lastActiveSceneView.isUsingSceneFiltering)
#endif
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,7 @@ public HDRenderPipeline(HDRenderPipelineAsset asset)

m_DepthPyramidMipLevelOffsetsBuffer = new ComputeBuffer(15, sizeof(int) * 2);

m_CustomPassColorBuffer = new Lazy<RTHandle>(() => RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetCustomBufferFormat(), enableRandomWrite: true, useDynamicScale: true, name: "CustomPassColorBuffer"));
m_CustomPassDepthBuffer = new Lazy<RTHandle>(() => RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.None, useDynamicScale: true, name: "CustomPassDepthBuffer", depthBufferBits: CoreUtils.GetDefaultDepthBufferBits()));
AllocateCustomPassBuffers();

// For debugging
MousePositionDebug.instance.Build();
Expand Down Expand Up @@ -2239,6 +2238,14 @@ protected override void Render(ScriptableRenderContext renderContext, List<Camer
// so will present rendering at native resolution. This will only pay a small cost of memory on the texture aliasing that the runtime has to keep track of.
RTHandles.SetHardwareDynamicResolutionState(m_Asset.currentPlatformRenderPipelineSettings.dynamicResolutionSettings.dynResType == DynamicResolutionType.Hardware);

// This is to ensure that custom pass buffers have the adequate depth/number of slices when switching from XR enabled/disabled
if (m_CustomPassColorBuffer.Value.rt.volumeDepth != TextureXR.slices)
{
RTHandles.Release(m_CustomPassColorBuffer.Value);
RTHandles.Release(m_CustomPassDepthBuffer.Value);
AllocateCustomPassBuffers();
}

// Culling loop
foreach ((Camera camera, XRPass xrPass) in xrLayout.GetActivePasses())
{
Expand Down Expand Up @@ -3399,5 +3406,11 @@ static void AdjustUIOverlayOwnership(int cameraCount)
SupportedRenderingFeatures.active.rendersUIOverlay = true;
}
}

void AllocateCustomPassBuffers()
{
m_CustomPassColorBuffer = new Lazy<RTHandle>(() => RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GetCustomBufferFormat(), enableRandomWrite: true, useDynamicScale: true, name: "CustomPassColorBuffer"));
m_CustomPassDepthBuffer = new Lazy<RTHandle>(() => RTHandles.Alloc(Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, colorFormat: GraphicsFormat.None, useDynamicScale: true, name: "CustomPassDepthBuffer", depthBufferBits: CoreUtils.GetDefaultDepthBufferBits()));
}
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ public static object GetMaterialFromMethod(this MethodInfo method,
// and we've already checked for other possible null exceptions here
if ((e.InnerException is NullReferenceException))
{
Debug.LogWarning(generateErrorString(method.Name, obj.name));
if (generateErrorString != null)
Debug.LogWarning(generateErrorString(method.Name, obj.name));
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,35 +45,94 @@ internal class ReadonlyMaterialConverter : RenderPipelineConverter

List<string> guids = new List<string>();

public Material[] GetBuiltInMaterials()
{
using (UnityEngine.Pool.ListPool<Material>.Get(out var tmp))
{
foreach (var materialName in ReadonlyMaterialMap.Map.Keys)
{
var name = materialName + ".mat";

Material mat = null;
foreach (var material in AssetDatabaseHelper.FindAssets<Material>())
{
if (material.name == materialName)
{
mat = material;
break;
}
}

if (mat == null)
{
mat = AssetDatabase.GetBuiltinExtraResource<Material>(name);
if (mat == null)
{
mat = Resources.GetBuiltinResource<Material>(name);
if (mat == null)
{
mat = Resources.Load<Material>(name);
}
}
}

if (mat == null)
{
Debug.LogError($"Material '{materialName}' not found in built-in resources or project assets.");
continue;
}

tmp.Add(mat);
}
return tmp.ToArray();
}
}

private string BuildQuery()
{
using (UnityEngine.Pool.ListPool<string>.Get(out var tmp))
{
var materials = GetBuiltInMaterials();
foreach (var mat in materials)
{
string formattedId = $"<$object:{GlobalObjectId.GetGlobalObjectIdSlow(mat)},UnityEngine.Object$>";
tmp.Add($"ref={formattedId}");
}

return string.Join(" or ", tmp) + " -t:RenderPipelineGlobalSettings";
}
}

public override void OnInitialize(InitializeConverterContext ctx, Action callback)
{
var query = BuildQuery();
Search.SearchService.Request
(
Search.SearchService.CreateContext("asset", "urp=convert-readonly a=URPConverterIndex"),
Search.SearchService.CreateContext(new[] { "asset", "scene" }, query),
(searchContext, items) =>
{
// we're going to do this step twice in order to get them ordered, but it should be fast
var orderedRequest = items.OrderBy(req =>
foreach (var r in items)
{
GlobalObjectId.TryParse(req.id, out var gid);
return gid.assetGUID;
});
if (r == null || r.id == null)
continue;

foreach (var r in orderedRequest)
{
if (string.IsNullOrEmpty(r?.id) ||
!GlobalObjectId.TryParse(r.id, out var gid))
{
// Direct conversion - works for both assets and scene objects
var unityObject = r.ToObject();

if (unityObject == null)
continue;
}

var label = r.provider.fetchLabel(r, r.context);
var description = r.provider.fetchDescription(r, r.context);

var gid = GlobalObjectId.GetGlobalObjectIdSlow(unityObject);
int type = gid.identifierType; // 1=Asset, 2=SceneObject

var go = unityObject as GameObject;
var item = new ConverterItemDescriptor()
{
name = description.Split('/').Last().Split('.').First(),
info = $"{label}",
name = $"{unityObject.name} ({(type == 1 ? "Prefab" : "SceneObject")})",
info = type == 1 ? AssetDatabase.GetAssetPath(unityObject) : go.scene.path,
};
guids.Add(gid.ToString());

Expand Down
Loading