Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
040d867
[Port] [6000.0] Prevent merging passes with texture read/write confli…
svc-reach-platform-support Sep 11, 2025
38ee9e0
[6000.0] Add missing vertex SH keyword to URP lit shaders
pema99 Sep 11, 2025
5f69163
[Port] [6000.0] Shader Graph Heatmap color mode details in docs
svc-reach-platform-support Sep 11, 2025
f21cee4
[Port] [6000.0] Fix "Don't Recalculate" probe placement not working w…
svc-reach-platform-support Sep 14, 2025
4167f67
[Port] [6000.0] [VFX] Small UI fixes
svc-reach-platform-support Sep 14, 2025
be87e3d
[Port] [6000.0] [VFX] Avoid slow allocations in the VFXBatch update r…
ludovic-theobald Sep 15, 2025
5f51c6e
[Port] [6000.0] [VFX] Show "Radius Scale" property when "Frustum Cull…
svc-reach-platform-support Sep 15, 2025
458967c
[Port] [6000.0] [VFX] Improve editing prewarm values for visual effec…
svc-reach-platform-support Sep 15, 2025
c0a18b9
[Port] [6000.0] [Particles] Change default particle material for HDRP…
svc-reach-platform-support Sep 15, 2025
7dd3432
[Port] [6000.0] Fixed a [Scene Color Sampling fails when using a cust…
svc-reach-platform-support Sep 15, 2025
9f06511
[Port] [6000.0] [URP] Added check logic related to OpenGL devices in …
svc-reach-platform-support Sep 15, 2025
4ff57e3
[Port] [6000.0] [VFX] Fixed enum field was not set properly and then …
svc-reach-platform-support Sep 15, 2025
4fc615e
[Port] [6000.0] [UUM-116587][UUM-116583][6000.4][URP 2D] Fix Light 2D…
svc-reach-platform-support Sep 16, 2025
055dbb4
[Port] [6000.0] [URP][ShaderGraph] Add SrcBlendAlpha and DstBlendAlph…
svc-reach-platform-support Sep 16, 2025
50a545a
[Port] [6000.0] DOCG-7736 - Custom Function node ref page improvements
sebastienduverne Sep 16, 2025
0f4fd97
[Port] [6000.0] Screen Space Ambient Occlusion is not visible when th…
SuminCho1 Sep 16, 2025
8f3e9d3
[Port] [6000.0] Fix URP Lit shader for mobile WebGL
svc-reach-platform-support Sep 22, 2025
6ab1204
[Port] [6000.0] [UUM-116276][6000.4][2D] Fix Rendering Debug views fo…
kennytann Sep 22, 2025
bc2f460
[Port] [6000.0] [VFX] Prevent the output category in the blackboard f…
svc-reach-platform-support Sep 22, 2025
18d29cd
[Port] [6000.0] [URP] Fix light flickering with deferred, shadow, and…
svc-reach-platform-support Sep 22, 2025
82ee830
[6000.0] [Switch2] changes for packages (from trunk)
timcannellunity3d Sep 23, 2025
cfefab2
[Port] [6000.0] [UUM-113119] Fixed specular highlight appearing on te…
svc-reach-platform-support Sep 24, 2025
560e38f
Update all SRP test projects to use the latest 8.x GTF version
theo-at-unity Sep 24, 2025
6e86d03
Fix Rendering Debugger not displaying volumes using the instantiated …
arttu-peltonen Sep 25, 2025
3b46369
[Port] [6000.0] [URP] Fix Screen Space Shadows depth precision issue
svc-reach-platform-support Sep 25, 2025
053e49f
[Port] [6000.0] [VFX/SG] Improve Error with invalid SG Target
svc-reach-platform-support Sep 29, 2025
fd57124
[Port] [6000.0] [VFX/SG] Fix Parallax Occlusion Node
svc-reach-platform-support Sep 29, 2025
daa914f
[Port] [6000.0] Added the use of RenderingLayersTexture to the Render…
svc-reach-platform-support Sep 29, 2025
de31da2
[Port] [6000.0] Volume profile context action fixes
svc-reach-platform-support Sep 29, 2025
c2846e5
[Port] [6000.0] [ShaderGraph] backport fixes
svc-reach-platform-support Sep 29, 2025
59d8ae9
[Port] [6000.0] Disable GPUResidentDrawer on VisionOS
svc-reach-platform-support Sep 29, 2025
8baa525
[Port] [6000.0] [VFX] NRE in node search when double clicking on a se…
svc-reach-platform-support Sep 29, 2025
362311d
[Port] [6000.0] [HDRP] Fix water system debug mode for tesselation on…
svc-reach-platform-support Sep 30, 2025
7e1682a
[Port] [6000.0] Remove GPUResidentDrawerResources.asset, no longer us…
svc-reach-platform-support Sep 30, 2025
1352a19
Add missing include in HLSL file
ApoorvaJ Oct 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,13 @@ static ProbeSubdivisionResult GetBricksFromLoaded()
var dataList = GetPerSceneDataList();
var result = new ProbeSubdivisionResult();

// We read bricks from the asset rather than using the currently loaded cells.
// This is because not all bricks from the previous bake are guaranteed to be currently loaded,
// we may for example have hit the max brick count given the selected memory budget.
ProbeVolumeStreamableAsset bricksDataAsset = m_BakingSet.cellBricksDataAsset;
bricksDataAsset.EnsureAssetLoaded();
using NativeArray<Brick> previousBricks = bricksDataAsset.asset.GetData<Brick>();

foreach (var data in dataList)
{
var cellSize = m_ProfileInfo.minDistanceBetweenProbes * 3.0f * m_ProfileInfo.cellSizeInBricks;
Expand All @@ -252,15 +259,20 @@ static ProbeSubdivisionResult GetBricksFromLoaded()
foreach (var cellIndex in cells)
{
var cellDesc = m_BakingSet.GetCellDesc(cellIndex);
var cellData = m_BakingSet.GetCellData(cellIndex);
var cellPos = cellDesc.position;

if (!result.scenesPerCells.ContainsKey(cellPos))
{
result.scenesPerCells[cellPos] = new HashSet<string>();

var center = new Vector3((cellPos.x + 0.5f) * cellSize, (cellPos.y + 0.5f) * cellSize, (cellPos.z + 0.5f) * cellSize);
result.cells.Add((cellPos, new Bounds(center, cellDimensions), cellData.bricks.ToArray()));

var cellStreamingDesc = bricksDataAsset.streamableCellDescs[cellIndex];
int bricksOffset = cellStreamingDesc.offset / bricksDataAsset.elementSize;
int bricksCount = Mathf.Min(cellStreamingDesc.elementCount, cellDesc.bricksCount);
Brick[] bricks = previousBricks.GetSubArray(bricksOffset, bricksCount).ToArray();

result.cells.Add((cellPos, new Bounds(center, cellDimensions), bricks));
}
result.scenesPerCells[cellPos].Add(data.sceneGUID);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma kernel DilateCell

#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch webgpu
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch switch2 webgpu

#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonLighting.hlsl"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#pragma kernel VoxelizeProbeVolumeData
#pragma kernel Subdivide

#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch webgpu
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch switch2 webgpu

// #pragma enable_d3d11_debug_symbols

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal webgpu switch
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal webgpu switch switch2
#define UNIFIED_RT_GROUP_SIZE_X 64
#define UNIFIED_RT_GROUP_SIZE_Y 1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ void OnVolumeComponentContextClick(Vector2 position, VolumeComponentEditor targe
menu.AddItem(VolumeProfileUtils.Styles.copySettings, false, () => VolumeComponentCopyPaste.CopySettings(targetComponent));

if (VolumeComponentCopyPaste.CanPaste(targetComponent))
menu.AddItem(VolumeProfileUtils.Styles.pasteSettings, false, () => VolumeComponentCopyPaste.PasteSettings(targetComponent));
menu.AddItem(VolumeProfileUtils.Styles.pasteSettings, false, () => VolumeComponentCopyPaste.PasteSettings(targetComponent, m_Profile));
else
menu.AddDisabledItem(VolumeProfileUtils.Styles.pasteSettings);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static void CopySettings(VolumeComponent targetComponent)
EditorGUIUtility.systemCopyBuffer = writer.ToString();
}

public static void PasteSettings(VolumeComponent targetComponent)
public static void PasteSettings(VolumeComponent targetComponent, VolumeProfile asset)
{
if (targetComponent == null)
return;
Expand All @@ -72,6 +72,11 @@ public static void PasteSettings(VolumeComponent targetComponent)
using var reader = new StringReader(EditorGUIUtility.systemCopyBuffer);
if (TryReadCopyBuffer(reader, out var typeAndValue))
JsonUtility.FromJsonOverwrite(typeAndValue[1], targetComponent);

if (EditorUtility.IsPersistent(asset))
{
EditorUtility.SetDirty(asset);
}
}

public static void CopySettings(List<VolumeComponent> targetComponents)
Expand All @@ -87,7 +92,7 @@ public static void CopySettings(List<VolumeComponent> targetComponents)
EditorGUIUtility.systemCopyBuffer = writer.ToString();
}

public static void PasteSettings(List<VolumeComponent> targetComponents)
public static void PasteSettings(List<VolumeComponent> targetComponents, VolumeProfile asset)
{
if (targetComponents == null || targetComponents.Count == 0)
return;
Expand All @@ -113,6 +118,11 @@ public static void PasteSettings(List<VolumeComponent> targetComponents)
JsonUtility.FromJsonOverwrite(typeAndValue[1], targetComponent);
}
}

if (EditorUtility.IsPersistent(asset))
{
EditorUtility.SetDirty(asset);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ void OnContextClick(Vector2 position, VolumeComponentEditor targetEditor, int id
if (VolumeComponentCopyPaste.CanPaste(targetComponent))
menu.AddItem(EditorGUIUtility.TrTextContent("Paste Settings"), false, () =>
{
VolumeComponentCopyPaste.PasteSettings(targetComponent);
VolumeComponentCopyPaste.PasteSettings(targetComponent, asset);
VolumeManager.instance.OnVolumeProfileChanged(asset);
});
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,29 +266,62 @@ void OnVolumeProfileContextClick()

if (profileRef != null)
{
bool hasNoComponents = profileRef.components.Count == 0;

var cloneLabel = targetVolume.HasInstantiatedProfile() ? Styles.saveLabel : Styles.cloneLabel;
menu.AddItem(cloneLabel, false, CloneProfile);
menu.AddSeparator(string.Empty);
menu.AddItem(VolumeProfileUtils.Styles.collapseAll, false, () =>

if (hasNoComponents)
{
VolumeProfileUtils.SetComponentEditorsExpanded(m_ComponentList.editors, false);
});
menu.AddItem(VolumeProfileUtils.Styles.expandAll, false, () =>
menu.AddDisabledItem(VolumeProfileUtils.Styles.collapseAll);
menu.AddDisabledItem(VolumeProfileUtils.Styles.expandAll);
}
else
{
VolumeProfileUtils.SetComponentEditorsExpanded(m_ComponentList.editors, true);
});
menu.AddItem(VolumeProfileUtils.Styles.collapseAll, false, () =>
{
VolumeProfileUtils.SetComponentEditorsExpanded(m_ComponentList.editors, false);
});
menu.AddItem(VolumeProfileUtils.Styles.expandAll, false, () =>
{
VolumeProfileUtils.SetComponentEditorsExpanded(m_ComponentList.editors, true);
});
}

menu.AddSeparator(string.Empty);
menu.AddItem(Styles.enableAll, false, () => SetComponentsActive(true));
menu.AddItem(Styles.disableAll, false, () => SetComponentsActive(false));
menu.AddItem(Styles.removeAll, false, () => m_ComponentList.RemoveAllComponents());
menu.AddItem(VolumeProfileUtils.Styles.resetAll, false, () => m_ComponentList.ResetAllComponents());

if (hasNoComponents)
{
menu.AddDisabledItem(Styles.enableAll);
menu.AddDisabledItem(Styles.disableAll);
menu.AddDisabledItem(Styles.removeAll);
menu.AddDisabledItem(VolumeProfileUtils.Styles.resetAll);
}
else
{
menu.AddItem(Styles.enableAll, false, () => SetComponentsActive(true));
menu.AddItem(Styles.disableAll, false, () => SetComponentsActive(false));
menu.AddItem(Styles.removeAll, false, () => m_ComponentList.RemoveAllComponents());
menu.AddItem(VolumeProfileUtils.Styles.resetAll, false, () => m_ComponentList.ResetAllComponents());
}

menu.AddSeparator(string.Empty);
menu.AddItem(VolumeProfileUtils.Styles.copyAllSettings, false,
() => VolumeComponentCopyPaste.CopySettings(profileRef.components));

if (hasNoComponents)
{
menu.AddDisabledItem(VolumeProfileUtils.Styles.copyAllSettings);
}
else
{
menu.AddItem(VolumeProfileUtils.Styles.copyAllSettings, false,
() => VolumeComponentCopyPaste.CopySettings(profileRef.components));
}

if (VolumeComponentCopyPaste.CanPaste(profileRef.components))
menu.AddItem(VolumeProfileUtils.Styles.pasteSettings, false, () =>
{
VolumeComponentCopyPaste.PasteSettings(profileRef.components);
VolumeComponentCopyPaste.PasteSettings(profileRef.components, profileRef);
VolumeManager.instance.OnVolumeProfileChanged(profileRef);
});
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public static void AddVolumeProfileContextMenuItems(
if (VolumeComponentCopyPaste.CanPaste(volumeProfile.components))
menu.AddItem(Styles.pasteSettings, false, () =>
{
VolumeComponentCopyPaste.PasteSettings(volumeProfile.components);
VolumeComponentCopyPaste.PasteSettings(volumeProfile.components, volumeProfile);
VolumeManager.instance.OnVolumeProfileChanged(volumeProfile);
});
else
Expand Down Expand Up @@ -411,7 +411,7 @@ public static void OnVolumeProfileContextClick(
if (VolumeComponentCopyPaste.CanPaste(volumeProfile.components))
menu.AddItem(Styles.pasteSettings, false, () =>
{
VolumeComponentCopyPaste.PasteSettings(volumeProfile.components);
VolumeComponentCopyPaste.PasteSettings(volumeProfile.components, volumeProfile);
VolumeManager.instance.OnVolumeProfileChanged(volumeProfile);
});
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Shader "Hidden/Core/ProbeVolumeDebug"

HLSLINCLUDE
#pragma target 4.5
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch switch2
#pragma multi_compile_fragment _ PROBE_VOLUMES_L1 PROBE_VOLUMES_L2

// Central render pipeline specific includes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Shader "Hidden/Core/ProbeVolumeFragmentationDebug"
HLSLPROGRAM
#pragma editor_sync_compilation
#pragma target 4.5
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch switch2
// #pragma enable_d3d11_debug_symbols

#pragma vertex Vert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Shader "Hidden/Core/ProbeVolumeOffsetDebug"
HLSLINCLUDE
#pragma editor_sync_compilation
#pragma target 4.5
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch switch2
#pragma multi_compile_fragment _ PROBE_VOLUMES_L1 PROBE_VOLUMES_L2

// Central render pipeline specific includes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Shader "Hidden/Core/ProbeVolumeSamplingDebug"
HLSLINCLUDE
#pragma editor_sync_compilation
#pragma target 4.5
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch switch2
#pragma multi_compile_fragment _ PROBE_VOLUMES_L1 PROBE_VOLUMES_L2
//#pragma enable_d3d11_debug_symbols

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using UnityEditor;
#endif

#if UNITY_ANDROID || UNITY_IPHONE || UNITY_TVOS || UNITY_SWITCH
#if UNITY_ANDROID || UNITY_IPHONE || UNITY_TVOS || UNITY_SWITCH || UNITY_SWITCH2
using UnityEngine.UI;
#endif

Expand Down Expand Up @@ -104,7 +104,7 @@ public bool displayRuntimeUI
m_Root.transform.localPosition = Vector3.zero;
m_RootUICanvas = m_Root.GetComponent<DebugUIHandlerCanvas>();

#if UNITY_ANDROID || UNITY_IPHONE || UNITY_TVOS || UNITY_SWITCH
#if UNITY_ANDROID || UNITY_IPHONE || UNITY_TVOS || UNITY_SWITCH || UNITY_SWITCH2
var canvasScaler = m_Root.GetComponent<CanvasScaler>();
canvasScaler.uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize;
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ float ComputeWeight(Volume volume, Vector3 triggerPos)
public Volume[] GetVolumes()
{
return VolumeManager.instance.GetVolumes(selectedCameraLayerMask)
.Where(v => v.sharedProfile != null)
.Where(v => v.profileRef != null)
.Reverse().ToArray();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ static class Strings
public static readonly string batchRendererGroupShaderStrippingModeInvalid = $"{nameof(GPUResidentDrawer)} \"BatchRendererGroup Variants\" setting must be \"Keep All\". " +
" The current setting will cause errors when building a player because all DOTS instancing shaders will be stripped" +
" To fix, modify Graphics settings and set \"BatchRendererGroup Variants\" to \"Keep All\".";
public static readonly string visionOSNotSupported = $"{nameof(GPUResidentDrawer)} Disabled on VisionOS as it is non applicable. This platform uses a custom rendering path and doesn't go through the resident drawer.";
}

internal static bool IsProjectSupported()
Expand All @@ -30,6 +31,13 @@ internal static bool IsProjectSupported(out string message, out LogType severity
message = string.Empty;
severity = LogType.Log;

if (Application.platform == RuntimePlatform.VisionOS)
{
message = Strings.visionOSNotSupported;
severity = LogType.Log;
return false;
}

// The GPUResidentDrawer only has support when the RawBuffer path of providing data
// ConstantBuffer path and any other unsupported platforms early out here
if (BatchRendererGroup.BufferTarget != BatchBufferTarget.RawBuffer)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef __PROBEVOLUME_HLSL__
#define __PROBEVOLUME_HLSL__

#if defined(SHADER_API_MOBILE) || defined(SHADER_API_SWITCH)
#if defined(SHADER_API_MOBILE) || defined(SHADER_API_SWITCH) || defined(SHADER_API_SWITCH2)
//#define USE_APV_TEXTURE_HALF
#endif // SHADER_API_MOBILE || SHADER_API_SWITCH
#endif // SHADER_API_MOBILE || SHADER_API_SWITCH || SHADER_API_SWITCH2

#include "Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ShaderVariablesProbeVolumes.cs.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/SphericalHarmonics.hlsl"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch webgpu gles3
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch switch2 webgpu gles3
//#pragma enable_d3d11_debug_symbols

#pragma kernel BlendScenarios
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch webgpu gles3
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch switch2 webgpu gles3
//#pragma enable_d3d11_debug_symbols

#include "Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeUploadDataCommon.hlsl"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch webgpu gles3
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch switch2 webgpu gles3
//#pragma enable_d3d11_debug_symbols

#include "Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeUploadDataCommon.hlsl"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ internal static string MakePassMergeMessage(CompilerContextData ctx, in PassData
$"- {passName}: {pass.fragmentInfoWidth}x{pass.fragmentInfoHeight}, {pass.fragmentInfoSamples} sample(s).";
break;
case PassBreakReason.NextPassReadsTexture:
message += "The next pass reads one of the outputs as a regular texture, the pass needs to break.";
message += $"{prevPassName} output is sampled by {passName} as a regular texture, the pass needs to break.";
break;
case PassBreakReason.NextPassTargetsTexture:
message += $"{prevPassName} reads a texture that {passName} targets to, the pass needs to break.";
break;
case PassBreakReason.NonRasterPass:
message += $"{prevPassName} is type {prevPass.type}. Only Raster passes can be merged.";
Expand Down
Loading