diff --git a/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer.meta b/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer.meta
new file mode 100644
index 00000000000..5e714c24ce5
--- /dev/null
+++ b/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5329900f84e7b4d949d9e72ec7a12c90
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/LayerBatch.uxml b/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/LayerBatch.uxml
new file mode 100644
index 00000000000..8ab763a5643
--- /dev/null
+++ b/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/LayerBatch.uxml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/LayerBatch.uxml.meta b/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/LayerBatch.uxml.meta
new file mode 100644
index 00000000000..46f02345329
--- /dev/null
+++ b/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/LayerBatch.uxml.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 754a67c6d4788447895a4349508b2f37
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
diff --git a/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/LayerBatchInfoView.uxml b/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/LayerBatchInfoView.uxml
new file mode 100644
index 00000000000..a6f22a67914
--- /dev/null
+++ b/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/LayerBatchInfoView.uxml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/LayerBatchInfoView.uxml.meta b/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/LayerBatchInfoView.uxml.meta
new file mode 100644
index 00000000000..60a0224e0cd
--- /dev/null
+++ b/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/LayerBatchInfoView.uxml.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 00dfae39f4ff4d0daa568f0746dc709d
+timeCreated: 1626254709
\ No newline at end of file
diff --git a/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/LayerExplorer.cs b/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/LayerExplorer.cs
new file mode 100644
index 00000000000..bbe69de7965
--- /dev/null
+++ b/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/LayerExplorer.cs
@@ -0,0 +1,350 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using UnityEngine;
+using UnityEngine.Rendering.Universal;
+using UnityEngine.SceneManagement;
+using UnityEngine.UIElements;
+
+/**
+ * Todos:
+ * - Hook up to the actual render pass (duh)
+ * - Move assets into package
+ */
+namespace UnityEditor.Rendering.Universal
+{
+ internal class LayerExplorer : EditorWindow
+ {
+ private const string ResourcePath = "Packages/com.unity.render-pipelines.universal/Editor/2D/LayerExplorer/";
+
+ private class LayerBatch
+ {
+ public List LayerNames = new List();
+ public List Lights = new List();
+ public List Shadows = new List();
+ public int batchId;
+ public int color;
+ }
+
+ [MenuItem("Window/2D/Sorting Layer Explorer")]
+ public static void ShowExample()
+ {
+ LayerExplorer wnd = GetWindow();
+ wnd.titleContent = new GUIContent("Sorting Layer Explorer");
+ }
+
+ private static Color[] BatchColors = new[] {
+ Color.green,
+ Color.magenta,
+ Color.yellow,
+ Color.red,
+ Color.cyan,
+ Color.white,
+ Color.gray,
+ Color.blue,
+ Color.black,
+ };
+
+ private List batchList;
+ private ListView batchListView;
+ private int cachedSceneHandle;
+
+ private bool PopulateData()
+ {
+ batchList = new List();
+ var renderer = Light2DEditorUtility.GetRenderer2DData();
+ if (renderer == null || renderer.lightCullResult == null)
+ return false;
+
+ cachedSceneHandle = SceneManager.GetActiveScene().handle;
+ var layers = Light2DManager.GetCachedSortingLayer();
+ var batches = LayerUtility.CalculateBatches(renderer.lightCullResult, out var batchCount);
+
+ for (var i = 0; i < batchCount; i++)
+ {
+ var batchInfo = new LayerBatch
+ {
+ batchId = i
+ };
+
+ var batch = batches[i];
+
+ // get the lights
+ foreach (var light in renderer.lightCullResult.visibleLights)
+ {
+ // If the lit layers are different, or if they are lit but this is a shadow casting light then don't batch.
+ if (light.IsLitLayer(batch.startLayerID))
+ {
+ batchInfo.Lights.Add(light);
+ }
+ }
+
+ if (ShadowCasterGroup2DManager.shadowCasterGroups != null)
+ {
+ var allShadows = ShadowCasterGroup2DManager.shadowCasterGroups.SelectMany(x => x.GetShadowCasters());
+ foreach (var shadowCaster in allShadows)
+ {
+ if (shadowCaster.IsShadowedLayer(batch.startLayerID))
+ batchInfo.Shadows.Add(shadowCaster);
+ }
+ }
+
+ for (var batchIndex = batch.startIndex; batchIndex <= batch.endIndex; batchIndex++)
+ {
+ batchInfo.LayerNames.Add(layers[batchIndex].name);
+ }
+
+ batchList.Add(batchInfo);
+ }
+
+ return true;
+ }
+
+ private VisualElement MakeLightPill(UnityEngine.Object light)
+ {
+ var bubble = new Button();
+ bubble.AddToClassList("Pill");
+ bubble.text = light.name;
+
+ bubble.clicked += () =>
+ {
+ Selection.activeObject = light;
+ };
+
+ return bubble;
+ }
+
+ private VisualElement GetOrCreateInfoView()
+ {
+ var root = rootVisualElement;
+ var infoView = root.Query("InfoScroller").First();
+ if (infoView != null)
+ return infoView;
+
+ var infoContainer = root.Query("InfoContainer").First();
+ infoContainer.Clear();
+
+ // load it
+ var visualTree = AssetDatabase.LoadAssetAtPath(ResourcePath + "LayerBatchInfoView.uxml");
+ infoView = visualTree.Instantiate();
+ infoContainer.Add(infoView);
+
+ return infoView;
+ }
+
+ private void ViewBatch(int index)
+ {
+ if (index >= batchList.Count())
+ return;
+
+ var root = rootVisualElement;
+ var infoView = GetOrCreateInfoView();
+
+ var batch1 = batchList[index];
+
+ var title = root.Query