Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
da2983b
[Port] [6000.5] [UUM-126982] Fixed STP and Reflection Probe Atlas ren…
svc-reach-platform-support Mar 18, 2026
13de5ab
[content automatically redacted] touching PlatformDependent folder
svc-reach-platform-support Mar 18, 2026
37e7a89
[Port] [6000.5] Disable indirect draws for non-tessellated quad topol…
svc-reach-platform-support Mar 18, 2026
8741aeb
[Port] [6000.5] Added back support for preview adjustments with overr…
svc-reach-platform-support Mar 18, 2026
8613679
[Port] [6000.5] URP FullScreenPassRendererFeature: fix assert and yfl…
svc-reach-platform-support Mar 19, 2026
99e3ea2
[Port] [6000.5] [RenderPipelineConverter] Fixed an issue where the An…
svc-reach-platform-support Mar 19, 2026
b0d24fe
[Port] [6000.5] Fix Frame Debugger flicker with water.
svc-reach-platform-support Mar 19, 2026
959e914
[HDRP] Migrated performance warning platform check from HDRP package …
EmreDoganUnity Mar 20, 2026
3c6f0aa
[Port] [6000.5] Fix additional lights in Forward rendering
svc-reach-platform-support Mar 23, 2026
1ddd619
[Port] [6000.5] docg-7313: Explain how a lower dimension T input valu…
svc-reach-platform-support Mar 23, 2026
009a380
[Port] [6000.5] [UUM-136528] Fixed Nearest-Neighbor upscaling depende…
svc-reach-platform-support Mar 24, 2026
51d3ccb
[Port] [6000.5] Disable APV baking on OpenGL with graceful error message
svc-reach-platform-support Mar 25, 2026
e657527
[Port] [6000.5] Fix upgrade error related to URPReflectionProbeSettings
svc-reach-platform-support Mar 25, 2026
5fea564
[Port] [6000.5] Remove LazyLoadResource from RenderingDebuggerRuntime…
svc-reach-platform-support Mar 26, 2026
22cad6d
[Backport 6000.5] Fix badge not correctly showing after graph validat…
ncerone-unity Mar 26, 2026
10a0f3f
[Port] [6000.5] UUM-137827
svc-reach-platform-support Mar 26, 2026
d02b3ea
[Port] [6000.5] Remove spamming shadow request limit warning
svc-reach-platform-support Mar 27, 2026
66725cd
[Port] [6000.5] Document template search, filtering, and sorting opti…
sebastienduverne Mar 27, 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 @@ -30,7 +30,13 @@ public string guid

public string GlobalObjectId => m_GlobalObjectId;

public string name => System.IO.Path.GetFileNameWithoutExtension(assetPath);
[SerializeField]
private string m_Name;
public string name
{
get => string.IsNullOrEmpty(m_Name) ? System.IO.Path.GetFileNameWithoutExtension(assetPath) : m_Name;
set => m_Name = value;
}

[SerializeField]
private string m_Info;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ internal static void BakeAdjustmentVolume(ProbeVolumeBakingSet bakingSet, ProbeA
failed |= !layerMaskJob.Step();

// Bake probe SH
s_BakeData.InitLightingJob(m_BakingSet, uniquePositions, BakeType.ApvOnly);
s_BakeData.InitLightingJob(bakingSet, touchup, uniquePositions, BakeType.ApvOnly);
LightingBaker lightingJob = s_BakeData.lightingJob;
while (!failed && lightingJob.currentStep < lightingJob.stepCount)
failed |= !lightingJob.Step();
Expand All @@ -680,7 +680,7 @@ internal static void BakeAdjustmentVolume(ProbeVolumeBakingSet bakingSet, ProbeA
foreach ((int uniqueProbeIndex, int cellIndex, int i) in bakedProbes)
{
ref var cell = ref bakingCells[cellIndex];
cell.SetBakedData(m_BakingSet, m_BakingBatch, cellVolumes[cellIndex], i, uniqueProbeIndex,
cell.SetBakedData(bakingSet, m_BakingBatch, cellVolumes[cellIndex], i, uniqueProbeIndex,
lightingJob.irradiance[uniqueProbeIndex], lightingJob.validity[uniqueProbeIndex],
layerMaskJob.renderingLayerMasks, virtualOffsetJob.offsets,
skyOcclusionJob.occlusion, skyOcclusionJob.encodedDirections, lightingJob.occlusion);
Expand All @@ -696,8 +696,8 @@ internal static void BakeAdjustmentVolume(ProbeVolumeBakingSet bakingSet, ProbeA
{
// Validate baking cells size before any global state modifications
var chunkSizeInProbes = ProbeBrickPool.GetChunkSizeInProbeCount();
var hasVirtualOffsets = m_BakingSet.settings.virtualOffsetSettings.useVirtualOffset;
var hasRenderingLayers = m_BakingSet.useRenderingLayers;
var hasVirtualOffsets = bakingSet.settings.virtualOffsetSettings.useVirtualOffset;
var hasRenderingLayers = bakingSet.useRenderingLayers;

if (ValidateBakingCellsSize(bakingCells, chunkSizeInProbes, hasVirtualOffsets, hasRenderingLayers))
{
Expand All @@ -707,8 +707,8 @@ internal static void BakeAdjustmentVolume(ProbeVolumeBakingSet bakingSet, ProbeA
ComputeValidityMasks(cell);
}

// Attempt to write the result to disk
if (WriteBakingCells(bakingCells))
// Attempt to write the result to disk.
if (WriteBakingCells(bakingSet, bakingCells))
{
// Reload everything
AssetDatabase.SaveAssets();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ static NativeList<Vector3> RunPlacement(ProbeVolumeProfileInfo profileInfo, Prob
{
Debug.Assert(profileInfo != null);

// APV baking requires compute shader support that is not always available on OpenGL devices
if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.OpenGLCore ||
SystemInfo.graphicsDeviceType == GraphicsDeviceType.OpenGLES3)
{
Debug.LogError("Adaptive Probe Volume baking is not supported on OpenGL. Please switch to Direct3D, Vulkan, or Metal in Project Settings > Player > Other Settings > Graphics API.");
canceledByUser = true;
return new NativeList<Vector3>(Allocator.Temp);
}

// Overwrite loaded settings with data from profile. Note that the m_BakingSet.profile is already patched up if isFreezingPlacement
float prevBrickSize = refVolume.MinBrickSize();
int prevMaxSubdiv = refVolume.GetMaxSubdivision();
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ static internal void RecomputeVOForDebugOnly()
if (ValidateBakingCellsSize(bakingCellsArray, chunkSizeInProbes, hasVirtualOffsets, hasRenderingLayers))
{
// Write back the assets.
WriteBakingCells(bakingCellsArray);
WriteBakingCells(m_BakingSet, bakingCellsArray);
}

m_BakingBatch?.Dispose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,14 @@ struct BakeData
// Cancellation
public bool failed;

[Flags]
enum BakeJobRequests
{
MAIN_REQUEST = 1,
TOUCHUP_REQUESTS = 2,
ADDITIONAL_REQUEST = 4
}

internal static void InitVirtualOffsetJob(IntPtr pVirtualOffsetsBuffer, ref bool bakeVirtualOffsets)
{
bool usingVirtualOffset = m_BakingSet.settings.virtualOffsetSettings.useVirtualOffset;
Expand Down Expand Up @@ -541,7 +549,11 @@ public void Init(ProbeVolumeBakingSet bakingSet, NativeList<Vector3> probePositi
probeCount = probePositions.Length;
reflectionProbeCount = requests.Count;

jobs = CreateBakingJobs(bakingSet, requests.Count != 0);
var probeJobRequests = BakeJobRequests.MAIN_REQUEST | BakeJobRequests.TOUCHUP_REQUESTS;
if (requests.Count > 0)
probeJobRequests |= BakeJobRequests.ADDITIONAL_REQUEST;

jobs = CreateBakingJobs(bakingSet, probeJobRequests);
originalPositions = probePositions.ToArray(Allocator.Persistent);
SortPositions(probePositions, requests);

Expand Down Expand Up @@ -587,13 +599,22 @@ public void InitAdditionalRequests(NativeList<Vector3> probePositions, List<Vect
stepCount = lightingJob.stepCount;
}

public void InitLightingJob(ProbeVolumeBakingSet bakingSet, NativeList<Vector3> probePositions, BakeType bakeType)
public void InitLightingJob(ProbeVolumeBakingSet bakingSet, ProbeAdjustmentVolume touchup, NativeList<Vector3> probePositions, BakeType bakeType)
{
probeCount = probePositions.Length;

s_AdjustmentVolumes = new TouchupVolumeWithBoundsList();
touchup.GetOBBandAABB(out var obb, out var aabb);
s_AdjustmentVolumes.Add((obb, aabb, touchup));
touchup.skyDirection.Normalize();

jobs = CreateBakingJobs(bakingSet, false);
var probeJobRequests = BakeJobRequests.TOUCHUP_REQUESTS;
if (touchup.mode != ProbeAdjustmentVolume.Mode.OverrideSampleCount)
{
// Other touchup volumes don't need a job of their own but they do need a main request job
probeJobRequests |= BakeJobRequests.MAIN_REQUEST;
}
jobs = CreateBakingJobs(bakingSet, probeJobRequests);
SortPositions(probePositions, new List<Vector3>());

lightingJob = lightingOverride ?? new DefaultLightTransport();
Expand Down Expand Up @@ -622,16 +643,19 @@ public void ExecuteLightingAsync()
bakingThread.Start();
}

static BakeJob[] CreateBakingJobs(ProbeVolumeBakingSet bakingSet, bool hasAdditionalRequests)
static BakeJob[] CreateBakingJobs(ProbeVolumeBakingSet bakingSet, BakeJobRequests bakeJobRequests)
{
// Build the list of adjustment volumes affecting sample count
var touchupVolumesAndBounds = new TouchupVolumeWithBoundsList();
if (bakeJobRequests.HasFlag(BakeJobRequests.TOUCHUP_REQUESTS))
{
// This is slow, but we should have very little amount of touchup volumes.
foreach (var adjustment in s_AdjustmentVolumes)
{
if (adjustment.volume.mode == ProbeAdjustmentVolume.Mode.OverrideSampleCount)
{
touchupVolumesAndBounds.Add(adjustment);
}
}

// Sort by volume to give priority to smaller volumes
Expand All @@ -640,18 +664,33 @@ static BakeJob[] CreateBakingJobs(ProbeVolumeBakingSet bakingSet, bool hasAdditi

var lightingSettings = ProbeVolumeLightingTab.GetLightingSettings();
bool skyOcclusion = bakingSet.skyOcclusion;
var jobs = new List<BakeJob>();

int additionalJobs = hasAdditionalRequests ? 2 : 1;
var jobs = new BakeJob[touchupVolumesAndBounds.Count + additionalJobs];
if (bakeJobRequests.HasFlag(BakeJobRequests.TOUCHUP_REQUESTS))
{
foreach (var touchupVolume in touchupVolumesAndBounds)
{
BakeJob job = new BakeJob();
job.Create(lightingSettings, skyOcclusion, touchupVolume);
jobs.Add(job);
}
}

for (int i = 0; i < touchupVolumesAndBounds.Count; i++)
jobs[i].Create(lightingSettings, skyOcclusion, touchupVolumesAndBounds[i]);
if (bakeJobRequests.HasFlag(BakeJobRequests.MAIN_REQUEST))
{
BakeJob job = new BakeJob();
job.Create(bakingSet, lightingSettings, skyOcclusion);
jobs.Add(job);
}

jobs[touchupVolumesAndBounds.Count + 0].Create(bakingSet, lightingSettings, skyOcclusion);
if (hasAdditionalRequests)
jobs[touchupVolumesAndBounds.Count + 1].Create(bakingSet, lightingSettings, false);
if (bakeJobRequests.HasFlag(BakeJobRequests.ADDITIONAL_REQUEST))
{
BakeJob job = new BakeJob();
job.Create(bakingSet, lightingSettings, false);
jobs.Add(job);
}

return jobs;
return jobs.ToArray();
}

static BakeJob[] CreateAdditionalBakingJobs()
Expand Down Expand Up @@ -1802,7 +1841,7 @@ static void ApplyPostBakeOperations()
// Attempt to convert baking cells to runtime cells
bool succeededWritingBakingCells;
using (new BakingCompleteProfiling(BakingCompleteProfiling.Stages.WriteBakedData))
succeededWritingBakingCells = WriteBakingCells(m_BakedCells.Values.ToArray());
succeededWritingBakingCells = WriteBakingCells(m_BakingSet, m_BakedCells.Values.ToArray());

if (!succeededWritingBakingCells)
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,30 @@ static ComputeShader subdivideSceneCS
{
_subdivideSceneCS = GraphicsSettings.GetRenderPipelineSettings<ProbeVolumeBakingResources>().subdivideSceneCS;

s_ClearBufferKernel = subdivideSceneCS.FindKernel("ClearBuffer");
s_ClearKernel = subdivideSceneCS.FindKernel("Clear");
s_JumpFloodingKernel = subdivideSceneCS.FindKernel("JumpFlooding");
s_FillUVKernel = subdivideSceneCS.FindKernel("FillUVMap");
s_FinalPassKernel = subdivideSceneCS.FindKernel("FinalPass");
s_VoxelizeProbeVolumesKernel = subdivideSceneCS.FindKernel("VoxelizeProbeVolumeData");
s_SubdivideKernel = subdivideSceneCS.FindKernel("Subdivide");
// The compute shader is not supported on OpenGL (see #pragma only_renderers in ProbeVolumeSubdivide.compute)
// The kernels won't exist, so we skip initialization. This is caught earlier in RunPlacement with a proper error message.
try
{
s_ClearBufferKernel = subdivideSceneCS.FindKernel("ClearBuffer");
s_ClearKernel = subdivideSceneCS.FindKernel("Clear");
s_JumpFloodingKernel = subdivideSceneCS.FindKernel("JumpFlooding");
s_FillUVKernel = subdivideSceneCS.FindKernel("FillUVMap");
s_FinalPassKernel = subdivideSceneCS.FindKernel("FinalPass");
s_VoxelizeProbeVolumesKernel = subdivideSceneCS.FindKernel("VoxelizeProbeVolumeData");
s_SubdivideKernel = subdivideSceneCS.FindKernel("Subdivide");
}
catch (System.ArgumentException)
{
// Kernels not found - likely running on unsupported graphics API
string message = "ProbeVolumeSubdivide compute shader kernels not found.";
if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.OpenGLCore ||
SystemInfo.graphicsDeviceType == GraphicsDeviceType.OpenGLES3)
{
message += " This is expected on OpenGL which is not supported for APV baking.";
}
Debug.LogWarning(message);
_subdivideSceneCS = null;
}
}
return _subdivideSceneCS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,24 @@ private static void ProcessRenderer(InstanceHandle instance,
// Scan all materials once to retrieve whether this renderer is indirect-compatible or not (and store it in the RangeKey).
// Also cache hash map lookups since we need them right after.
bool supportsIndirect = true;
NativeArray<GPUDrivenMaterial> subMaterials = new NativeArray<GPUDrivenMaterial>(subMaterialIDs.Length, Allocator.Temp);
bool isMetal = SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal;
var subMaterials = new NativeArray<GPUDrivenMaterial>(subMaterialIDs.Length, Allocator.Temp);
for (int i = 0; i < subMaterialIDs.Length; i++)
{
EntityId subMaterialID = subMaterialIDs[i];
if (!materialMap.TryGetValue(subMaterialID, out GPUDrivenMaterial subMaterial))
continue;

supportsIndirect &= subMaterial.isIndirectSupported;
subMaterials[i] = subMaterial;

int subMeshIndex = subMeshStartIndex + i;
int lodLoopCount = math.max(mesh.meshLodCount, 1);
var subMesh = mesh.subMeshes[subMeshIndex * lodLoopCount];

// The indirect path does not support topology adjustment; use the direct path when this is required.
// Concretely, for quads, only use the indirect path if we allow quads natively (e.g. tessellation shaders).
supportsIndirect &= subMesh.topology != MeshTopology.Quads || subMaterial.hasTessellation;
supportsIndirect &= !isMetal || !subMaterial.hasTessellation;
}

var rangeKey = new RangeKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ enum Version

#if ENABLE_RENDERING_DEBUGGER_UI
[SerializeField, ResourcePath("Runtime/Debugging/Runtime UI Resources/RuntimeDebugWindow_PanelSettings.asset")]
private LazyLoadReference<PanelSettings> m_PanelSettings;
private PanelSettings m_PanelSettings;

/// <summary>StyleSheet for the Rendering Debugger Runtime UI</summary>
/// <summary>Panel Settings Asset for the Rendering Debugger Runtime UI</summary>
public PanelSettings panelSettings
{
get => m_PanelSettings.asset;
get => m_PanelSettings;
set => this.SetValueAndNotify(ref m_PanelSettings, value, nameof(m_PanelSettings));
}

Expand All @@ -54,12 +54,12 @@ public StyleSheet[] styleSheets
}

[SerializeField, ResourcePath("Runtime/Debugging/Runtime UI Resources/RuntimeDebugWindow.uxml")]
private LazyLoadReference<VisualTreeAsset> m_VisualTreeAsset;
private VisualTreeAsset m_VisualTreeAsset;

/// <summary>Visual Tree Asset for the Rendering Debugger Runtime UI</summary>
public VisualTreeAsset visualTreeAsset
{
get => m_VisualTreeAsset.asset;
get => m_VisualTreeAsset;
set => this.SetValueAndNotify(ref m_VisualTreeAsset, value, nameof(m_VisualTreeAsset));
}
#endif
Expand Down
Loading
Loading