Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
a56e9aa
[Port] [6000.1] Re-enable disabled URP post-process tests.
svc-reach-platform-support May 27, 2025
203b758
Fixed mesh changes not propagating correctly when using GRD and GPU O…
lorin-atzberger-unity May 27, 2025
1a53080
[Port] [6000.1] [UUM-105392] Fix hdr encoding and postprocess resolve…
kennytann May 27, 2025
82f44e6
[Port] [6000.1] Fix shadow culling for Intermediate renderers
svc-reach-platform-support May 27, 2025
a8579dd
[Port] [6000.1] [UUM-18392] 2D Soft Shadows Fix
svc-reach-platform-support May 27, 2025
2b1109d
[Port] [6000.1] [UUM-104830] Add checks for FullScreenRendererFeature…
kennytann May 29, 2025
b54aadb
[Port] [6000.1] [HDRP] Fixed Water clamping the screenspace position …
svc-reach-platform-support May 29, 2025
24a411d
[Port] [6000.1] [UUM-104352][URP 2D] Fix normal maps account for spri…
kennytann May 30, 2025
fe5513f
6000.1: Fix unclear warnings when user creates more lights than the l…
vrethinachalam Jun 1, 2025
f1f53e6
[Port] [6000.1] Fix DRS + CustomPass AfterPostprocess and camera depth
svc-reach-platform-support Jun 3, 2025
d4b6099
[6000.1][URP 2D] Port reference image changes for test builds
kennytann Jun 3, 2025
d664215
[Port] [6000.1] docg-7131: Add link to HDRP Water system Advanced Pro…
svc-reach-platform-support Jun 5, 2025
0a0762c
[Port] [6000.1] Accessibility tables update for Adaptive Probe Volume…
svc-reach-platform-support Jun 6, 2025
afe018f
[Port] [6000.1] DOCG-7173 Combine VFX Graph Trigger Event Blocks docs
svc-reach-platform-support Jun 6, 2025
4e37be9
[Port] [6000.1] [HDRP] UUM-98939: Removed DLSS Sharpness slider as it…
svc-reach-platform-support Jun 8, 2025
d05a635
Merge PR #68706 from docs/graphics/docg-7168-makdown-formatting-issue
ocarrere Jun 12, 2025
e9d35a1
[Port] [6000.1] Better error handling for uninitialized volume framework
svc-reach-platform-support Jun 12, 2025
3920bbb
[Port] [6000.1] UUM-104391: Handle case where a main light is disabled
svc-reach-platform-support Jun 12, 2025
0e080bf
Manual port of fix for uum-108398
giulia-u3d Jun 16, 2025
0fb2ebe
[Port] [6000.1] [VFX] Fix Exception with Subgraph & SMR
svc-reach-platform-support Jun 16, 2025
f44529e
[Port] [6000.1] DOCG-7382 Small updates to HDRP shadows documentation
svc-reach-platform-support Jun 16, 2025
a007f35
[Port] [6000.1] [HDRP] Fix artifacts when using HDRP with Screen Spac…
svc-reach-platform-support Jun 17, 2025
450b2ce
[Port] [6000.1] DOCG-7380 Update HDRP light component settings
markg-unity Jun 17, 2025
ebb639b
[Port] [6000.1] URP: Fixed emission-enabling evaluation.
svc-reach-platform-support Jun 20, 2025
18f2388
[Port] [6000.1] 2D Shader vector truncation fix in LightingUtility.hl…
svc-reach-platform-support Jun 20, 2025
585175a
[Port] [6000.1] [UUM-109322][6000.3][URP 2D] Expose methods to add/re…
svc-reach-platform-support Jun 20, 2025
ead4af3
[Port] [6000.1] Set color RenderTarget at InvokeOnRenderObjectCallbac…
svc-reach-platform-support Jun 20, 2025
e3f0422
[Port] [6000.1] HDRP Fix Decal Projector Layer Mask Override
svc-reach-platform-support Jun 20, 2025
1dd5b96
[Port] [6000.1] Feedback fixes 30 May 2025
markg-unity Jun 23, 2025
b175d01
[Port] [6000.1] DOCG-7470 Accessibility improvements
svc-reach-platform-support Jun 23, 2025
9e757de
[Port] [6000.1] DirectX 11 is supported on PC on runtime
svc-reach-platform-support Jun 24, 2025
4866cda
[Port] [6000.1] docg-6724-unity-6-dx12-default: Test and refactor 'Se…
svc-reach-platform-support Jun 24, 2025
8c85c03
[Port] [6000.1] docg-7156: Add conceptual information about decals fo…
svc-reach-platform-support Jun 24, 2025
e5b908a
[Port] [6000.1] docg-7140-fix-typo
svc-reach-platform-support Jun 24, 2025
c152e28
[Port] [6000.1] docg-7128: Fix link
svc-reach-platform-support Jun 24, 2025
645af76
[Backport] [6000.1] Fix for the ndc space being sometimes wrong for S…
lpledouxUnity Jun 25, 2025
ce780c5
[Port] [6000.1] Graphics docs olivier april batch2 visualeffectsgraph…
ocarrere Jun 26, 2025
661e8ef
Backport 6000.1. Fix black screen when using lens flare.
eh-unity Jun 27, 2025
56ee8f7
[Port] [6000.1] URP - Avoid persistent memory allocation (_CameraTarg…
arttu-peltonen Jun 29, 2025
2876a52
[Port] [6000.1] DOCG-6486 Correct output type in Perlin Noise page
svc-reach-platform-support Jun 29, 2025
cc74770
[Port] [6000.1] UUM101193 - Using Burst static methods instead of Bur…
olivierprat Jun 30, 2025
fe94a85
[Port] [6000.1] [UUM-97647] Fix for Null Exception in a Shadow Shape …
svc-reach-platform-support Jun 30, 2025
6880601
[Port] [6000.1] docg-7321: Specify HLSL include files extension
svc-reach-platform-support Jun 30, 2025
a213c8f
[Port] [6000.1] docg-7328: Fix typos
svc-reach-platform-support Jun 30, 2025
e39d70d
[Port] [6000.1] 2d/staging/tilemap/uum 109109
svc-reach-platform-support Jul 1, 2025
e9c563d
[Port] [6000.1] UUM-104165: Make APV work with Subscenes in URP
pigselated Jul 1, 2025
d87d1f7
[Port] [6000.1] DOCG-7175 Move Kill Shape docs into new page, clarify…
svc-reach-platform-support Jul 1, 2025
191f094
[Port] [6000.1] Docs/graphics/docg 6784 disappearing clouds
svc-reach-platform-support Jul 4, 2025
541f1c9
[Port] [6000.1] Fix local volumetric fog position node in ShaderGraph
svc-reach-platform-support Jul 4, 2025
6393033
[Port] [6000.1] [UUM-100526] Add missing apv keywords to TerrainLitAd…
svc-reach-platform-support Jul 4, 2025
bf46a8c
[Port] [6000.1] GPUResidentDrawer - Enhanced culling statistics in Re…
olivierprat Jul 7, 2025
f78b7af
[Port] [6000.1] Remove additional separators
svc-reach-platform-support Jul 8, 2025
0256862
[Port] [6000.1] docg-7446: Document the Trigger Shape block in VFX Graph
svc-reach-platform-support Jul 8, 2025
606efe8
[Port] [6000.1] DOCG-7378 Improve HDRP shadow map update docs
svc-reach-platform-support Jul 9, 2025
623c3e8
[Port] [6000.1] [HDRP] Fix the issue of Unlit draw mode in scene view
svc-reach-platform-support Jul 10, 2025
7cc47e7
[Port] [6000.1] Initialized APV bakeDiffuseLighting
svc-reach-platform-support Jul 10, 2025
a148da4
[Port] [6000.1] [HDRP] Bind missing buffer for debug shaders
svc-reach-platform-support Jul 14, 2025
a2bba1a
[Port] [6000.1] [6000.3][UUM-110338] Fix UI rendering when FXAA is en…
svc-reach-platform-support Jul 14, 2025
e77b4b0
[UUM-109312][UUM-109986][6000.1] Fix URP 2D lighting with meshes in R…
kennytann Jul 14, 2025
b84616b
[Port] [6000.1] Fix Underline with font fallback chain
svc-reach-platform-support Jul 14, 2025
00750fb
[Port] [6000.1] DOCG-7557 Clarify detail mask values in HDRP
svc-reach-platform-support Jul 14, 2025
da9052f
[Port] [6000.1] Feedback fixes 23 June 2025
svc-reach-platform-support Jul 14, 2025
f98ce3b
[Port] [6000.1] Remove redundant NUnit include
svc-reach-platform-support Jul 16, 2025
dc50213
[Backport] Fix for the background motion vectors computation being in…
lpledouxUnity Jul 16, 2025
4ad3737
[Backport] [URP] UUM-109709: Fix GBuffer indicies
Jul 17, 2025
23e609b
[Port] [6000.1] [UUM-97906] URP: Remove target requirement from APV i…
svc-reach-platform-support Jul 21, 2025
a86df56
[UUM-110269][6000.1] Fix Rendergraph 2D builders
kennytann Jul 22, 2025
7bde168
[Backport] [6000.1] Render Graph - Disable FBF for PS4 & PS5
YohannVaastUnity Jul 23, 2025
e11ad19
[Port] [6000.1] 2d/staging/tilemap/uum 111921
svc-reach-platform-support Jul 28, 2025
b0ea97c
[Port] [6000.1] Docs feedback fixes Jul 2025
svc-reach-platform-support Jul 28, 2025
21754d6
[Port] [6000.1] [UUM-97906] [URP] Fix flipped projection params
svc-reach-platform-support Jul 28, 2025
ff50ed8
[Port] [6000.1] DOCG-6833 Add missing landing pages to VFX Graph manual
markg-unity Jul 28, 2025
14bd006
[Port] [6000.1] unity_RendererBounds_Min/max available in URP with BR…
svc-reach-platform-support Aug 2, 2025
e0d28c5
[Port] [6000.1] [SRP] [Volume] [UUM-111415] Redraw all views after Vo…
svc-reach-platform-support Aug 2, 2025
ddbc4c5
[Port] [6000.1] [SRP] Fix Volume icon for light theme
svc-reach-platform-support Aug 2, 2025
a66d813
[Backport 6.1][AMDUnityPlugin] fix DX12 crash when FSR2 is toggled on…
volkan-unity Aug 2, 2025
68826ed
[Port] [6000.1] [HDRP] Fix Water Decal UV
svc-reach-platform-support Aug 2, 2025
b4b6f7b
[Port] [6000.1] [UUM-111510]The Game view and Scene view fail to rend…
svc-reach-platform-support Aug 2, 2025
243ff81
[Port] [6000.1] URP: Fix ZBin clamp
svc-reach-platform-support Aug 4, 2025
4f5cc2e
[Port] [6000.1] DOCG-7386 Improve HDRP ambient occlusion documentation
svc-reach-platform-support Aug 4, 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 @@ -10,7 +10,7 @@ There is a global state per user that stores if Unity displays **advanced proper
Not every component or Volume Override includes advanced properties.
If one does, it has a contextual menu to the right of each property section header that includes additional properties. To expose advanced properties for that section, open the contextual menu and click **Advanced Properties**.

For an example, see the **Water Surface** component in [High Definition Render Pipeline (HDRP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest).
For an example, refer to the **Water Surface** component in [High Definition Render Pipeline (HDRP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/manual/settings-and-properties-related-to-the-water-system.html).

By default only standard properties are shown.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1656,12 +1656,18 @@ void InitializePersistentElements()

void OnGraphRegistered(RenderGraph graph)
{
if (m_RegisteredGraphs.ContainsKey(graph))
return;

m_RegisteredGraphs.Add(graph, new HashSet<string>());
RebuildHeaderUI();
}

void OnGraphUnregistered(RenderGraph graph)
{
if (!m_RegisteredGraphs.ContainsKey(graph))
return;

m_RegisteredGraphs.Remove(graph);
RebuildHeaderUI();
if (m_RegisteredGraphs.Count == 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,6 @@ internal void Init()
var supportedOn = volumeComponentType.GetCustomAttribute<VolumeComponentMenuForRenderPipeline>();
m_LegacyPipelineTypes = supportedOn != null ? supportedOn.pipelineTypes : Array.Empty<Type>();
#pragma warning restore CS0618

EditorApplication.contextualPropertyMenu += OnPropertyContextMenu;
}

void OnDestroy()
{
EditorApplication.contextualPropertyMenu -= OnPropertyContextMenu;
}

internal void DetermineVisibility(Type renderPipelineAssetType, Type renderPipelineType)
Expand Down Expand Up @@ -393,23 +386,13 @@ internal void AddDefaultProfileContextMenuEntries(
profile != null &&
defaultProfile != profile)
{
menu.AddSeparator(string.Empty);
menu.AddItem(EditorGUIUtility.TrTextContent($"Show Default Volume Profile"), false,
() => Selection.activeObject = defaultProfile);
menu.AddItem(EditorGUIUtility.TrTextContent($"Apply Values to Default Volume Profile"), false, copyAction);
}
}

void OnPropertyContextMenu(GenericMenu menu, SerializedProperty property)
{
if (property.serializedObject.targetObject != target)
return;

var targetComponent = property.serializedObject.targetObject as VolumeComponent;

AddDefaultProfileContextMenuEntries(menu, VolumeManager.instance.globalDefaultProfile,
() => VolumeProfileUtils.AssignValuesToProfile(VolumeManager.instance.globalDefaultProfile, targetComponent, property));
}

/// <summary>
/// Unity calls this method after drawing the header for each VolumeComponentEditor
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,14 @@ public void OnGUI()

// Even if the asset is not dirty, the list of component may have been changed by another inspector.
// In this case, only the hash will tell us that we need to refresh.
if (asset.isDirty || asset.GetComponentListHashCode() != m_CurrentHashCode)
if (asset.dirtyState != VolumeProfile.DirtyState.None || asset.GetComponentListHashCode() != m_CurrentHashCode)
{
RefreshEditors();
VolumeManager.instance.OnVolumeProfileChanged(asset);
asset.isDirty = false;

if ((asset.dirtyState & VolumeProfile.DirtyState.DirtyByProfileReset) != 0)
UnityEditorInternal.InternalEditorUtility.RepaintAllViews();
asset.dirtyState = VolumeProfile.DirtyState.None;
}

if (m_IsDefaultVolumeProfile && VolumeManager.instance.isInitialized && m_EditorsByCategory.Count == 0)
Expand Down Expand Up @@ -445,13 +448,14 @@ void OnContextClick(Vector2 position, VolumeComponentEditor targetEditor, int id
if (!m_IsDefaultVolumeProfile)
menu.AddItem(EditorGUIUtility.TrTextContent("Remove"), false, () => RemoveComponent(id));

menu.AddSeparator(string.Empty);

if (targetEditor.hasAdditionalProperties)
{
menu.AddSeparator(string.Empty);
menu.AddAdvancedPropertiesBoolMenuItem(() => targetEditor.showAdditionalProperties,
() => targetEditor.showAdditionalProperties ^= true);
}

menu.AddSeparator(string.Empty);
targetEditor.AddDefaultProfileContextMenuEntries(menu, VolumeManager.instance.globalDefaultProfile,
() => VolumeProfileUtils.CopyValuesToProfile(targetComponent, VolumeManager.instance.globalDefaultProfile));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
using System;
using System.Collections.Generic;
using Unity.Collections;
#if UNITY_EDITOR
using UnityEditor;
#endif
using static UnityEngine.Rendering.DebugUI;
using static UnityEngine.Rendering.DebugUI.Widget;

Expand Down Expand Up @@ -106,6 +109,7 @@ private static InstanceOcclusionEventStats GetInstanceOcclusionEventStats(int pa
else
return new InstanceOcclusionEventStats();
}

static class Strings
{
public const string drawerSettingsContainerName = "GPU Resident Drawer Settings";
Expand Down Expand Up @@ -144,6 +148,7 @@ private static int GetInstanceOcclusionEventCount()
{
return GPUResidentDrawer.GetDebugStats()?.instanceOcclusionEventStats.Length ?? 0;
}

private static DebugUI.Table.Row AddInstanceCullerViewDataRow(int viewIndex)
{
return new DebugUI.Table.Row
Expand All @@ -154,9 +159,32 @@ private static DebugUI.Table.Row AddInstanceCullerViewDataRow(int viewIndex)
children =
{
new DebugUI.Value { displayName = "View Type", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () => GetInstanceCullerViewStats(viewIndex).viewType },
new DebugUI.Value { displayName = "View Instance ID", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () => GetInstanceCullerViewStats(viewIndex).viewInstanceID },
new DebugUI.Value { displayName = "View Instance ID", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () =>
{
var viewStats = GetInstanceCullerViewStats(viewIndex);
#if UNITY_EDITOR
Object view = EditorUtility.InstanceIDToObject(viewStats.viewInstanceID);
if (view)
{
return $"{viewStats.viewInstanceID} ({view.name})";
}
#endif
return viewStats.viewInstanceID;
}
},
new DebugUI.Value { displayName = "Split Index", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () => GetInstanceCullerViewStats(viewIndex).splitIndex },
new DebugUI.Value { displayName = "Visible Instances", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () => GetInstanceCullerViewStats(viewIndex).visibleInstances },
new DebugUI.Value { displayName = "Visible Instances CPU | GPU", tooltip = "Visible instances after CPU culling and after GPU culling.", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () =>
{
var viewStats = GetInstanceCullerViewStats(viewIndex);
return $"{viewStats.visibleInstancesOnCPU} | {viewStats.visibleInstancesOnGPU}";
}
},
new DebugUI.Value { displayName = "Visible Primitives CPU | GPU", tooltip = "Visible primitives after CPU culling and after GPU culling.", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () =>
{
var viewStats = GetInstanceCullerViewStats(viewIndex);
return $"{viewStats.visiblePrimitivesOnCPU} | {viewStats.visiblePrimitivesOnGPU}";
}
},
new DebugUI.Value { displayName = "Draw Commands", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () => GetInstanceCullerViewStats(viewIndex).drawCommands },
}
};
Expand All @@ -182,6 +210,16 @@ private static object CulledInstancesString(in InstanceOcclusionEventStats stats
return (stats.eventType == InstanceOcclusionEventType.OcclusionTest) ? stats.culledInstances : "-";
}

private static object VisiblePrimitivesString(in InstanceOcclusionEventStats stats)
{
return (stats.eventType == InstanceOcclusionEventType.OcclusionTest) ? stats.visiblePrimitives : "-";
}

private static object CulledPrimitivesString(in InstanceOcclusionEventStats stats)
{
return (stats.eventType == InstanceOcclusionEventType.OcclusionTest) ? stats.culledPrimitives : "-";
}

private static DebugUI.Table.Row AddInstanceOcclusionPassDataRow(int eventIndex)
{
return new DebugUI.Table.Row
Expand All @@ -191,13 +229,27 @@ private static DebugUI.Table.Row AddInstanceOcclusionPassDataRow(int eventIndex)
isHiddenCallback = () => { return eventIndex >= GetInstanceOcclusionEventCount(); },
children =
{
new DebugUI.Value { displayName = "View Instance ID", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () => GetInstanceOcclusionEventStats(eventIndex).viewInstanceID },
new DebugUI.Value { displayName = "View Instance ID", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () =>
{
var eventStats = GetInstanceOcclusionEventStats(eventIndex);
#if UNITY_EDITOR
Object view = EditorUtility.InstanceIDToObject(eventStats.viewInstanceID);
if (view)
{
return $"{eventStats.viewInstanceID} ({view.name})";
}
#endif
return eventStats.viewInstanceID;
}
},
new DebugUI.Value { displayName = "Event Type", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () => $"{GetInstanceOcclusionEventStats(eventIndex).eventType}" },
new DebugUI.Value { displayName = "Occluder Version", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () => OccluderVersionString(GetInstanceOcclusionEventStats(eventIndex)) },
new DebugUI.Value { displayName = "Subview Mask", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () => $"0x{GetInstanceOcclusionEventStats(eventIndex).subviewMask:X}" },
new DebugUI.Value { displayName = "Occlusion Test", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () => $"{OcclusionTestString(GetInstanceOcclusionEventStats(eventIndex))}" },
new DebugUI.Value { displayName = "Visible Instances", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () => VisibleInstancesString(GetInstanceOcclusionEventStats(eventIndex)) },
new DebugUI.Value { displayName = "Culled Instances", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () => CulledInstancesString(GetInstanceOcclusionEventStats(eventIndex)) },
new DebugUI.Value { displayName = "Visible Primitives", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () => VisiblePrimitivesString(GetInstanceOcclusionEventStats(eventIndex)) },
new DebugUI.Value { displayName = "Culled Primitives", refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () => CulledPrimitivesString(GetInstanceOcclusionEventStats(eventIndex)) },
}
};
}
Expand Down Expand Up @@ -298,6 +350,104 @@ private void AddInstanceCullingStatsWidget(DebugDisplayGPUResidentDrawer data)
}
});

instanceCullerStats.children.Add(new DebugUI.ValueTuple()
{
displayName = "Total Visible Instances (Cameras | Lights | Both)",
values = new[]
{
new DebugUI.Value { refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () =>
{
int totalGRDInstances = 0;

for (int viewIndex = 0; viewIndex < GetInstanceCullerViewCount(); viewIndex++)
{
var viewStats = GetInstanceCullerViewStats(viewIndex);
if (viewStats.viewType == BatchCullingViewType.Camera)
totalGRDInstances += viewStats.visibleInstancesOnGPU;
}
return totalGRDInstances;
}
},
new DebugUI.Value { refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () =>
{
int totalGRDInstances = 0;

for (int viewIndex = 0; viewIndex < GetInstanceCullerViewCount(); viewIndex++)
{
var viewStats = GetInstanceCullerViewStats(viewIndex);
if (viewStats.viewType == BatchCullingViewType.Light)
totalGRDInstances += viewStats.visibleInstancesOnGPU;
}
return totalGRDInstances;
}
},
new DebugUI.Value { refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () =>
{
int totalGRDInstances = 0;

for (int viewIndex = 0; viewIndex < GetInstanceCullerViewCount(); viewIndex++)
{
var viewStats = GetInstanceCullerViewStats(viewIndex);
if (viewStats.viewType != BatchCullingViewType.Filtering
&& viewStats.viewType != BatchCullingViewType.Picking
&& viewStats.viewType != BatchCullingViewType.SelectionOutline)
totalGRDInstances += viewStats.visibleInstancesOnGPU;
}
return totalGRDInstances;
}
},
}
});

instanceCullerStats.children.Add(new DebugUI.ValueTuple()
{
displayName = "Total Visible Primitives (Cameras | Lights | Both)",
values = new[]
{
new DebugUI.Value { refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () =>
{
int totalGRDPrimitives = 0;

for (int viewIndex = 0; viewIndex < GetInstanceCullerViewCount(); viewIndex++)
{
var viewStats = GetInstanceCullerViewStats(viewIndex);
if (viewStats.viewType == BatchCullingViewType.Camera)
totalGRDPrimitives += viewStats.visiblePrimitivesOnGPU;
}
return totalGRDPrimitives;
}
},
new DebugUI.Value { refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () =>
{
int totalGRDPrimitives = 0;

for (int viewIndex = 0; viewIndex < GetInstanceCullerViewCount(); viewIndex++)
{
var viewStats = GetInstanceCullerViewStats(viewIndex);
if (viewStats.viewType == BatchCullingViewType.Light)
totalGRDPrimitives += viewStats.visiblePrimitivesOnGPU;
}
return totalGRDPrimitives;
}
},
new DebugUI.Value { refreshRate = k_RefreshRate, formatString = k_FormatString, getter = () =>
{
int totalGRDPrimitives = 0;

for (int viewIndex = 0; viewIndex < GetInstanceCullerViewCount(); viewIndex++)
{
var viewStats = GetInstanceCullerViewStats(viewIndex);
if (viewStats.viewType != BatchCullingViewType.Filtering
&& viewStats.viewType != BatchCullingViewType.Picking
&& viewStats.viewType != BatchCullingViewType.SelectionOutline)
totalGRDPrimitives += viewStats.visiblePrimitivesOnGPU;
}
return totalGRDPrimitives;
}
},
}
});

DebugUI.Table viewTable = new DebugUI.Table
{
displayName = "",
Expand Down
Loading