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/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 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/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); 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() } } - - 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);