From 7cc3b10c22ba0e301dd68d188a0f1847fbf98b31 Mon Sep 17 00:00:00 2001 From: Jess Thomson Date: Thu, 23 Jul 2026 10:05:20 -0700 Subject: [PATCH 1/6] Hard setting supportsIndirect to true --- .../Runtime/GPUDriven/InstanceCullingBatcher.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCullingBatcher.cs b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCullingBatcher.cs index 8c533e808e9..4c5a08d9cf8 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCullingBatcher.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCullingBatcher.cs @@ -423,8 +423,6 @@ public void ProcessRenderer(int i) overridenComponents |= InstanceComponentGroup.Lightmap; } - // Scan all materials once to retrieve whether this renderer is indirect-compatible or not (and store it in the RangeKey). - var supportsIndirect = true; for (int matIndex = 0; matIndex < materialsCount; ++matIndex) { if (matIndex >= submeshCount) @@ -435,7 +433,6 @@ public void ProcessRenderer(int i) var materialIndex = rendererData.materialIndex[materialsOffset + matIndex]; var packedMaterialData = rendererData.packedMaterialData[materialIndex]; - supportsIndirect &= packedMaterialData.isIndirectSupported; } var rangeKey = new RangeKey @@ -446,7 +443,7 @@ public void ProcessRenderer(int i) shadowCastingMode = packedRendererData.shadowCastingMode, staticShadowCaster = packedRendererData.staticShadowCaster, rendererPriority = rendererPriority, - supportsIndirect = supportsIndirect + supportsIndirect = true, // For 6000.0, we always support indirect draw calls. }; ref DrawRange drawRange = ref EditDrawRange(rangeKey); From d46b2ef95ae20849376261c1904587e4ec69ea40 Mon Sep 17 00:00:00 2001 From: Jess Thomson Date: Thu, 23 Jul 2026 11:06:23 -0700 Subject: [PATCH 2/6] Fixed ambiguous reference in ShadowCaster2DEditor --- .../Editor/2D/Shadows/ShadowCaster2DEditor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Packages/com.unity.render-pipelines.universal/Editor/2D/Shadows/ShadowCaster2DEditor.cs b/Packages/com.unity.render-pipelines.universal/Editor/2D/Shadows/ShadowCaster2DEditor.cs index 57459f42989..6236f6c64d3 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/2D/Shadows/ShadowCaster2DEditor.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/2D/Shadows/ShadowCaster2DEditor.cs @@ -68,7 +68,7 @@ private static class Styles SerializedProperty m_ShadowShape2DProvider; SortingLayerDropDown m_SortingLayerDropDown; CastingSourceDropDown m_CastingSourceDropDown; - + public void OnEnable() { @@ -128,7 +128,7 @@ public override void OnInspectorGUI() if ((ShadowCaster2D.ShadowCastingSources)m_CastingSource.intValue == ShadowCaster2D.ShadowCastingSources.ShapeEditor) ShadowCaster2DInspectorGUI(); - else if (EditorToolManager.IsActiveTool()) + else if (Path2D.EditorToolManager.IsActiveTool()) ToolManager.RestorePreviousTool(); EditorGUILayout.PropertyField(m_ShadowShape2DProvider, Styles.shadowShape2DProvider, true); From f1ac3ec493f58eaa062d8e80a7ae15060068c953 Mon Sep 17 00:00:00 2001 From: Jess Thomson Date: Thu, 23 Jul 2026 11:49:32 -0700 Subject: [PATCH 3/6] Added light-transport as a dependency --- Packages/com.unity.render-pipelines.core/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Packages/com.unity.render-pipelines.core/package.json b/Packages/com.unity.render-pipelines.core/package.json index 2c7998abfc9..94cb2dbebe0 100644 --- a/Packages/com.unity.render-pipelines.core/package.json +++ b/Packages/com.unity.render-pipelines.core/package.json @@ -11,6 +11,7 @@ "com.unity.collections": "2.4.3", "com.unity.modules.physics": "1.0.0", "com.unity.modules.terrain": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0" + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.rendering.light-transport": "1.0.1" } } From b5395a3b21abd4778af4c4e1ea4951a417739796 Mon Sep 17 00:00:00 2001 From: Jess Thomson Date: Thu, 23 Jul 2026 12:56:42 -0700 Subject: [PATCH 4/6] Revert: don't depend on light-transport (files are vendored in core --- Packages/com.unity.render-pipelines.core/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/package.json b/Packages/com.unity.render-pipelines.core/package.json index 94cb2dbebe0..2c7998abfc9 100644 --- a/Packages/com.unity.render-pipelines.core/package.json +++ b/Packages/com.unity.render-pipelines.core/package.json @@ -11,7 +11,6 @@ "com.unity.collections": "2.4.3", "com.unity.modules.physics": "1.0.0", "com.unity.modules.terrain": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0", - "com.unity.rendering.light-transport": "1.0.1" + "com.unity.modules.jsonserialize": "1.0.0" } } From 9b7df8ba51f71e106997fbafe1bc9dc171600648 Mon Sep 17 00:00:00 2001 From: Jess Thomson Date: Thu, 23 Jul 2026 13:24:34 -0700 Subject: [PATCH 5/6] Add vendored .urtshader importer + fix light-transport resource paths in core --- .../DynamicGISkyOcclusion.urtshader.meta | 8 ++--- .../TraceRenderingLayerMask.urtshader.meta | 8 ++--- .../Editor/UnifiedRayTracing.meta | 8 +++++ .../UnifiedRTShaderImporter.cs | 35 +++++++++++++++++++ .../UnifiedRTShaderImporter.cs.meta | 11 ++++++ ...ity.Rendering.LightTransport.Editor.asmdef | 16 +++++++++ ...endering.LightTransport.Editor.asmdef.meta | 7 ++++ .../Runtime/Sampling/SamplingResources.cs | 4 +-- .../UnifiedRayTracing/RayTracingResources.cs | 4 +-- 9 files changed, 87 insertions(+), 14 deletions(-) create mode 100644 Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing.meta create mode 100644 Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/UnifiedRTShaderImporter.cs create mode 100644 Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/UnifiedRTShaderImporter.cs.meta create mode 100644 Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/Unity.Rendering.LightTransport.Editor.asmdef create mode 100644 Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/Unity.Rendering.LightTransport.Editor.asmdef.meta diff --git a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/DynamicGI/DynamicGISkyOcclusion.urtshader.meta b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/DynamicGI/DynamicGISkyOcclusion.urtshader.meta index f352a6f2ab2..ad34aa90e4b 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/DynamicGI/DynamicGISkyOcclusion.urtshader.meta +++ b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/DynamicGI/DynamicGISkyOcclusion.urtshader.meta @@ -4,7 +4,7 @@ ScriptedImporter: internalIDToNameTable: [] externalObjects: {} serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 42d537a8a4089e448a99fc57a06d74a9, type: 3} diff --git a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/RenderingLayerMask/TraceRenderingLayerMask.urtshader.meta b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/RenderingLayerMask/TraceRenderingLayerMask.urtshader.meta index c7962b57e64..a9e8bfd7de5 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/RenderingLayerMask/TraceRenderingLayerMask.urtshader.meta +++ b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/RenderingLayerMask/TraceRenderingLayerMask.urtshader.meta @@ -4,7 +4,7 @@ ScriptedImporter: internalIDToNameTable: [] externalObjects: {} serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 42d537a8a4089e448a99fc57a06d74a9, type: 3} diff --git a/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing.meta b/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing.meta new file mode 100644 index 00000000000..9262a70d6ee --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e22e9a992c344981ad1bed28fc2a3cf5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/UnifiedRTShaderImporter.cs b/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/UnifiedRTShaderImporter.cs new file mode 100644 index 00000000000..cb415e7f3e4 --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/UnifiedRTShaderImporter.cs @@ -0,0 +1,35 @@ +using UnityEditor.AssetImporters; +using System.IO; + +namespace UnityEditor.Rendering.UnifiedRayTracing +{ + [ScriptedImporter(1, "urtshader")] + internal class UnifiedRTShaderImporter : ScriptedImporter + { + public override void OnImportAsset(AssetImportContext ctx) + { + string source = File.ReadAllText(ctx.assetPath); + + var com = ShaderUtil.CreateComputeShaderAsset(ctx, computeShaderTemplate.Replace("SHADERCODE", source)); + var rt = ShaderUtil.CreateRayTracingShaderAsset(ctx, + raytracingShaderTemplate.Replace("SHADERCODE", source)); + + ctx.AddObjectToAsset("ComputeShader", com); + ctx.AddObjectToAsset("RayTracingShader", rt); + ctx.SetMainObject(com); + } + + // NOTE: The UnifiedRayTracing runtime was vendored into com.unity.render-pipelines.core + // (see "Move light transport package in urp"), so these raygen includes point at the + // vendored core location rather than the original com.unity.rendering.light-transport package. + const string computeShaderTemplate = + "#define UNIFIED_RT_BACKEND_COMPUTE\n" + + "SHADERCODE\n" + + "#include_with_pragmas \"Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/Compute/ComputeRaygenShader.hlsl\"\n"; + + const string raytracingShaderTemplate = + "#define UNIFIED_RT_BACKEND_HARDWARE\n" + + "SHADERCODE\n" + + "#include_with_pragmas \"Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/Hardware/HardwareRaygenShader.hlsl\"\n"; + } +} diff --git a/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/UnifiedRTShaderImporter.cs.meta b/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/UnifiedRTShaderImporter.cs.meta new file mode 100644 index 00000000000..0a4616cdc3a --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/UnifiedRTShaderImporter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 42d537a8a4089e448a99fc57a06d74a9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/Unity.Rendering.LightTransport.Editor.asmdef b/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/Unity.Rendering.LightTransport.Editor.asmdef new file mode 100644 index 00000000000..146632c0c6f --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/Unity.Rendering.LightTransport.Editor.asmdef @@ -0,0 +1,16 @@ +{ + "name": "Unity.Rendering.LightTransport.Editor", + "rootNamespace": "", + "references": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} diff --git a/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/Unity.Rendering.LightTransport.Editor.asmdef.meta b/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/Unity.Rendering.LightTransport.Editor.asmdef.meta new file mode 100644 index 00000000000..32b1956902b --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/Unity.Rendering.LightTransport.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 70b26f7ce2ce4e4c96cbc36c7e8ddb82 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Sampling/SamplingResources.cs b/Packages/com.unity.render-pipelines.core/Runtime/Sampling/SamplingResources.cs index c6fa077e777..6c2ee6204a2 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Sampling/SamplingResources.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Sampling/SamplingResources.cs @@ -29,7 +29,7 @@ public void Load(uint resourceBitmask = (uint)ResourceType.BlueNoiseTextures) { if ((resourceBitmask & (uint)ResourceType.BlueNoiseTextures) != 0) { - const string path = "Packages/com.unity.rendering.light-transport/Runtime/"; + const string path = "Packages/com.unity.render-pipelines.core/Runtime/"; m_SobolScramblingTile = AssetDatabase.LoadAssetAtPath(path + "Sampling/Textures/SobolBlueNoise/ScramblingTile256SPP.png"); m_SobolRankingTile = AssetDatabase.LoadAssetAtPath(path + "Sampling/Textures/SobolBlueNoise/RankingTile256SPP.png"); @@ -66,5 +66,3 @@ public void Dispose() } } - - diff --git a/Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/RayTracingResources.cs b/Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/RayTracingResources.cs index 89cbd6b06a4..ffd4389d91a 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/RayTracingResources.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/RayTracingResources.cs @@ -22,7 +22,7 @@ internal class RayTracingResources #if UNITY_EDITOR public void Load() { - const string path = "Packages/com.unity.rendering.light-transport/Runtime/"; + const string path = "Packages/com.unity.render-pipelines.core/Runtime/"; geometryPoolKernels = AssetDatabase.LoadAssetAtPath(path + "UnifiedRayTracing/Common/GeometryPool/GeometryPoolKernels.compute"); copyBuffer = AssetDatabase.LoadAssetAtPath(path + "UnifiedRayTracing/Common/Utilities/CopyBuffer.compute"); @@ -40,5 +40,3 @@ public void Load() } } - - From d6b7f4758033ba17183b7d10e27e00eb923f6c44 Mon Sep 17 00:00:00 2001 From: Jess Thomson Date: Thu, 23 Jul 2026 13:56:01 -0700 Subject: [PATCH 6/6] Fix stale TraceRayAndQueryHit.hlsl include in TraceVirtualOffset.urtshader (use TraceRay.hlsl for 6000.0) --- .../ProbeVolume/VirtualOffset/TraceVirtualOffset.urtshader | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/VirtualOffset/TraceVirtualOffset.urtshader b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/VirtualOffset/TraceVirtualOffset.urtshader index f528bf94f5f..ca55fd8b90b 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/VirtualOffset/TraceVirtualOffset.urtshader +++ b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/VirtualOffset/TraceVirtualOffset.urtshader @@ -6,7 +6,7 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Sampling/Sampling.hlsl" #include "Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/FetchGeometry.hlsl" -#include "Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/TraceRayAndQueryHit.hlsl" +#include "Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/TraceRay.hlsl" #define DISTANCE_THRESHOLD 5e-5f