From 15dc7f105d40f67523becb5b73a7775e103ecb6b Mon Sep 17 00:00:00 2001 From: Emilie Thaulow Date: Wed, 7 Jan 2026 15:06:38 +0000 Subject: [PATCH 01/43] Remove usage of deprecated instanceID APIs in com.unity.render-pipelines.core --- .../RenderGraphEditorRemoteDebugSession.cs | 2 +- .../GPUDriven/Culling/InstanceCuller.cs | 28 +- .../RenderGraph/Debug/DebugMessageHandler.cs | 14 +- .../RenderGraph/RenderGraphResourceBuffer.cs | 4 +- .../RenderGraph/RenderGraphResourcePool.cs | 10 +- .../RenderGraph/RenderGraphResourceTexture.cs | 4 +- .../Textures/PowerOfTwoTextureAtlas.cs | 207 ++++++++-- .../Runtime/Textures/RTHandle.cs | 21 +- .../Runtime/Textures/Texture2DAtlas.cs | 352 +++++++++++++++--- .../Tests/Editor/RenderGraphTests.cs | 2 +- .../Runtime/Lighting/LightCookieManager.cs | 22 +- .../Runtime/Material/Decal/DecalSystem.cs | 4 +- .../HDRenderPipeline.WaterSystem.Decals.cs | 21 +- .../Runtime/RTHandleUtils.cs | 10 +- ...rGraphViewerDebugDataSerializationTests.cs | 24 +- .../SerializedDebugDataMessage.data | Bin 1571 -> 1554 bytes .../Tests/Editor/SRPSmoke.Editor.Tests.asmdef | 2 +- 17 files changed, 577 insertions(+), 150 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphEditorRemoteDebugSession.cs b/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphEditorRemoteDebugSession.cs index ed8e790425f..93f44f69518 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphEditorRemoteDebugSession.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphEditorRemoteDebugSession.cs @@ -62,7 +62,7 @@ void OnMessageFromPlayer(DebugMessageHandler.MessageType messageType, DebugMessa void RegisterAndUpdateDebugData(string graphName, EntityId executionId, string executionName, DebugData debugData) { RegisterGraph(graphName); - RegisterExecution(graphName, executionId, debugData.executionName); + RegisterExecution(graphName, executionId, executionName); SetDebugData(graphName, executionId, debugData); } } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/Culling/InstanceCuller.cs b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/Culling/InstanceCuller.cs index d7bc6fd4a3f..1b404fa9380 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/Culling/InstanceCuller.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/Culling/InstanceCuller.cs @@ -240,7 +240,7 @@ unsafe uint CalculateLODVisibility(int instanceIndex, bool smallMeshCulling) { GPUInstanceIndex lodGroupIndex = renderWorld.lodGroupIndices[instanceIndex]; uint lodMask = renderWorld.lodMasks[instanceIndex]; - + if (lodGroupIndex.Equals(GPUInstanceIndex.Invalid) && lodMask == 0) { if (viewType >= BatchCullingViewType.SelectionOutline || !smallMeshCulling || minScreenRelativeHeight == 0.0f) @@ -476,7 +476,7 @@ public void Execute(int instanceIndex) InstanceHandle instance = renderWorld.indexToHandle[instanceIndex]; InternalMeshRendererSettings rendererSettings = renderWorld.rendererSettings[instanceIndex]; bool affectsLightmaps = LightmapUtils.AffectsLightmaps(renderWorld.lightmapIndices[instanceIndex]); - + var visibilityMask = CalculateVisibilityMask(instanceIndex, rendererSettings.ShadowCastingMode, affectsLightmaps); if (visibilityMask == k_VisibilityMaskNotVisible) { @@ -1979,9 +1979,7 @@ private JobHandle AnimateCrossFades(in RenderWorld renderWorld, } // For main camera, animate crossfades, and store the result in the hashmap to be retrieved by other cameras - EntityId viewID = EntityId.From(context.viewID.GetInstanceID()); - - if (!renderWorld.TryGetPerCameraInstanceData(viewID, out perCameraInstanceData)) + if (!renderWorld.TryGetPerCameraInstanceData(context.viewID.GetEntityId(), out perCameraInstanceData)) { // For picking / filtering and outlining passes. We do not have animated crossfade data. hasAnimatedCrossfade = false; @@ -1999,7 +1997,7 @@ private JobHandle AnimateCrossFades(in RenderWorld renderWorld, m_LODParamsToCameraID.TryAdd(lodHash, new AnimatedFadeData { - cameraID = viewID, + cameraID = context.viewID.GetEntityId(), jobHandle = animatedCrossFadesJob }); @@ -2038,9 +2036,8 @@ private unsafe JobHandle ScheduleFrustumCullingJob( &screenRelativeMetric, &meshLodConstant); } - if (occlusionCullingCommon != null) - occlusionCullingCommon.UpdateSilhouettePlanes(EntityId.From(context.viewID.GetInstanceID()), receiverPlanes.SilhouettePlaneSubArray()); + occlusionCullingCommon.UpdateSilhouettePlanes(context.viewID.GetEntityId(), receiverPlanes.SilhouettePlaneSubArray()); JobHandle animatedCrossFadesJob = AnimateCrossFades(renderWorld, context, out RenderWorld.PerCameraInstanceData perCameraInstanceData, @@ -2049,7 +2046,7 @@ private unsafe JobHandle ScheduleFrustumCullingJob( var emptyPerCameraInstanceData = new RenderWorld.PerCameraInstanceData(0, Allocator.TempJob); if (!perCameraInstanceData.IsCreated) perCameraInstanceData = emptyPerCameraInstanceData; // Set struct with empty NativeArray otherwise safety checks will complain - + var cullingJob = new CullingJob { renderWorld = renderWorld, @@ -2218,11 +2215,10 @@ public unsafe JobHandle CreateCullJobTree( { cullingJobHandle = ScheduleCompactedVisibilityMaskJob(renderWorld, rendererVisibilityMasks, cullingJobHandle); - EntityId viewID = EntityId.From(context.viewID.GetInstanceID()); int debugCounterBaseIndex = -1; if (m_DebugStats?.enabled ?? false) { - debugCounterBaseIndex = m_SplitDebugArray.TryAddSplits(context.viewType, viewID, context.cullingSplits.Length); + debugCounterBaseIndex = m_SplitDebugArray.TryAddSplits(context.viewType, context.viewID.GetEntityId(), context.cullingSplits.Length); } var batchCount = drawInstanceData.drawBatches.Length; @@ -2237,12 +2233,12 @@ public unsafe JobHandle CreateCullJobTree( var binVisibleInstanceCounts = new NativeArray(maxBinCount, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); var binVisibleInstanceOffsets = new NativeArray(maxBinCount, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); - bool useOcclusionCulling = (occlusionCullingCommon != null) && occlusionCullingCommon.HasOccluderContext(viewID); + bool useOcclusionCulling = (occlusionCullingCommon != null) && occlusionCullingCommon.HasOccluderContext(context.viewID.GetEntityId()); int indirectContextIndex = -1; if (useOcclusionCulling) { - indirectContextIndex = m_IndirectStorage.TryAllocateContext(viewID); - cullingOutput.customCullingResult[0] = (IntPtr)viewID.GetRawData(); + indirectContextIndex = m_IndirectStorage.TryAllocateContext(context.viewID.GetEntityId()); + cullingOutput.customCullingResult[0] = (IntPtr)context.viewID.GetEntityId().GetRawData(); } IndirectBufferLimits indirectBufferLimits = m_IndirectStorage.GetLimits(indirectContextIndex); NativeArray indirectBufferAllocInfo = m_IndirectStorage.GetAllocInfoSubArray(indirectContextIndex); @@ -2409,7 +2405,7 @@ private JobHandle ScheduleFilteringCullingOutputJob_EditorOnly(in BatchCullingCo var drawOutputJob = new DrawCommandOutputFiltering { renderWorld = renderWorld, - viewID = EntityId.From(context.viewID.GetInstanceID()), + viewID = context.viewID.GetEntityId(), batchIDs = batchIDs, instanceDataBuffer = instanceDataBuffer, rendererVisibilityMasks = rendererVisibilityMasks, @@ -2451,7 +2447,7 @@ private JobHandle SchedulePickingCullingOutputJob_EditorOnly(in BatchCullingCont var drawOutputJob = new DrawCommandOutputFiltering { renderWorld = renderWorld, - viewID = EntityId.From(context.viewID.GetInstanceID()), + viewID = context.viewID.GetEntityId(), batchIDs = batchIDs, instanceDataBuffer = instanceDataBuffer, rendererVisibilityMasks = rendererVisibilityMasks, diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Debug/DebugMessageHandler.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Debug/DebugMessageHandler.cs index 385b631efb8..4fba82f2bf9 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Debug/DebugMessageHandler.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Debug/DebugMessageHandler.cs @@ -20,7 +20,8 @@ class DebugMessageHandler : ScriptableObject // ------------------------ // Version history: // 1 - Initial version - internal const int k_Version = 1; + // 2 - Changed executionId from 32bit InstanceID to 64bit EntityId + internal const int k_Version = 2; // These were generated using GUID.NewGuid and hard-coded static readonly Guid s_EditorToPlayerGuid = new Guid("df519969-f421-4397-b2a1-1740abc989a0"); @@ -119,9 +120,7 @@ internal static byte[] SerializeMessage(MessageType type, IPayload payload = nul throw new InvalidOperationException("No valid payload provided"); writer.Write(debugDataPayload.graphName); -#pragma warning disable 618 //todo @emilie.thaulow replace with proper read of EntityId - writer.Write(debugDataPayload.executionId); -#pragma warning restore 618 + writer.Write(debugDataPayload.executionId.GetRawData()); writer.Write(DebugDataSerialization.ToJson(debugDataPayload.debugData)); } else if (type == MessageType.AnalyticsData) @@ -141,7 +140,7 @@ internal static byte[] SerializeMessage(MessageType type, IPayload payload = nul return memoryStream.ToArray(); } - internal static (MessageType, IPayload) DeserializeMessage(byte[] data) + internal static unsafe (MessageType, IPayload) DeserializeMessage(byte[] data) { using var memoryStream = new MemoryStream(data); using var reader = new BinaryReader(memoryStream); @@ -158,9 +157,8 @@ internal static (MessageType, IPayload) DeserializeMessage(byte[] data) } payload.graphName = reader.ReadString(); -#pragma warning disable 618 //todo @emilie.thaulow replace with proper read of EntityId - payload.executionId = reader.ReadInt32(); -#pragma warning restore 618 + ulong rawEntityId = reader.ReadUInt64(); + payload.executionId = *((EntityId*)(&rawEntityId)); payload.debugData = DebugDataSerialization.FromJson(reader.ReadString()); return (type, payload); } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceBuffer.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceBuffer.cs index fcecfa3329c..6a4158d0bd9 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceBuffer.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceBuffer.cs @@ -161,9 +161,9 @@ override protected string GetResourceTypeName() return "GraphicsBuffer"; } - override protected int GetSortIndex(GraphicsBuffer res) + override protected ulong GetSortIndex(GraphicsBuffer res) { - return res.GetHashCode(); + return (ulong)res.GetHashCode(); } } } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourcePool.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourcePool.cs index cf43e8fd107..108e43673b9 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourcePool.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourcePool.cs @@ -15,7 +15,7 @@ abstract class RenderGraphResourcePool : IRenderGraphResourcePool where Ty { // Dictionary tracks resources by hash and stores resources with same hash in a List (list instead of a stack because we need to be able to remove stale allocations, potentially in the middle of the stack). // The list needs to be sorted otherwise you could get inconsistent resource usage from one frame to another. - protected Dictionary> m_ResourcePool = new Dictionary>(); + protected Dictionary> m_ResourcePool = new Dictionary>(); // This list allows us to determine if all resources were correctly released in the frame when validity checks are enabled. // This is useful to warn in case of user error or avoid leaks when a render graph execution error occurs for example. @@ -27,13 +27,13 @@ abstract class RenderGraphResourcePool : IRenderGraphResourcePool where Ty protected abstract string GetResourceName(in Type res); protected abstract long GetResourceSize(in Type res); protected abstract string GetResourceTypeName(); - protected abstract int GetSortIndex(Type res); + protected abstract ulong GetSortIndex(Type res); public void ReleaseResource(int hash, Type resource, int currentFrameIndex) { if (!m_ResourcePool.TryGetValue(hash, out var list)) { - list = new SortedList(); + list = new SortedList(); m_ResourcePool.Add(hash, list); } @@ -42,7 +42,7 @@ public void ReleaseResource(int hash, Type resource, int currentFrameIndex) public bool TryGetResource(int hashCode, out Type resource) { - if (m_ResourcePool.TryGetValue(hashCode, out SortedList list) && list.Count > 0) + if (m_ResourcePool.TryGetValue(hashCode, out SortedList list) && list.Count > 0) { var index = list.Count - 1; resource = list.Values[index].resource; @@ -143,7 +143,7 @@ public int GetNumResourcesAvailable() return totalResources; } - static List s_ToRemoveList = new List(32); + static List s_ToRemoveList = new List(32); public override void PurgeUnusedResources(int currentFrameIndex) { diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceTexture.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceTexture.cs index aebce9c0dcd..7763471187d 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceTexture.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceTexture.cs @@ -613,9 +613,9 @@ override protected string GetResourceTypeName() return "Texture"; } - override protected int GetSortIndex(RTHandle res) + override protected ulong GetSortIndex(RTHandle res) { - return res.GetInstanceID(); + return res.GetUniqueID(); } } } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Textures/PowerOfTwoTextureAtlas.cs b/Packages/com.unity.render-pipelines.core/Runtime/Textures/PowerOfTwoTextureAtlas.cs index 4175f1fb208..b3f3c7e5d67 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Textures/PowerOfTwoTextureAtlas.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Textures/PowerOfTwoTextureAtlas.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using UnityEngine.Experimental.Rendering; @@ -11,7 +12,7 @@ public class PowerOfTwoTextureAtlas : Texture2DAtlas readonly int m_MipPadding; const float k_MipmapFactorApprox = 1.33f; - private Dictionary m_RequestedTextures = new Dictionary(); + private Dictionary m_RequestedTextures = new Dictionary(); /// /// Create a new texture atlas, must have power of two size. @@ -120,15 +121,44 @@ private void Blit2DTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture textu /// Source scale (.xy) and offset(.zw). /// Blit mip maps. /// Override texture instance ID. - public override void BlitTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips = true, int overrideInstanceID = -1) + [Obsolete("BlitTexture(CommandBuffer, Vector4, Texture, Vector4, bool, int) is obsolete, use BlitTexture(CommandBuffer, Vector4, Texture, Vector4, bool, TextureIdentifier) instead.", true)] + public override void BlitTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips, int overrideInstanceID) + { + int instanceID = overrideInstanceID != -1 ? overrideInstanceID : texture.GetEntityId(); + TextureIdentifier identifier = new TextureIdentifier((ulong)instanceID); + BlitTexture(cmd, scaleOffset, texture, sourceScaleOffset, blitMips, identifier); + } + + /// + /// Blit texture into the atlas with padding. + /// + /// Target command buffer for graphics commands. + /// Destination scale (.xy) and offset (.zw) + /// Source Texture + /// Source scale (.xy) and offset(.zw). + /// Override texture instance ID. + [Obsolete("BlitTexture(CommandBuffer, Vector4, Texture, Vector4, int) is obsolete, use BlitTexture(CommandBuffer, Vector4, Texture, Vector4, bool, TextureIdentifier) instead.", true)] + public override void BlitTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, int overrideInstanceID) + { + BlitTexture(cmd, scaleOffset, texture, sourceScaleOffset, true, overrideInstanceID); + } + + /// + /// Blit texture into the atlas with padding. + /// + /// Target command buffer for graphics commands. + /// Destination scale (.xy) and offset (.zw) + /// Source Texture + /// Source scale (.xy) and offset(.zw). + /// Blit mip maps. + /// Override texture identifier. + public override void BlitTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips = true, TextureIdentifier overrideIdentifier = default) { // We handle ourself the 2D blit because cookies needs mipPadding for trilinear filtering if (Is2D(texture)) { Blit2DTexture(cmd, scaleOffset, texture, sourceScaleOffset, blitMips, BlitType.Padding); -#pragma warning disable 618 // todo @emilie.thaulow replace with GetIdentifier() - MarkGPUTextureValid(overrideInstanceID != -1 ? overrideInstanceID : texture.GetEntityId(), blitMips); -#pragma warning restore 618 + MarkGPUTextureValid(overrideIdentifier != default ? overrideIdentifier : GetTextureIdentifier(texture), blitMips); } } @@ -141,15 +171,45 @@ public override void BlitTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture /// Source scale (.xy) and offset(.zw). /// Blit mip maps. /// Override texture instance ID. - public void BlitTextureMultiply(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips = true, int overrideInstanceID = -1) + [Obsolete("BlitTextureMultiply(CommandBuffer, Vector4, Texture, Vector4, bool, int) is obsolete, use BlitTextureMultiply(CommandBuffer, Vector4, Texture, Vector4, bool, TextureIdentifier) instead.", true)] + public void BlitTextureMultiply(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips, int overrideInstanceID) + { + int instanceID = overrideInstanceID != -1 ? overrideInstanceID : texture.GetEntityId(); + TextureIdentifier identifier = new TextureIdentifier((ulong)instanceID); + BlitTextureMultiply(cmd, scaleOffset, texture, sourceScaleOffset, blitMips, identifier); + + } + + /// + /// Blit texture into the atlas with padding and blending. + /// + /// Target command buffer for graphics commands. + /// Destination scale (.xy) and offset (.zw) + /// Source Texture + /// Source scale (.xy) and offset(.zw). + /// Override texture instance ID. + [Obsolete("BlitTextureMultiply(CommandBuffer, Vector4, Texture, Vector4, int) is obsolete, use BlitTextureMultiply(CommandBuffer, Vector4, Texture, Vector4, bool, TextureIdentifier) instead.", true)] + public void BlitTextureMultiply(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, int overrideInstanceID) + { + BlitTextureMultiply(cmd, scaleOffset, texture, sourceScaleOffset, true, overrideInstanceID); + } + + /// + /// Blit texture into the atlas with padding and blending. + /// + /// Target command buffer for graphics commands. + /// Destination scale (.xy) and offset (.zw) + /// Source Texture + /// Source scale (.xy) and offset(.zw). + /// Blit mip maps. + /// Override texture identifier. + public void BlitTextureMultiply(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips = true, TextureIdentifier overrideIdentifier = default) { // We handle ourself the 2D blit because cookies needs mipPadding for trilinear filtering if (Is2D(texture)) { Blit2DTexture(cmd, scaleOffset, texture, sourceScaleOffset, blitMips, BlitType.PaddingMultiply); -#pragma warning disable 618 // todo @emilie.thaulow replace with GetIdentifier() - MarkGPUTextureValid(overrideInstanceID != -1 ? overrideInstanceID : texture.GetEntityId(), blitMips); -#pragma warning restore 618 + MarkGPUTextureValid(overrideIdentifier != default ? overrideIdentifier : GetTextureIdentifier(texture), blitMips); } } @@ -162,15 +222,46 @@ public void BlitTextureMultiply(CommandBuffer cmd, Vector4 scaleOffset, Texture /// Source scale (.xy) and offset(.zw). /// Blit mip maps. /// Override texture instance ID. - public override void BlitOctahedralTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips = true, int overrideInstanceID = -1) + [Obsolete("BlitOctahedralTexture(CommandBuffer, Vector4, Texture, Vector4, bool, int) is obsolete, use BlitOctahedralTexture(CommandBuffer, Vector4, Texture, Vector4, bool ,TextureIdentifier ) instead.", true)] + public override void BlitOctahedralTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips, int overrideInstanceID) + { + int instanceID = overrideInstanceID != -1 ? overrideInstanceID : texture.GetEntityId(); + TextureIdentifier identifier = new TextureIdentifier((ulong)instanceID); + BlitOctahedralTexture(cmd, scaleOffset, texture, sourceScaleOffset, blitMips, identifier); + + } + + /// + /// Blit octahedral texture into the atlas with padding. + /// + /// Target command buffer for graphics commands. + /// Destination scale (.xy) and offset (.zw) + /// Source Texture + /// Source scale (.xy) and offset(.zw). + /// Override texture instance ID. + [Obsolete("BlitOctahedralTexture(CommandBuffer, Vector4, Texture, Vector4, int) is obsolete, use BlitOctahedralTexture(CommandBuffer, Vector4, Texture, Vector4, bool ,TextureIdentifier ) instead.", true)] + public override void BlitOctahedralTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, int overrideInstanceID) + { + BlitOctahedralTexture(cmd, scaleOffset, texture, sourceScaleOffset, true, overrideInstanceID); + + } + + /// + /// Blit octahedral texture into the atlas with padding. + /// + /// Target command buffer for graphics commands. + /// Destination scale (.xy) and offset (.zw) + /// Source Texture + /// Source scale (.xy) and offset(.zw). + /// Blit mip maps. + /// Override texture identifier. + public override void BlitOctahedralTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips = true, TextureIdentifier textureIdentifier = default) { // We handle ourself the 2D blit because cookies needs mipPadding for trilinear filtering if (Is2D(texture)) { Blit2DTexture(cmd, scaleOffset, texture, sourceScaleOffset, blitMips, BlitType.OctahedralPadding); -#pragma warning disable 618 // todo @emilie.thaulow replace with GetIdentifier() - MarkGPUTextureValid(overrideInstanceID != -1 ? overrideInstanceID : texture.GetEntityId(), blitMips); -#pragma warning restore 618 + MarkGPUTextureValid(textureIdentifier != default ? textureIdentifier : GetTextureIdentifier(texture), blitMips); } } @@ -183,15 +274,44 @@ public override void BlitOctahedralTexture(CommandBuffer cmd, Vector4 scaleOffse /// Source scale (.xy) and offset(.zw). /// Blit mip maps. /// Override texture instance ID. - public void BlitOctahedralTextureMultiply(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips = true, int overrideInstanceID = -1) + [Obsolete("BlitOctahedralTextureMultiply(CommandBuffer, Vector4, Texture, Vector4, bool, int) is obsolete, use BlitOctahedralTextureMultiply(CommandBuffer, Vector4, Texture, Vector4, bool,TextureIdentifier ) instead.", true)] + public void BlitOctahedralTextureMultiply(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips, int overrideInstanceID ) + { + int instanceID = overrideInstanceID != -1 ? overrideInstanceID : texture.GetEntityId(); + TextureIdentifier identifier = new TextureIdentifier((ulong)instanceID); + BlitOctahedralTextureMultiply(cmd, scaleOffset, texture, sourceScaleOffset, blitMips, identifier); + } + + /// + /// Blit octahedral texture into the atlas with padding. + /// + /// Target command buffer for graphics commands. + /// Destination scale (.xy) and offset (.zw) + /// Source Texture + /// Source scale (.xy) and offset(.zw). + /// Override texture instance ID. + [Obsolete("BlitOctahedralTextureMultiply(CommandBuffer, Vector4, Texture, Vector4, int) is obsolete, use BlitOctahedralTextureMultiply(CommandBuffer, Vector4, Texture, Vector4, bool,TextureIdentifier ) instead.", true)] + public void BlitOctahedralTextureMultiply(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, int overrideInstanceID ) + { + BlitOctahedralTextureMultiply(cmd, scaleOffset, texture, sourceScaleOffset, true, overrideInstanceID); + } + + /// + /// Blit octahedral texture into the atlas with padding. + /// + /// Target command buffer for graphics commands. + /// Destination scale (.xy) and offset (.zw) + /// Source Texture + /// Source scale (.xy) and offset(.zw). + /// Blit mip maps. + /// Override texture identifier. + public void BlitOctahedralTextureMultiply(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips = true, TextureIdentifier overrideIdentifier = default) { // We handle ourself the 2D blit because cookies needs mipPadding for trilinear filtering if (Is2D(texture)) { Blit2DTexture(cmd, scaleOffset, texture, sourceScaleOffset, blitMips, BlitType.OctahedralPaddingMultiply); -#pragma warning disable 618 // todo @emilie.thaulow replace with GetIdentifier() - MarkGPUTextureValid(overrideInstanceID != -1 ? overrideInstanceID : texture.GetEntityId(), blitMips); -#pragma warning restore 618 + MarkGPUTextureValid(overrideIdentifier != default ? overrideIdentifier : GetTextureIdentifier(texture), blitMips); } } @@ -221,7 +341,25 @@ Vector2 GetPowerOfTwoTextureSize(Texture texture) /// Request height in pixels. /// Override texture instance ID. /// True on success, false otherwise. - public override bool AllocateTexture(CommandBuffer cmd, ref Vector4 scaleOffset, Texture texture, int width, int height, int overrideInstanceID = -1) + [Obsolete("AllocateTexture(CommandBuffer, ref Vector4, Texture, int, int, int) is obsolete, use AllocateTexture(CommandBuffer, ref Vector4, Texture, int, int, TextureIdentifier) instead.", true)] + public override bool AllocateTexture(CommandBuffer cmd, ref Vector4 scaleOffset, Texture texture, int width, int height, int overrideInstanceID) + { + TextureIdentifier identifier = new TextureIdentifier((ulong)overrideInstanceID); + return AllocateTexture(cmd, ref scaleOffset, texture, width, height, identifier); + } + + // Override the behavior when we add a texture so all non-pot textures are blitted to a pot target zone + /// + /// Allocate space from the atlas for a texture and copy texture contents into the atlas. + /// + /// Target command buffer for graphics commands. + /// Allocated scale (.xy) and offset (.zw) + /// Source Texture + /// Request width in pixels. + /// Request height in pixels. + /// Override texture identifier. + /// True on success, false otherwise. + public override bool AllocateTexture(CommandBuffer cmd, ref Vector4 scaleOffset, Texture texture, int width, int height, TextureIdentifier overrideIdentifier = default) { // This atlas only supports square textures if (height != width) @@ -232,7 +370,7 @@ public override bool AllocateTexture(CommandBuffer cmd, ref Vector4 scaleOffset, TextureSizeToPowerOfTwo(texture, ref height, ref width); - return base.AllocateTexture(cmd, ref scaleOffset, texture, width, height); + return base.AllocateTexture(cmd, ref scaleOffset, texture, width, height, default(TextureIdentifier)); } /// @@ -255,7 +393,7 @@ public override bool AllocateTexture(CommandBuffer cmd, ref Vector4 scaleOffset, /// The height /// True if the space is reserved public bool ReserveSpace(Texture texture, int width, int height) - => ReserveSpace(GetTextureID(texture), width, height); + => ReserveSpace(GetTextureIdentifier(texture), width, height); /// /// Reserves the space on the texture atlas @@ -266,7 +404,7 @@ public bool ReserveSpace(Texture texture, int width, int height) /// The height /// True if the space is reserved public bool ReserveSpace(Texture textureA, Texture textureB, int width, int height) - => ReserveSpace(GetTextureID(textureA, textureB), width, height); + => ReserveSpace(GetTextureIdentifier(textureA, textureB), width, height); /// /// Reserves the space on the texture atlas @@ -275,23 +413,36 @@ public bool ReserveSpace(Texture textureA, Texture textureB, int width, int heig /// The width /// The height /// True if the space is reserved + [Obsolete("ReserveSpace with int id is obsolete, use the TextureIdentifier version instead.", true)] public bool ReserveSpace(int id, int width, int height) { - m_RequestedTextures[id] = new Vector2Int(width, height); + TextureIdentifier identifier = new TextureIdentifier((ulong)id); + return ReserveSpace(identifier, width, height); + } + + /// + /// Reserves the space on the texture atlas + /// + /// The id + /// The width + /// The height + /// True if the space is reserved + public bool ReserveSpace(TextureIdentifier identifier, int width, int height) + { + m_RequestedTextures[identifier] = new Vector2Int(width, height); // Cookie texture resolution changing between frame is a special case, so we handle it here. // The texture will be re-allocated and may cause holes in the atlas texture, which is fine // because when it doesn't have any more space, it will re-layout the texture correctly. - var cachedSize = GetCachedTextureSize(id); - if (!IsCached(out _, id) || cachedSize.x != width || cachedSize.y != height) + var cachedSize = GetCachedTextureSize(identifier); + if (!IsCached(out _, identifier) || cachedSize.x != width || cachedSize.y != height) { Vector4 scaleBias = Vector4.zero; - if (!AllocateTextureWithoutBlit(id, width, height, ref scaleBias)) + if (!AllocateTextureWithoutBlit(identifier, width, height, ref scaleBias)) return false; } return true; } - /// /// sort all the requested allocation from biggest to smallest and re-insert them. /// This function does not moves the textures in the atlas, it only changes their coordinates @@ -299,7 +450,7 @@ public bool ReserveSpace(int id, int width, int height) /// True if all textures have successfully been re-inserted in the atlas public bool RelayoutEntries() { - var entries = new List<(int instanceId, Vector2Int size)>(); + var entries = new List<(TextureIdentifier identifier, Vector2Int size)>(); foreach (var entry in m_RequestedTextures) entries.Add((entry.Key, entry.Value)); @@ -314,7 +465,7 @@ public bool RelayoutEntries() bool success = true; Vector4 newScaleOffset = Vector4.zero; foreach (var e in entries) - success &= AllocateTextureWithoutBlit(e.instanceId, e.size.x, e.size.y, ref newScaleOffset); + success &= AllocateTextureWithoutBlit(e.identifier, e.size.x, e.size.y, ref newScaleOffset); return success; } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs b/Packages/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs index 1d9eb5d7db9..32f8eb9c8f0 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Textures/RTHandle.cs @@ -202,20 +202,33 @@ internal void SetTexture(RenderTargetIdentifier tex) m_NameID = tex; } + /// + /// Get the identifier of the RTHandle. + /// + /// The RTHandle identifier. + public ulong GetUniqueID() + { + if (m_RT != null) + return m_RT.GetEntityId().GetRawData(); + else if (m_ExternalTexture != null) + return m_ExternalTexture.GetEntityId().GetRawData(); + else + return (ulong)m_NameID.GetHashCode(); // No instance ID so we return the hash code. + } + /// /// Get the Instance ID of the RTHandle. /// /// The RTHandle Instance ID. + [Obsolete("GetInstanceID() is obsolete, use GetUniqueID() instead.", true)] public int GetInstanceID() { -#pragma warning disable 618 // todo @emilie.thaulow replace with ulong if (m_RT != null) - return m_RT.GetEntityId(); + return m_RT.GetInstanceID(); else if (m_ExternalTexture != null) - return m_ExternalTexture.GetEntityId(); + return m_ExternalTexture.GetInstanceID(); else return m_NameID.GetHashCode(); // No instance ID so we return the hash code. -#pragma warning restore 618 } /// diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Textures/Texture2DAtlas.cs b/Packages/com.unity.render-pipelines.core/Runtime/Textures/Texture2DAtlas.cs index 041baa4e01c..2782eeaf8c5 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Textures/Texture2DAtlas.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Textures/Texture2DAtlas.cs @@ -140,6 +140,71 @@ public void Reset() /// public class Texture2DAtlas { + /// + /// A unique identifier for textures used as a Texture2DAtlas. + /// +#pragma warning disable CS0660, CS0661 + // The omission of Equals(object) is intentional, it causes boxing. + public readonly struct TextureIdentifier : IEquatable +#pragma warning restore CS0660, CS0661 + { + /// + /// An invalid or default TextureIdentifier. + /// + public static TextureIdentifier None => default; + + internal TextureIdentifier(ulong value) + { + this.value = value; + } + + /// + /// Returns true if other equals the current TextureIdentifier. + /// + /// Other TextureIdentifier to compare to. + /// True if equal. + public bool Equals(TextureIdentifier other) + { + return value == other.value; + } + + /// + /// Get hash code for the TextureIdentifier. + /// + /// Hash code. + public override int GetHashCode() + { + return value.GetHashCode(); + } + + /// + /// Equality operator. + /// + /// First operand. + /// Second operand. + /// True if equal. + public static bool operator ==(TextureIdentifier left, TextureIdentifier right) + { + return left.Equals(right); + } + + /// + /// Inequality operator. + /// + /// First operand. + /// Second operand. + /// True if not equal. + public static bool operator !=(TextureIdentifier left, TextureIdentifier right) + { + return !left.Equals(right); + } + + /// + /// Internal value of the identifier, shouldn't be directly used. + /// + internal readonly ulong value; + } + private enum BlitType { Default, @@ -183,9 +248,9 @@ private enum BlitType private protected bool m_UseMipMaps; bool m_IsAtlasTextureOwner = false; private AtlasAllocator m_AtlasAllocator = null; - private Dictionary m_AllocationCache = new Dictionary(); - private Dictionary m_IsGPUTextureUpToDate = new Dictionary(); - private Dictionary m_TextureHashes = new Dictionary(); + private Dictionary m_AllocationCache = new(); + private Dictionary m_IsGPUTextureUpToDate = new(); + private Dictionary m_TextureHashes = new(); static readonly Vector4 fullScaleOffset = new Vector4(1, 1, 0, 0); @@ -370,18 +435,18 @@ private void Blit2DTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture textu /// /// Mark texture valid on the GPU. /// - /// Texture instance ID. + /// Texture identifier. /// Texture has valid mip maps. - private protected void MarkGPUTextureValid(int instanceId, bool mipAreValid = false) + private protected void MarkGPUTextureValid(TextureIdentifier identifier, bool mipAreValid = false) { - m_IsGPUTextureUpToDate[instanceId] = (mipAreValid) ? kGPUTexValidMipAll : kGPUTexValidMip0; + m_IsGPUTextureUpToDate[identifier] = (mipAreValid) ? kGPUTexValidMipAll : kGPUTexValidMip0; } /// /// Mark texture invalid on the GPU. /// - /// Texture instance ID. - private protected void MarkGPUTextureInvalid(int instanceId) => m_IsGPUTextureUpToDate[instanceId] = kGPUTexInvalid; + /// Texture identifier. + private protected void MarkGPUTextureInvalid(TextureIdentifier identifier) => m_IsGPUTextureUpToDate[identifier] = kGPUTexInvalid; /// /// Blit 2D texture into the atlas. @@ -392,7 +457,40 @@ private protected void MarkGPUTextureValid(int instanceId, bool mipAreValid = fa /// Source scale (.xy) and offset(.zw). /// Blit mip maps. /// Override texture instance ID. - public virtual void BlitTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips = true, int overrideInstanceID = -1) + [Obsolete("BlitTexture(CommandBuffer, Vector4, Texture, Vector4 , bool , int) is obsolete, " + + "use BlitTexture(CommandBuffer, Vector4, Texture, Vector4, bool, TextureIdentifier) instead.", true)] + public virtual void BlitTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips, int overrideInstanceID) + { + var instanceID = overrideInstanceID != -1 ? overrideInstanceID : GetTextureID(texture); + TextureIdentifier identifier = new TextureIdentifier((ulong)instanceID); + BlitTexture(cmd, scaleOffset, texture, sourceScaleOffset, blitMips, identifier); + } + + /// + /// Blit 2D texture into the atlas. + /// + /// Target command buffer for graphics commands. + /// Destination scale (.xy) and offset (.zw) + /// Source Texture + /// Source scale (.xy) and offset(.zw). + /// Override texture instance ID. + [Obsolete("BlitTexture(CommandBuffer, Vector4, Texture, Vector4, int) is obsolete, " + + "use BlitTexture(CommandBuffer, Vector4, Texture, Vector4, bool, TextureIdentifier) instead.", true)] + public virtual void BlitTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, int overrideInstanceID) + { + BlitTexture(cmd, scaleOffset, texture, sourceScaleOffset, true, overrideInstanceID); + } + + /// + /// Blit 2D texture into the atlas. + /// + /// Target command buffer for graphics commands. + /// Destination scale (.xy) and offset (.zw) + /// Source Texture + /// Source scale (.xy) and offset(.zw). + /// Blit mip maps. + /// Override texture identifier. + public virtual void BlitTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips = true, TextureIdentifier overrideIdentifier = default) { // This atlas only support 2D texture so we only blit 2D textures if (Is2D(texture)) @@ -402,9 +500,9 @@ public virtual void BlitTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture blitType = BlitType.SingleChannel; Blit2DTexture(cmd, scaleOffset, texture, sourceScaleOffset, blitMips, blitType); - var instanceID = overrideInstanceID != -1 ? overrideInstanceID : GetTextureID(texture); - MarkGPUTextureValid(instanceID, blitMips); - m_TextureHashes[instanceID] = CoreUtils.GetTextureHash(texture); + var identifier = overrideIdentifier != default ? overrideIdentifier : GetTextureIdentifier(texture); + MarkGPUTextureValid(identifier, blitMips); + m_TextureHashes[identifier] = CoreUtils.GetTextureHash(texture); } } @@ -417,10 +515,45 @@ public virtual void BlitTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture /// Source scale (.xy) and offset(.zw). /// Blit mip maps. /// Override texture instance ID. - public virtual void BlitOctahedralTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips = true, int overrideInstanceID = -1) + [Obsolete("BlitOctahedralTexture(CommandBuffer, Vector4, Texture, Vector4, bool, int) is obsolete, use " + + "BlitOctahedralTexture(CommandBuffer, Vector4, Texture, Vector4, bool, TextureIdentifier) instead.", true)] + public virtual void BlitOctahedralTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips, int overrideInstanceID) + { + // Default implementation. No padding in Texture2DAtlas, no need to handle specially. + var instanceID = overrideInstanceID != -1 ? overrideInstanceID : GetTextureID(texture); + TextureIdentifier identifier = new TextureIdentifier((ulong)instanceID); + BlitOctahedralTexture(cmd, scaleOffset, texture, sourceScaleOffset, blitMips, identifier); + } + + /// + /// Blit octahedral texture into the atlas. + /// + /// Target command buffer for graphics commands. + /// Destination scale (.xy) and offset (.zw) + /// Source Texture + /// Source scale (.xy) and offset(.zw). + /// Override texture instance ID. + [Obsolete("BlitOctahedralTexture(CommandBuffer, Vector4, Texture, Vector4, int) is obsolete, use " + + "BlitOctahedralTexture(CommandBuffer, Vector4, Texture, Vector4, bool, TextureIdentifier) instead.", true)] + public virtual void BlitOctahedralTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, int overrideInstanceID) + { + // Default implementation. No padding in Texture2DAtlas, no need to handle specially. + BlitOctahedralTexture(cmd, scaleOffset, texture, sourceScaleOffset, true, overrideInstanceID); + } + + /// + /// Blit octahedral texture into the atlas. + /// + /// Target command buffer for graphics commands. + /// Destination scale (.xy) and offset (.zw) + /// Source Texture + /// Source scale (.xy) and offset(.zw). + /// Blit mip maps. + /// Override texture identifier. + public virtual void BlitOctahedralTexture(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, Vector4 sourceScaleOffset, bool blitMips = true, TextureIdentifier overrideIdentifier = default) { // Default implementation. No padding in Texture2DAtlas, no need to handle specially. - BlitTexture(cmd, scaleOffset, texture, sourceScaleOffset, blitMips, overrideInstanceID); + BlitTexture(cmd, scaleOffset, texture, sourceScaleOffset, blitMips, overrideIdentifier); } /// @@ -431,7 +564,38 @@ public virtual void BlitOctahedralTexture(CommandBuffer cmd, Vector4 scaleOffset /// Source Texture /// Blit mip maps. /// Override texture instance ID. - public virtual void BlitCubeTexture2D(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, bool blitMips = true, int overrideInstanceID = -1) + [Obsolete("BlitCubeTexture2D(CommandBuffer, Vector4, Texture, bool blitMips, int ) is obsolete, " + + "use BlitCubeTexture2D(CommandBuffer, Vector4, Texture, bool, TextureIdentifier) instead.", true)] + public virtual void BlitCubeTexture2D(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, bool blitMips, int overrideInstanceID) + { + var instanceID = overrideInstanceID != -1 ? overrideInstanceID : GetTextureID(texture); + TextureIdentifier identifier = new TextureIdentifier((ulong)instanceID); + BlitCubeTexture2D(cmd, scaleOffset, texture, blitMips, identifier); + } + + /// + /// Blit and project Cube texture into a 2D texture in the atlas. + /// + /// Target command buffer for graphics commands. + /// Destination scale (.xy) and offset (.zw) + /// Source Texture + /// Override texture instance ID. + [Obsolete("BlitCubeTexture2D(CommandBuffer, Vector4, Texture, int) is obsolete, " + + "use BlitCubeTexture2D(CommandBuffer, Vector4, Texture, bool, TextureIdentifier) instead.", true)] + public virtual void BlitCubeTexture2D(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, int overrideInstanceID) + { + BlitCubeTexture2D(cmd, scaleOffset, texture, true, overrideInstanceID); + } + + /// + /// Blit and project Cube texture into a 2D texture in the atlas. + /// + /// Target command buffer for graphics commands. + /// Destination scale (.xy) and offset (.zw) + /// Source Texture + /// Blit mip maps. + /// Override texture identifier. + public virtual void BlitCubeTexture2D(CommandBuffer cmd, Vector4 scaleOffset, Texture texture, bool blitMips = true, TextureIdentifier overrideIdentifier = default) { Debug.Assert(texture.dimension == TextureDimension.Cube); @@ -445,9 +609,9 @@ public virtual void BlitCubeTexture2D(CommandBuffer cmd, Vector4 scaleOffset, Te // By default blit cube into a single octahedral 2D texture quad Blit2DTexture(cmd, scaleOffset, texture, new Vector4(1.0f, 1.0f, 0.0f, 0.0f), blitMips, blitType); - var instanceID = overrideInstanceID != -1 ? overrideInstanceID : GetTextureID(texture); - MarkGPUTextureValid(instanceID, blitMips); - m_TextureHashes[instanceID] = CoreUtils.GetTextureHash(texture); + var identifier = overrideIdentifier != default ? overrideIdentifier : GetTextureIdentifier(texture); + MarkGPUTextureValid(identifier, blitMips); + m_TextureHashes[identifier] = CoreUtils.GetTextureHash(texture); } } @@ -461,17 +625,36 @@ public virtual void BlitCubeTexture2D(CommandBuffer cmd, Vector4 scaleOffset, Te /// Request height in pixels. /// Override texture instance ID. /// True if the texture was successfully allocated and copied; false otherwise. - public virtual bool AllocateTexture(CommandBuffer cmd, ref Vector4 scaleOffset, Texture texture, int width, int height, int overrideInstanceID = -1) + [Obsolete("AllocateTexture(CommandBuffer, ref Vector4, Texture, int, int, int) is obsolete, " + + "use AllocateTexture(CommandBuffer, ref Vector4, Texture, int, int, TextureIdentifier) instead.", true)] + public virtual bool AllocateTexture(CommandBuffer cmd, ref Vector4 scaleOffset, Texture texture, int width, int height, int overrideInstanceID) { var instanceID = overrideInstanceID != -1 ? overrideInstanceID : GetTextureID(texture); + TextureIdentifier identifier = new TextureIdentifier((ulong)instanceID); + return AllocateTexture(cmd, ref scaleOffset, texture, width, height, identifier); + } + + /// + /// Allocate space from the atlas for a texture and copy texture contents into the atlas. + /// + /// Target command buffer for graphics commands. + /// Destination scale (.xy) and offset (.zw) + /// Source Texture + /// Request width in pixels. + /// Request height in pixels. + /// Override texture identifier. + /// True if the texture was successfully allocated and copied; false otherwise. + public virtual bool AllocateTexture(CommandBuffer cmd, ref Vector4 scaleOffset, Texture texture, int width, int height, TextureIdentifier overrideIdentifier = default) + { + var instanceID = overrideIdentifier != default ? overrideIdentifier : GetTextureIdentifier(texture); bool allocated = AllocateTextureWithoutBlit(instanceID, width, height, ref scaleOffset); if (allocated) { if (Is2D(texture)) - BlitTexture(cmd, scaleOffset, texture, fullScaleOffset); + BlitTexture(cmd, scaleOffset, texture, fullScaleOffset, true, default(TextureIdentifier)); else - BlitCubeTexture2D(cmd, scaleOffset, texture, true); + BlitCubeTexture2D(cmd, scaleOffset, texture, true, default(TextureIdentifier)); // texture is up to date MarkGPUTextureValid(instanceID, true); @@ -490,9 +673,7 @@ public virtual bool AllocateTexture(CommandBuffer cmd, ref Vector4 scaleOffset, /// Allocated scale (.xy) and offset (.zw). /// True on success, false otherwise. public bool AllocateTextureWithoutBlit(Texture texture, int width, int height, ref Vector4 scaleOffset) -#pragma warning disable 618 // todo @emilie.thaulow replace with GetIdentifier() - => AllocateTextureWithoutBlit(texture.GetEntityId(), width, height, ref scaleOffset); -#pragma warning restore 618 + => AllocateTextureWithoutBlit(GetTextureIdentifier(texture), width, height, ref scaleOffset); /// /// Allocate space from the atlas for a texture. @@ -502,16 +683,31 @@ public bool AllocateTextureWithoutBlit(Texture texture, int width, int height, r /// Request height in pixels. /// Allocated scale (.xy) and offset (.zw). /// True on success, false otherwise. + [Obsolete("AllocateTextureWithoutBlit(int, int, int, ref Vector4) is obsolete, use AllocateTextureWithoutBlit(TextureIdentifier, int, int, ref Vector4) instead.", true)] public virtual bool AllocateTextureWithoutBlit(int instanceId, int width, int height, ref Vector4 scaleOffset) + { + TextureIdentifier identifier = new TextureIdentifier((ulong)instanceId); + return AllocateTextureWithoutBlit(identifier, width, height, ref scaleOffset); + } + + /// + /// Allocate space from the atlas for a texture. + /// + /// Source texture identifier. + /// Request width in pixels. + /// Request height in pixels. + /// Allocated scale (.xy) and offset (.zw). + /// True on success, false otherwise. + public virtual bool AllocateTextureWithoutBlit(TextureIdentifier identifier, int width, int height, ref Vector4 scaleOffset) { scaleOffset = Vector4.zero; if (m_AtlasAllocator.Allocate(ref scaleOffset, width, height)) { scaleOffset.Scale(new Vector4(1.0f / m_Width, 1.0f / m_Height, 1.0f / m_Width, 1.0f / m_Height)); - m_AllocationCache[instanceId] = (scaleOffset, new Vector2Int(width, height)); - MarkGPUTextureInvalid(instanceId); // the texture data haven't been uploaded - m_TextureHashes[instanceId] = -1; + m_AllocationCache[identifier] = (scaleOffset, new Vector2Int(width, height)); + MarkGPUTextureInvalid(identifier); // the texture data haven't been uploaded + m_TextureHashes[identifier] = -1; return true; } else @@ -537,24 +733,46 @@ private protected int GetTextureHash(Texture textureA, Texture textureB) /// /// Source texture. /// Texture instance ID. + [Obsolete("int GetTextureID(Texture texture) is obsolete, use GetTextureIdentifier(Texture texture) instead.", true)] public int GetTextureID(Texture texture) { -#pragma warning disable 618 // todo @emilie.thaulow replace with GetIdentifier() return texture.GetEntityId(); -#pragma warning restore 618 } + /// + /// Get sub-texture ID for the atlas. + /// + /// Source texture. + /// The TextureIdentifier, which stores the EntityId of the texture. + public TextureIdentifier GetTextureIdentifier(Texture texture) + { + return new TextureIdentifier(texture.GetEntityId().GetRawData()); + } + + /// /// Get sub-texture ID for the atlas. /// /// Source texture A. /// Source texture B. /// Combined texture instance ID. + [Obsolete("GetTextureID(Texture textureA, Texture textureB) is obsolete , use GetTextureIdentifier(Texture textureA, Texture textureB) instead.", true)] public int GetTextureID(Texture textureA, Texture textureB) { return GetTextureID(textureA) + 23 * GetTextureID(textureB); } + /// + /// Get sub-texture ID for the atlas. + /// + /// Source texture A. + /// Source texture B. + /// Combined texture instance ID. + public TextureIdentifier GetTextureIdentifier(Texture textureA, Texture textureB) + { + return new TextureIdentifier(GetTextureIdentifier(textureA).value + 23 * GetTextureIdentifier(textureB).value); + } + /// /// Check if the atlas contains the textures. /// @@ -563,7 +781,7 @@ public int GetTextureID(Texture textureA, Texture textureB) /// Source texture B. /// True if the texture is in the atlas, false otherwise. public bool IsCached(out Vector4 scaleOffset, Texture textureA, Texture textureB) - => IsCached(out scaleOffset, GetTextureID(textureA, textureB)); + => IsCached(out scaleOffset, GetTextureIdentifier(textureA, textureB)); /// /// Check if the atlas contains the textures. @@ -572,7 +790,7 @@ public bool IsCached(out Vector4 scaleOffset, Texture textureA, Texture textureB /// Source texture /// True if the texture is in the atlas, false otherwise. public bool IsCached(out Vector4 scaleOffset, Texture texture) - => IsCached(out scaleOffset, GetTextureID(texture)); + => IsCached(out scaleOffset, GetTextureIdentifier(texture)); /// /// Check if the atlas contains the texture. @@ -580,9 +798,24 @@ public bool IsCached(out Vector4 scaleOffset, Texture texture) /// Texture scale (.xy) and offset (.zw). /// Source texture instance ID. /// True if the texture is in the atlas, false otherwise + [Obsolete("IsCached(out Vector4, int) is obsolete, use IsCached(out Vector4, TextureIdentifier) instead.", true)] public bool IsCached(out Vector4 scaleOffset, int id) { - bool cached = m_AllocationCache.TryGetValue(id, out var value); + TextureIdentifier identifier = new TextureIdentifier((ulong)id); + bool cached = m_AllocationCache.TryGetValue(identifier, out var value); + scaleOffset = value.scaleOffset; + return cached; + } + + /// + /// Check if the atlas contains the texture. + /// + /// Texture scale (.xy) and offset (.zw). + /// Source texture identifier. + /// True if the texture is in the atlas, false otherwise. + public bool IsCached(out Vector4 scaleOffset, TextureIdentifier identifier) + { + bool cached = m_AllocationCache.TryGetValue(identifier, out var value); scaleOffset = value.scaleOffset; return cached; } @@ -592,9 +825,22 @@ public bool IsCached(out Vector4 scaleOffset, int id) /// /// Source texture instance ID. /// Texture size. + [Obsolete("GetCachedTextureSize(int) is obsolete, use GetCachedTextureSize(TextureIdentifier) instead.", true)] internal Vector2Int GetCachedTextureSize(int id) { - m_AllocationCache.TryGetValue(id, out var value); + TextureIdentifier identifier = new TextureIdentifier((ulong)id); + m_AllocationCache.TryGetValue(identifier, out var value); + return value.size; + } + + /// + /// Get cached texture size. + /// + /// Source texture identifier. + /// Texture size. + internal Vector2Int GetCachedTextureSize(TextureIdentifier identifier) + { + m_AllocationCache.TryGetValue(identifier, out var value); return value.size; } @@ -607,7 +853,7 @@ internal Vector2Int GetCachedTextureSize(int id) public virtual bool NeedsUpdate(Texture texture, bool needMips = false) { RenderTexture rt = texture as RenderTexture; - int key = GetTextureID(texture); + var key = GetTextureIdentifier(texture); int textureHash = CoreUtils.GetTextureHash(texture); // Update the render texture if needed @@ -649,20 +895,34 @@ public virtual bool NeedsUpdate(Texture texture, bool needMips = false) /// The update count. /// Texture uses mips. /// True if slot needs update, false otherwise. - public virtual bool NeedsUpdate(int id, int updateCount, bool needMips = false) + [Obsolete("NeedsUpdate(int, int, bool) is obsolete, use NeedsUpdate(TextureIdentifier, int, bool) instead.", true)] + public virtual bool NeedsUpdate(int id, int updateCount, bool needMips) + { + TextureIdentifier identifier = new TextureIdentifier((ulong)id); + return NeedsUpdate(identifier, updateCount, needMips); + } + + /// + /// Check if a slot needs to be updated in the atlas. + /// + /// The textureIdentifier. + /// The update count. + /// Texture uses mips. + /// True if slot needs update, false otherwise. + public virtual bool NeedsUpdate(TextureIdentifier identifier, int updateCount, bool needMips = false) { int atlasUpdateCount; - if (m_IsGPUTextureUpToDate.TryGetValue(id, out atlasUpdateCount)) + if (m_IsGPUTextureUpToDate.TryGetValue(identifier, out atlasUpdateCount)) { if (updateCount != atlasUpdateCount) { - m_IsGPUTextureUpToDate[id] = updateCount; + m_IsGPUTextureUpToDate[identifier] = updateCount; return true; } } else { - m_IsGPUTextureUpToDate[id] = updateCount; + m_IsGPUTextureUpToDate[identifier] = updateCount; } return false; @@ -679,7 +939,7 @@ public virtual bool NeedsUpdate(Texture textureA, Texture textureB, bool needMip { RenderTexture rtA = textureA as RenderTexture; RenderTexture rtB = textureB as RenderTexture; - int key = GetTextureID(textureA, textureB); + var key = GetTextureIdentifier(textureA, textureB); int textureHash = GetTextureHash(textureA, textureB); // Update the render texture if needed @@ -712,7 +972,7 @@ public virtual bool NeedsUpdate(Texture textureA, Texture textureB, bool needMip // In case the texture settings/import settings have changed, we need to update it else if (m_TextureHashes.TryGetValue(key, out int hash) && hash != textureHash) { - m_TextureHashes[key] = key; + m_TextureHashes[key] = textureHash; return true; } // For regular textures, values == 0 means that their GPU data needs to be updated (either because @@ -736,7 +996,7 @@ public virtual bool AddTexture(CommandBuffer cmd, ref Vector4 scaleOffset, Textu if (IsCached(out scaleOffset, texture)) return true; - return AllocateTexture(cmd, ref scaleOffset, texture, texture.width, texture.height); + return AllocateTexture(cmd, ref scaleOffset, texture, texture.width, texture.height, default(TextureIdentifier)); } /// @@ -758,16 +1018,16 @@ public virtual bool UpdateTexture(CommandBuffer cmd, Texture oldTexture, Texture if (updateIfNeeded && NeedsUpdate(newTexture)) { if (Is2D(newTexture)) - BlitTexture(cmd, scaleOffset, newTexture, sourceScaleOffset, blitMips); + BlitTexture(cmd, scaleOffset, newTexture, sourceScaleOffset, blitMips, default(TextureIdentifier)); else - BlitCubeTexture2D(cmd, scaleOffset, newTexture, blitMips); - MarkGPUTextureValid(GetTextureID(newTexture), blitMips); // texture is up to date + BlitCubeTexture2D(cmd, scaleOffset, newTexture, blitMips, default(TextureIdentifier)); + MarkGPUTextureValid(GetTextureIdentifier(newTexture), blitMips); // texture is up to date } return true; } else // else we try to allocate the updated texture { - return AllocateTexture(cmd, ref scaleOffset, newTexture, newTexture.width, newTexture.height); + return AllocateTexture(cmd, ref scaleOffset, newTexture, newTexture.width, newTexture.height, default(TextureIdentifier)); } } @@ -783,7 +1043,7 @@ public virtual bool UpdateTexture(CommandBuffer cmd, Texture oldTexture, Texture public virtual bool UpdateTexture(CommandBuffer cmd, Texture texture, ref Vector4 scaleOffset, bool updateIfNeeded = true, bool blitMips = true) => UpdateTexture(cmd, texture, texture, ref scaleOffset, fullScaleOffset, updateIfNeeded, blitMips); - internal bool EnsureTextureSlot(out bool isUploadNeeded, ref Vector4 scaleBias, int key, int width, int height) + internal bool EnsureTextureSlot(out bool isUploadNeeded, ref Vector4 scaleBias, TextureIdentifier key, int width, int height) { isUploadNeeded = false; if (m_AllocationCache.TryGetValue(key, out var value)) diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderGraphTests.cs b/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderGraphTests.cs index e16e2ba01f4..de4cf06fdd7 100644 --- a/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderGraphTests.cs +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderGraphTests.cs @@ -2266,7 +2266,7 @@ public void ResourcePool_TryGet() // Retrieve it from the pool and make sure this is the right one RTHandle resOut; texturePool.TryGetResource(0, out resOut); - Assert.IsTrue(resIn.GetInstanceID() == resOut.GetInstanceID()); + Assert.IsTrue(resIn.GetUniqueID() == resOut.GetUniqueID()); texturePool.Cleanup(); } diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightCookieManager.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightCookieManager.cs index 5861fc4b341..68d4ee33790 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightCookieManager.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightCookieManager.cs @@ -247,13 +247,13 @@ public Vector4 Fetch2DCookie(CommandBuffer cmd, Texture cookie, Texture ies) if (width < k_MinCookieSize || height < k_MinCookieSize) return Vector4.zero; - if (!m_CookieAtlas.IsCached(out var scaleBias, m_CookieAtlas.GetTextureID(cookie, ies)) && !m_NoMoreSpace) + if (!m_CookieAtlas.IsCached(out var scaleBias, m_CookieAtlas.GetTextureIdentifier(cookie, ies)) && !m_NoMoreSpace) Debug.LogError($"Unity cannot fetch the 2D Light cookie texture: {cookie} because it is not on the cookie atlas. To resolve this, open your HDRP Asset and increase the resolution of the cookie atlas."); if (m_CookieAtlas.NeedsUpdate(cookie, ies, false)) { - m_CookieAtlas.BlitTexture(cmd, scaleBias, ies, new Vector4(1, 1, 0, 0), blitMips: false, overrideInstanceID: m_CookieAtlas.GetTextureID(cookie, ies)); - m_CookieAtlas.BlitTextureMultiply(cmd, scaleBias, cookie, new Vector4(1, 1, 0, 0), blitMips: false, overrideInstanceID: m_CookieAtlas.GetTextureID(cookie, ies)); + m_CookieAtlas.BlitTexture(cmd, scaleBias, ies, new Vector4(1, 1, 0, 0), blitMips: false, overrideIdentifier: m_CookieAtlas.GetTextureIdentifier(cookie, ies)); + m_CookieAtlas.BlitTextureMultiply(cmd, scaleBias, cookie, new Vector4(1, 1, 0, 0), blitMips: false, overrideIdentifier: m_CookieAtlas.GetTextureIdentifier(cookie, ies)); } return scaleBias; @@ -264,7 +264,7 @@ public Vector4 Fetch2DCookie(CommandBuffer cmd, Texture cookie) if (cookie.width < k_MinCookieSize || cookie.height < k_MinCookieSize) return Vector4.zero; - if (!m_CookieAtlas.IsCached(out var scaleBias, m_CookieAtlas.GetTextureID(cookie)) && !m_NoMoreSpace) + if (!m_CookieAtlas.IsCached(out var scaleBias, m_CookieAtlas.GetTextureIdentifier(cookie)) && !m_NoMoreSpace) Debug.LogError($"Unity cannot fetch the 2D Light cookie texture: {cookie} because it is not on the cookie atlas. To resolve this, open your HDRP Asset and increase the resolution of the cookie atlas."); if (m_CookieAtlas.NeedsUpdate(cookie, false)) @@ -281,14 +281,14 @@ public Vector4 FetchAreaCookie(CommandBuffer cmd, Texture cookie) if (!m_CookieAtlas.IsCached(out var scaleBias, cookie) && !m_NoMoreSpace) Debug.LogError($"Area Light cookie texture {cookie} can't be fetched without having reserved. You can try to increase the cookie atlas resolution in the HDRP settings."); - int currentID = m_CookieAtlas.GetTextureID(cookie); + var currentID = m_CookieAtlas.GetTextureIdentifier(cookie); //RTHandle existingTexture; if (m_CookieAtlas.NeedsUpdate(cookie, true)) { // Generate the mips Texture filteredAreaLight = FilterAreaLightTexture(cmd, cookie, cookie.width, cookie.height); Vector4 sourceScaleOffset = new Vector4((cookie.width - 0.5f) / (float)atlasTexture.rt.width, (cookie.height - 0.5f) / (float)atlasTexture.rt.height, 0, 0); - m_CookieAtlas.BlitTexture(cmd, scaleBias, filteredAreaLight, sourceScaleOffset, blitMips: true, overrideInstanceID: currentID); + m_CookieAtlas.BlitTexture(cmd, scaleBias, filteredAreaLight, sourceScaleOffset, blitMips: true, overrideIdentifier: currentID); } return scaleBias; @@ -312,9 +312,9 @@ public Vector4 FetchAreaCookie(CommandBuffer cmd, Texture cookie, Texture ies) Vector4 sourceScaleOffset = new Vector4(projectionSize / (float)atlasTexture.rt.width, projectionSize / (float)atlasTexture.rt.height, 0, 0); Texture filteredProjected = FilterAreaLightTexture(cmd, cookie, projectionSize, projectionSize); - m_CookieAtlas.BlitOctahedralTexture(cmd, scaleBias, filteredProjected, sourceScaleOffset, blitMips: true, overrideInstanceID: m_CookieAtlas.GetTextureID(cookie, ies)); + m_CookieAtlas.BlitOctahedralTexture(cmd, scaleBias, filteredProjected, sourceScaleOffset, blitMips: true, textureIdentifier: m_CookieAtlas.GetTextureIdentifier(cookie, ies)); filteredProjected = FilterAreaLightTexture(cmd, ies, projectionSize, projectionSize); - m_CookieAtlas.BlitOctahedralTextureMultiply(cmd, scaleBias, filteredProjected, sourceScaleOffset, blitMips: true, overrideInstanceID: m_CookieAtlas.GetTextureID(cookie, ies)); + m_CookieAtlas.BlitOctahedralTextureMultiply(cmd, scaleBias, filteredProjected, sourceScaleOffset, blitMips: true, overrideIdentifier: m_CookieAtlas.GetTextureIdentifier(cookie, ies)); } return scaleBias; @@ -396,7 +396,7 @@ public Vector4 FetchCubeCookie(CommandBuffer cmd, Texture cookie) Vector4 sourceScaleOffset = new Vector4(projectionSize / (float)atlasTexture.rt.width, projectionSize / (float)atlasTexture.rt.height, 0, 0); Texture filteredProjected = FilterAreaLightTexture(cmd, cookie, projectionSize, projectionSize); - m_CookieAtlas.BlitOctahedralTexture(cmd, scaleBias, filteredProjected, sourceScaleOffset, blitMips: true, overrideInstanceID: m_CookieAtlas.GetTextureID(cookie)); + m_CookieAtlas.BlitOctahedralTexture(cmd, scaleBias, filteredProjected, sourceScaleOffset, blitMips: true, textureIdentifier: m_CookieAtlas.GetTextureIdentifier(cookie)); } return scaleBias; @@ -421,9 +421,9 @@ public Vector4 FetchCubeCookie(CommandBuffer cmd, Texture cookie, Texture ies) Vector4 sourceScaleOffset = new Vector4(projectionSize / (float)atlasTexture.rt.width, projectionSize / (float)atlasTexture.rt.height, 0, 0); Texture filteredProjected = FilterAreaLightTexture(cmd, cookie, projectionSize, projectionSize); - m_CookieAtlas.BlitOctahedralTexture(cmd, scaleBias, filteredProjected, sourceScaleOffset, blitMips: true, overrideInstanceID: m_CookieAtlas.GetTextureID(cookie, ies)); + m_CookieAtlas.BlitOctahedralTexture(cmd, scaleBias, filteredProjected, sourceScaleOffset, blitMips: true, textureIdentifier: m_CookieAtlas.GetTextureIdentifier(cookie, ies)); filteredProjected = FilterAreaLightTexture(cmd, ies, projectionSize, projectionSize); - m_CookieAtlas.BlitOctahedralTextureMultiply(cmd, scaleBias, filteredProjected, sourceScaleOffset, blitMips: true, overrideInstanceID: m_CookieAtlas.GetTextureID(cookie, ies)); + m_CookieAtlas.BlitOctahedralTextureMultiply(cmd, scaleBias, filteredProjected, sourceScaleOffset, blitMips: true, overrideIdentifier: m_CookieAtlas.GetTextureIdentifier(cookie, ies)); } return scaleBias; diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalSystem.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalSystem.cs index e1f595739c2..4ee2c610e39 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalSystem.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalSystem.cs @@ -1426,9 +1426,7 @@ public void AddTexture(CommandBuffer cmd, TextureScaleBias textureScaleBias) { if (!Atlas.IsCached(out textureScaleBias.m_ScaleBias, textureScaleBias.texture)) { -#pragma warning disable 618 // Todo(@daniel.andersen): Potentially use GetRawData or sometin' - if (!Atlas.AllocateTextureWithoutBlit(textureScaleBias.texture.GetEntityId(), textureScaleBias.width, textureScaleBias.height, ref textureScaleBias.m_ScaleBias)) -#pragma warning restore 618 + if (!Atlas.AllocateTextureWithoutBlit(textureScaleBias.texture, textureScaleBias.width, textureScaleBias.height, ref textureScaleBias.m_ScaleBias)) { m_AllocationSuccess = false; } diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/HDRenderPipeline.WaterSystem.Decals.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/HDRenderPipeline.WaterSystem.Decals.cs index b5ffa242eaf..020ecac3123 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/HDRenderPipeline.WaterSystem.Decals.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/HDRenderPipeline.WaterSystem.Decals.cs @@ -1,5 +1,7 @@ using Unity.Collections; +using Unity.Collections.LowLevel.Unsafe; using Unity.Mathematics; +using UnityEngine.Assertions; using UnityEngine.Experimental.Rendering; namespace UnityEngine.Rendering.HighDefinition @@ -140,12 +142,15 @@ struct VisibleDecalData public readonly int resX => decal.resolution.x; public readonly int resY => decal.resolution.y; - public int MaterialId(WaterDecal.PassType passType) + public readonly unsafe Texture2DAtlas.TextureIdentifier GetFakeTextureIdentifier(WaterDecal.PassType passType) { - int hash = 17; - hash = hash * 23 + (int)passType; - hash = hash * 23 + materialId.GetHashCode(); - return hash; + ulong hash = 17; + hash = hash * 23 + (ulong)passType; + hash = hash * 23 + (ulong)materialId.GetHashCode(); + Texture2DAtlas.TextureIdentifier identifier = Texture2DAtlas.TextureIdentifier.None; + Assert.IsTrue(sizeof(Texture2DAtlas.TextureIdentifier) == sizeof(ulong)); + UnsafeUtility.MemCpy(&identifier, &hash, sizeof(Texture2DAtlas.TextureIdentifier)); + return identifier; } } @@ -251,7 +256,7 @@ bool CullWaterDecals() if (decal.updateMode == CustomRenderTextureUpdateMode.Realtime) decal.updateCount++; - bool ReserveAtlasSpace(WaterDecal.PassType passType, in VisibleDecalData cpuData) => m_DecalAtlas.ReserveSpace(cpuData.MaterialId(passType), cpuData.resX, cpuData.resY); + bool ReserveAtlasSpace(WaterDecal.PassType passType, in VisibleDecalData cpuData) => m_DecalAtlas.ReserveSpace(cpuData.GetFakeTextureIdentifier(passType), cpuData.resX, cpuData.resY); if (affectDeformation && !ReserveAtlasSpace(WaterDecal.PassType.Deformation, in cpuData)) needRelayout = true; @@ -292,7 +297,7 @@ void ProcessWaterDecals(CommandBuffer cmd) // Render decals in atlas if needed void FetchCoords(in VisibleDecalData cpuData, WaterDecal.PassType passType, string passName, ref Vector4 scaleBias) { - int id = cpuData.MaterialId(passType); + var id = cpuData.GetFakeTextureIdentifier(passType); if (!m_DecalAtlas.IsCached(out scaleBias, id)) { // Used in WaterDecal.shader to discard decal @@ -427,7 +432,7 @@ void UpdateWaterDecals(CommandBuffer cmd, WaterSurface currentWater) int numTiles = HDUtils.DivRoundUp((int)currentWater.deformationRes, 8); cmd.SetKeyword(horizontalDeformationKeyword, HDRenderPipeline.currentAsset.currentPlatformRenderPipelineSettings.supportWaterHorizontalDeformation); - + // First we need to clear the edge pixel and blur the deformation a bit cmd.SetComputeTextureParam(m_WaterDeformationCS, m_FilterDeformationKernel, HDShaderIDs._WaterDeformationBuffer, currentWater.deformationSGBuffer); cmd.SetComputeTextureParam(m_WaterDeformationCS, m_FilterDeformationKernel, HDShaderIDs._WaterDeformationBufferRW, currentWater.deformationBuffer); diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/RTHandleUtils.cs b/Packages/com.unity.render-pipelines.universal/Runtime/RTHandleUtils.cs index ba1ba87dd9b..7c7d394e81b 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/RTHandleUtils.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/RTHandleUtils.cs @@ -15,8 +15,8 @@ internal class RTHandleResourcePool { // Dictionary tracks resources by hash and stores resources with same hash in a List (list instead of a stack because we need to be able to remove stale allocations, potentially in the middle of the stack). // The list needs to be sorted otherwise you could get inconsistent resource usage from one frame to another. - protected Dictionary> m_ResourcePool = new Dictionary>(); - protected List m_RemoveList = new List(32); // Used to remove stale resources as there is no RemoveAll on SortedLists + protected Dictionary> m_ResourcePool = new Dictionary>(); + protected List m_RemoveList = new List(32); // Used to remove stale resources as there is no RemoveAll on SortedLists protected static int s_CurrentStaleResourceCount = 0; // Keep stale resources alive for 3 frames @@ -56,11 +56,11 @@ internal bool AddResourceToPool(in TextureDesc texDesc, RTHandle resource, int c if (!m_ResourcePool.TryGetValue(hashCode, out var list)) { // Init list with max capacity to avoid runtime GC.Alloc when calling list.Add(resize list) - list = new SortedList(s_StaleResourceMaxCapacity); + list = new SortedList(s_StaleResourceMaxCapacity); m_ResourcePool.Add(hashCode, list); } - list.Add(resource.GetInstanceID(), (resource, currentFrameIndex)); + list.Add(resource.GetUniqueID(), (resource, currentFrameIndex)); s_CurrentStaleResourceCount++; return true; @@ -71,7 +71,7 @@ internal bool AddResourceToPool(in TextureDesc texDesc, RTHandle resource, int c internal bool TryGetResource(in TextureDesc texDesc, out RTHandle resource, bool usepool = true) { int hashCode = GetHashCodeWithNameHash(texDesc); - if (usepool && m_ResourcePool.TryGetValue(hashCode, out SortedList list) && list.Count > 0) + if (usepool && m_ResourcePool.TryGetValue(hashCode, out SortedList list) && list.Count > 0) { resource = list.Values[list.Count - 1].resource; list.RemoveAt(list.Count - 1); // O(1) since it's the last element. diff --git a/Tests/SRPTests/Projects/SRP_SmokeTest/Assets/Tests/Editor/RenderGraphViewer/RenderGraphViewerDebugDataSerializationTests.cs b/Tests/SRPTests/Projects/SRP_SmokeTest/Assets/Tests/Editor/RenderGraphViewer/RenderGraphViewerDebugDataSerializationTests.cs index 052b62ebacf..7f72e03af78 100644 --- a/Tests/SRPTests/Projects/SRP_SmokeTest/Assets/Tests/Editor/RenderGraphViewer/RenderGraphViewerDebugDataSerializationTests.cs +++ b/Tests/SRPTests/Projects/SRP_SmokeTest/Assets/Tests/Editor/RenderGraphViewer/RenderGraphViewerDebugDataSerializationTests.cs @@ -11,6 +11,18 @@ namespace UnityEditor.Rendering.Tests { class RenderGraphViewerDebugDataSerializationTests { + static EntityId CreateTestEntityId(int intValue) + { + EntityId testEntityId; + unsafe + { + UnityEngine.Debug.Assert(sizeof(int) == sizeof(EntityId)); + testEntityId = *(EntityId*)&intValue; + } + + return testEntityId; + } + static RenderGraph.DebugData CreateTestDebugData() { RenderGraph.DebugData debugData = new("TestExecution"); @@ -154,9 +166,7 @@ public void DebugMessageHandler_DebugDataMessage_IsSerializedCorrectly() { version = DebugMessageHandler.k_Version, graphName = "TestGraph", -#pragma warning disable 618 // todo @emilie.thaulow replace with unique id - executionId = 123, -#pragma warning restore 618 + executionId = CreateTestEntityId(123), debugData = CreateTestDebugData() }; @@ -194,9 +204,7 @@ public void DebugMessageHandler_DebugDataMessage_IsCompatibleWithSerializedVersi Assert.True(deserializedPayload.isCompatible); Assert.AreEqual(DebugMessageHandler.k_Version, deserializedPayload.version); -#pragma warning disable 618 // todo @emilie.thaulow replace with unique id - Assert.AreEqual(123, (int)deserializedDebugDataPayload.executionId); -#pragma warning restore 618 + Assert.AreEqual(CreateTestEntityId(123), deserializedDebugDataPayload.executionId); Assert.AreEqual("TestGraph", deserializedDebugDataPayload.graphName); Assert.NotNull(deserializedDebugDataPayload.debugData); } @@ -208,9 +216,7 @@ public static void DoSomething() { version = DebugMessageHandler.k_Version, graphName = "TestGraph", -#pragma warning disable 618 // todo @emilie.thaulow replace with unique id - executionId = 123, -#pragma warning restore 618 + executionId = CreateTestEntityId(123), debugData = CreateTestDebugData() }; diff --git a/Tests/SRPTests/Projects/SRP_SmokeTest/Assets/Tests/Editor/RenderGraphViewer/SerializedDebugDataMessage.data b/Tests/SRPTests/Projects/SRP_SmokeTest/Assets/Tests/Editor/RenderGraphViewer/SerializedDebugDataMessage.data index cc2b79048f576039fd12af155bd7c517e899d9c9..9a9abfdd9fadc39004434514ebf5a4f1d70ded64 100644 GIT binary patch delta 42 ucmZ3?Gl@r%k%@tUfionvxWv6Eu^^)w$OD0&+!ICZCT3_b8f=_6i4_3Ny9$#4 delta 58 zcmbQlvzSMek&%IcfionvxWv6Eu^^)w$m`>oC}}60S?m`S;GCaZkeQQOq-0f6RGK<5 MREyDYW5Xm?0L63>Jpcdz diff --git a/Tests/SRPTests/Projects/SRP_SmokeTest/Assets/Tests/Editor/SRPSmoke.Editor.Tests.asmdef b/Tests/SRPTests/Projects/SRP_SmokeTest/Assets/Tests/Editor/SRPSmoke.Editor.Tests.asmdef index f3b625b7088..42259afecf4 100644 --- a/Tests/SRPTests/Projects/SRP_SmokeTest/Assets/Tests/Editor/SRPSmoke.Editor.Tests.asmdef +++ b/Tests/SRPTests/Projects/SRP_SmokeTest/Assets/Tests/Editor/SRPSmoke.Editor.Tests.asmdef @@ -20,7 +20,7 @@ "Editor" ], "excludePlatforms": [], - "allowUnsafeCode": false, + "allowUnsafeCode": true, "overrideReferences": true, "precompiledReferences": [ "nunit.framework.dll" From 116bd72842dadd8c68289b1d84b9ee4ddcdb4054 Mon Sep 17 00:00:00 2001 From: Yvain Raeymaekers Date: Wed, 7 Jan 2026 15:06:41 +0000 Subject: [PATCH 02/43] Removed unstable test that is now obsolete because the 2GB graphics buffer has been extented for a few GfxDevice implementations --- .../UnifiedRayTracing/AccelStructTests.cs | 46 ------------------- 1 file changed, 46 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/UnifiedRayTracing/AccelStructTests.cs b/Packages/com.unity.render-pipelines.core/Tests/Editor/UnifiedRayTracing/AccelStructTests.cs index 23a6676b844..5e39cf5d89b 100644 --- a/Packages/com.unity.render-pipelines.core/Tests/Editor/UnifiedRayTracing/AccelStructTests.cs +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/UnifiedRayTracing/AccelStructTests.cs @@ -171,52 +171,6 @@ public void Build_TwoInstancesOfASingleTriangleMesh_ShouldGenerateCorrectResult( AssertAABBsAreEqual(new float3(3.0f, 1.0f, 0.0f), new float3(4.0f, 2.0f, 0.0f), instanceBvhRoot.aabb1_min, instanceBvhRoot.aabb1_max, tolerance); } } - - [Test] - [Ignore("Test too unstable on Yamato (UUM-95662, UUM-67382)")] - public void AddInstance_MeshWith2GBWorthOfVertices_Throws() - { - var resources = new RayTracingResources(); - resources.Load(); - - using var accelStruct = new ComputeRayTracingAccelStruct( - new AccelerationStructureOptions() { buildFlags = BuildFlags.PreferFastBuild }, - resources, - new ReferenceCounter()); - - Random.InitState(1987); - - int vertexCount = 200000001; // 200 millions - int indexCount = vertexCount; // must be a multiple of 3 - - Mesh mesh = new Mesh(); - mesh.indexFormat = IndexFormat.UInt32; - - Vector3[] vertices = new Vector3[vertexCount]; - for (int i = 0; i < vertexCount; ++i) - { - vertices[i] = new Vector3(0.0f, 0.0f, Random.Range(0.0f, 1.0f)); - } - mesh.SetVertices(vertices); - - Vector3[] normals = new Vector3[vertexCount]; - mesh.SetNormals(normals); - - Vector2[] uv = new Vector2[vertexCount]; - mesh.SetUVs(0, uv); - - int[] tris = new int[indexCount]; - for (int i = 0; i < indexCount; ++i) - tris[i] = i; - - mesh.SetIndices(tris, MeshTopology.Triangles, 0); - - MeshInstanceDesc instanceDesc = new MeshInstanceDesc(mesh); - Assert.Throws(() => accelStruct.AddInstance(instanceDesc)); - - Assert.That(accelStruct.m_BlasAllocator.allocatedSize, Is.Zero); - Assert.That(accelStruct.m_BlasLeavesAllocator.allocatedSize, Is.Zero); - } } From 9e3012e1a640b0e4d3e667bc3b668c028ba73b98 Mon Sep 17 00:00:00 2001 From: Venkatesh Subramania Pillai Date: Wed, 7 Jan 2026 15:53:52 +0000 Subject: [PATCH 03/43] [2d] Add support for RSUV to 2D Renderers. --- .../Assets/Scenes/111_SetShaderUserValue.meta | 8 + .../Scenes/111_SetShaderUserValue.unity | 2198 +++++++++++++++++ .../Scenes/111_SetShaderUserValue.unity.meta | 7 + .../SetShaderUserValue.shadergraph | 997 ++++++++ .../SetShaderUserValue.shadergraph.meta | 18 + .../SetUserShaderValue.cs | 25 + .../SetUserShaderValue.cs.meta | 2 + .../SetUserShaderValueForceDynamicBatching.cs | 34 + ...serShaderValueForceDynamicBatching.cs.meta | 2 + 9 files changed, 3291 insertions(+) create mode 100644 Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue.meta create mode 100644 Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue.unity create mode 100644 Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue.unity.meta create mode 100644 Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetShaderUserValue.shadergraph create mode 100644 Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetShaderUserValue.shadergraph.meta create mode 100644 Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValue.cs create mode 100644 Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValue.cs.meta create mode 100644 Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValueForceDynamicBatching.cs create mode 100644 Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValueForceDynamicBatching.cs.meta diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue.meta b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue.meta new file mode 100644 index 00000000000..f742f96324b --- /dev/null +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 170bf1661e2bc8e44a4e7d74693d62e2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue.unity b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue.unity new file mode 100644 index 00000000000..22173760005 --- /dev/null +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue.unity @@ -0,0 +1,2198 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 10 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 13 + m_BakeOnSceneLoad: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &254073877 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 254073881} + - component: {fileID: 254073880} + - component: {fileID: 254073879} + m_Layer: 0 + m_Name: Closed Sprite Shape + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &254073879 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 254073877} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90539df1cd5704abcb25fec9f3f5f84b, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Spline: + m_IsOpenEnded: 0 + m_ControlPoints: + - position: {x: -1, y: -1, z: 0} + leftTangent: {x: 0.53597367, y: -0.00048214197, z: -0} + rightTangent: {x: -0.53597367, y: 0.00048214197, z: 0} + mode: 1 + height: 1 + spriteIndex: 0 + corner: 1 + m_CornerMode: 1 + - position: {x: -2, y: 1, z: 0} + leftTangent: {x: -1.0023332, y: 0.0010559559, z: 0} + rightTangent: {x: 1.0023332, y: -0.0010559559, z: -0} + mode: 1 + height: 1 + spriteIndex: 0 + corner: 1 + m_CornerMode: 1 + - position: {x: 2, y: 1, z: 0} + leftTangent: {x: -1.0005913, y: -0.0016920567, z: -0} + rightTangent: {x: 1.0005913, y: 0.0016920567, z: 0} + mode: 1 + height: 1 + spriteIndex: 0 + corner: 1 + m_CornerMode: 1 + - position: {x: 1, y: -1, z: 0} + leftTangent: {x: 0.54391515, y: 0.0004222989, z: 0} + rightTangent: {x: -0.54391515, y: -0.0004222989, z: -0} + mode: 1 + height: 1 + spriteIndex: 0 + corner: 1 + m_CornerMode: 1 + m_SpriteShape: {fileID: 11400000, guid: f24cddf7c09a6442abbce710a6fd7397, type: 2} + m_FillPixelPerUnit: 256 + m_StretchTiling: 1 + m_SplineDetail: 16 + m_AdaptiveUV: 1 + m_StretchUV: 0 + m_WorldSpaceUV: 0 + m_CornerAngleThreshold: 30 + m_ColliderDetail: 16 + m_ColliderOffset: 0.5 + m_UpdateCollider: 1 + m_EnableTangents: 0 + m_GeometryCached: 0 + m_UTess2D: 1 + m_UpdateShadow: 0 + m_ShadowDetail: 16 + m_ShadowOffset: 0.5 + m_BoundsScale: 2 + m_UpdateGeometry: 1 + m_Creator: {fileID: 0} + m_Modifiers: [] + m_ColliderSegment: [] + m_ShadowSegment: [] +--- !u!1971053207 &254073880 +SpriteShapeRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 254073877} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 0 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: -876546973899608171, guid: 6ff5486b2396cb949b05d7e6b9db00d5, type: 3} + - {fileID: -876546973899608171, guid: 6ff5486b2396cb949b05d7e6b9db00d5, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_ShapeTexture: {fileID: 2800000, guid: b281b91a70a624a0da1c43adc1c30c7b, type: 3} + m_Sprites: + - {fileID: 21300000, guid: 0ae2b74b1edd14bb18dd7b65ae916a54, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + m_LocalAABB: + m_Center: {x: 0.00027251244, y: -0.0002721548, z: 0} + m_Extent: {x: 2.589231, y: 1.250067, z: 0} + m_SpriteSortPoint: 0 +--- !u!4 &254073881 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 254073877} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -4.24, y: 1.19, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &862841582 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 862841584} + - component: {fileID: 862841583} + m_Layer: 0 + m_Name: Grid + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!156049354 &862841583 +Grid: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 862841582} + m_Enabled: 1 + m_CellSize: {x: 1, y: 1, z: 0} + m_CellGap: {x: 0, y: 0, z: 0} + m_CellLayout: 0 + m_CellSwizzle: 0 +--- !u!4 &862841584 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 862841582} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -2.9799998, y: -0.03999996, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2014967540} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &933572715 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 933572719} + - component: {fileID: 933572718} + - component: {fileID: 933572717} + - component: {fileID: 933572716} + - component: {fileID: 933572720} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &933572716 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 933572715} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: 8 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 + m_Version: 2 +--- !u!81 &933572717 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 933572715} + m_Enabled: 1 +--- !u!20 &933572718 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 933572715} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 1} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &933572719 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 933572715} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1.5, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &933572720 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 933572715} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 73231aa468d81ea49bc3d914080de185, type: 3} + m_Name: + m_EditorClassIdentifier: + ImageComparisonSettings: + TargetWidth: 640 + TargetHeight: 360 + TargetMSAASamples: 1 + PerPixelCorrectnessThreshold: 0.001 + PerPixelGammaThreshold: 0.003921569 + PerPixelAlphaThreshold: 0.003921569 + RMSEThreshold: 0 + AverageCorrectnessThreshold: 0.005 + IncorrectPixelsThreshold: 0.0000038146973 + UseHDR: 0 + UseBackBuffer: 0 + ImageResolution: 0 + ActiveImageTests: 1 + ActivePixelTests: -1 + WaitFrames: 0 + XRCompatible: 0 + gpuDrivenCompatible: 1 + CheckMemoryAllocation: 1 + renderBackendCompatibility: 2 + SetBackBufferResolution: 0 +--- !u!1 &962877263 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 962877264} + - component: {fileID: 962877267} + - component: {fileID: 962877266} + - component: {fileID: 962877265} + m_Layer: 0 + m_Name: Tilemap + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &962877264 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 962877263} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -4.83, y: -0.15, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1255792890} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!331 &962877265 +SpriteMask: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 962877263} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 15d0c3709176029428a0da2f8cecf0b5, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: 0} + m_MaskAlphaCutoff: 0.2 + m_FrontSortingLayerID: 0 + m_BackSortingLayerID: 0 + m_FrontSortingLayer: 0 + m_BackSortingLayer: 0 + m_FrontSortingOrder: 0 + m_BackSortingOrder: 0 + m_IsCustomRangeActive: 0 + m_SpriteSortPoint: 0 + m_MaskSource: 1 +--- !u!483693784 &962877266 +TilemapRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 962877263} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: -876546973899608171, guid: 6ff5486b2396cb949b05d7e6b9db00d5, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 2 + m_MaskInteraction: 0 + m_ChunkSize: {x: 32, y: 32, z: 32} + m_ChunkCullingBounds: {x: 0, y: 0, z: 0} + m_MaxChunkCount: 16 + m_MaxFrameAge: 16 + m_SortOrder: 0 + m_Mode: 0 + m_DetectChunkCullingBounds: 0 +--- !u!1839735485 &962877267 +Tilemap: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 962877263} + m_Enabled: 1 + m_Tiles: + - first: {x: 3, y: -4, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + - first: {x: 2, y: -3, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + - first: {x: 3, y: -3, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + - first: {x: 4, y: -3, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + - first: {x: 2, y: -2, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + - first: {x: 4, y: -2, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + m_AnimatedTiles: {} + m_TileAssetArray: + - serializedVersion: 2 + m_RefCount: 6 + m_Data: {fileID: 11400000, guid: 898ab856ab374ef428ab13e10c948a0d, type: 2} + m_TileSpriteArray: + - serializedVersion: 2 + m_RefCount: 6 + m_Data: {fileID: 21300000, guid: 0a451cb9697c39044815bbd2d048826c, type: 3} + m_TileMatrixArray: + - serializedVersion: 2 + m_RefCount: 6 + m_Data: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_TileColorArray: + - serializedVersion: 2 + m_RefCount: 6 + m_Data: {r: 0.94482756, g: 1, b: 0, a: 1} + m_TileObjectToInstantiateArray: [] + m_AnimationFrameRate: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Origin: {x: 0, y: -4, z: 0} + m_Size: {x: 5, y: 4, z: 1} + m_TileAnchor: {x: 0.5, y: 0.5, z: 0} + m_TileOrientation: 0 + m_TileOrientationMatrix: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 +--- !u!1 &1131597700 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1131597704} + - component: {fileID: 1131597701} + - component: {fileID: 1131597703} + m_Layer: 0 + m_Name: Closed Sprite Shape DB + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1971053207 &1131597701 +SpriteShapeRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1131597700} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 0 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: -876546973899608171, guid: 6ff5486b2396cb949b05d7e6b9db00d5, type: 3} + - {fileID: -876546973899608171, guid: 6ff5486b2396cb949b05d7e6b9db00d5, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_ShapeTexture: {fileID: 2800000, guid: b281b91a70a624a0da1c43adc1c30c7b, type: 3} + m_Sprites: + - {fileID: 21300000, guid: 0ae2b74b1edd14bb18dd7b65ae916a54, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + m_LocalAABB: + m_Center: {x: 0.00027251244, y: -0.0002721548, z: 0} + m_Extent: {x: 2.589231, y: 1.250067, z: 0} + m_SpriteSortPoint: 0 +--- !u!114 &1131597703 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1131597700} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90539df1cd5704abcb25fec9f3f5f84b, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Spline: + m_IsOpenEnded: 0 + m_ControlPoints: + - position: {x: -1, y: -1, z: 0} + leftTangent: {x: 0.53597367, y: -0.00048214197, z: -0} + rightTangent: {x: -0.53597367, y: 0.00048214197, z: 0} + mode: 1 + height: 1 + spriteIndex: 0 + corner: 1 + m_CornerMode: 1 + - position: {x: -2, y: 1, z: 0} + leftTangent: {x: -1.0023332, y: 0.0010559559, z: 0} + rightTangent: {x: 1.0023332, y: -0.0010559559, z: -0} + mode: 1 + height: 1 + spriteIndex: 0 + corner: 1 + m_CornerMode: 1 + - position: {x: 2, y: 1, z: 0} + leftTangent: {x: -1.0005913, y: -0.0016920567, z: -0} + rightTangent: {x: 1.0005913, y: 0.0016920567, z: 0} + mode: 1 + height: 1 + spriteIndex: 0 + corner: 1 + m_CornerMode: 1 + - position: {x: 1, y: -1, z: 0} + leftTangent: {x: 0.54391515, y: 0.0004222989, z: 0} + rightTangent: {x: -0.54391515, y: -0.0004222989, z: -0} + mode: 1 + height: 1 + spriteIndex: 0 + corner: 1 + m_CornerMode: 1 + m_SpriteShape: {fileID: 11400000, guid: f24cddf7c09a6442abbce710a6fd7397, type: 2} + m_FillPixelPerUnit: 256 + m_StretchTiling: 1 + m_SplineDetail: 16 + m_AdaptiveUV: 1 + m_StretchUV: 0 + m_WorldSpaceUV: 0 + m_CornerAngleThreshold: 30 + m_ColliderDetail: 16 + m_ColliderOffset: 0.5 + m_UpdateCollider: 1 + m_EnableTangents: 0 + m_GeometryCached: 0 + m_UTess2D: 1 + m_UpdateShadow: 0 + m_ShadowDetail: 16 + m_ShadowOffset: 0.5 + m_BoundsScale: 2 + m_UpdateGeometry: 1 + m_Creator: {fileID: 0} + m_Modifiers: [] + m_ColliderSegment: [] + m_ShadowSegment: [] +--- !u!4 &1131597704 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1131597700} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 7.36, y: 1.19, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1252420223 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1252420227} + - component: {fileID: 1252420226} + - component: {fileID: 1252420225} + m_Layer: 0 + m_Name: Closed Sprite Shape DEF + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1252420225 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1252420223} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90539df1cd5704abcb25fec9f3f5f84b, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Spline: + m_IsOpenEnded: 0 + m_ControlPoints: + - position: {x: -1, y: -1, z: 0} + leftTangent: {x: 0.53597367, y: -0.00048214197, z: -0} + rightTangent: {x: -0.53597367, y: 0.00048214197, z: 0} + mode: 1 + height: 1 + spriteIndex: 0 + corner: 1 + m_CornerMode: 1 + - position: {x: -2, y: 1, z: 0} + leftTangent: {x: -1.0023332, y: 0.0010559559, z: 0} + rightTangent: {x: 1.0023332, y: -0.0010559559, z: -0} + mode: 1 + height: 1 + spriteIndex: 0 + corner: 1 + m_CornerMode: 1 + - position: {x: 2, y: 1, z: 0} + leftTangent: {x: -1.0005913, y: -0.0016920567, z: -0} + rightTangent: {x: 1.0005913, y: 0.0016920567, z: 0} + mode: 1 + height: 1 + spriteIndex: 0 + corner: 1 + m_CornerMode: 1 + - position: {x: 1, y: -1, z: 0} + leftTangent: {x: 0.54391515, y: 0.0004222989, z: 0} + rightTangent: {x: -0.54391515, y: -0.0004222989, z: -0} + mode: 1 + height: 1 + spriteIndex: 0 + corner: 1 + m_CornerMode: 1 + m_SpriteShape: {fileID: 11400000, guid: f24cddf7c09a6442abbce710a6fd7397, type: 2} + m_FillPixelPerUnit: 256 + m_StretchTiling: 1 + m_SplineDetail: 16 + m_AdaptiveUV: 1 + m_StretchUV: 0 + m_WorldSpaceUV: 0 + m_CornerAngleThreshold: 30 + m_ColliderDetail: 16 + m_ColliderOffset: 0.5 + m_UpdateCollider: 1 + m_EnableTangents: 0 + m_GeometryCached: 0 + m_UTess2D: 1 + m_UpdateShadow: 0 + m_ShadowDetail: 16 + m_ShadowOffset: 0.5 + m_BoundsScale: 2 + m_UpdateGeometry: 1 + m_Creator: {fileID: 0} + m_Modifiers: [] + m_ColliderSegment: [] + m_ShadowSegment: [] +--- !u!1971053207 &1252420226 +SpriteShapeRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1252420223} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 0 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: -876546973899608171, guid: 6ff5486b2396cb949b05d7e6b9db00d5, type: 3} + - {fileID: -876546973899608171, guid: 6ff5486b2396cb949b05d7e6b9db00d5, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_ShapeTexture: {fileID: 2800000, guid: b281b91a70a624a0da1c43adc1c30c7b, type: 3} + m_Sprites: + - {fileID: 21300000, guid: 0ae2b74b1edd14bb18dd7b65ae916a54, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + - {fileID: 21300000, guid: 608e61deb05c54660bebf5a4dd2ee02d, type: 3} + m_LocalAABB: + m_Center: {x: 0.00027251244, y: -0.0002721548, z: 0} + m_Extent: {x: 2.589231, y: 1.250067, z: 0} + m_SpriteSortPoint: 0 +--- !u!4 &1252420227 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1252420223} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1.6399996, y: 1.19, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1255792888 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1255792890} + - component: {fileID: 1255792889} + m_Layer: 0 + m_Name: Grid DEF + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!156049354 &1255792889 +Grid: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1255792888} + m_Enabled: 1 + m_CellSize: {x: 1, y: 1, z: 0} + m_CellGap: {x: 0, y: 0, z: 0} + m_CellLayout: 0 + m_CellSwizzle: 0 +--- !u!4 &1255792890 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1255792888} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 2.8999999, y: -0.03999996, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 962877264} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1515200454 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1515200456} + - component: {fileID: 1515200455} + m_Layer: 0 + m_Name: Circle DEF + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!212 &1515200455 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1515200454} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: -876546973899608171, guid: 6ff5486b2396cb949b05d7e6b9db00d5, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 1 + m_MaskInteraction: 0 + m_Sprite: {fileID: -2413806693520163455, guid: a86470a33a6bf42c4b3595704624658b, + type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!4 &1515200456 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1515200454} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.49, y: 3.58, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1580853454 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1580853457} + - component: {fileID: 1580853456} + m_Layer: 0 + m_Name: Circle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!212 &1580853456 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1580853454} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: -876546973899608171, guid: 6ff5486b2396cb949b05d7e6b9db00d5, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 1 + m_MaskInteraction: 0 + m_Sprite: {fileID: -2413806693520163455, guid: a86470a33a6bf42c4b3595704624658b, + type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!4 &1580853457 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1580853454} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -4.39, y: 3.58, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1664041513 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1664041515} + - component: {fileID: 1664041514} + m_Layer: 0 + m_Name: ForceDB + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1664041514 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1664041513} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b6c4668cf86ca174d8a9730358316727, type: 3} + m_Name: + m_EditorClassIdentifier: '::' + m_SpriteShapeRenderer: {fileID: 1131597701} + m_TilemapRenderer: {fileID: 1737432514} + m_SpriteRenderer: {fileID: 1666430258} +--- !u!4 &1664041515 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1664041513} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 5.47877, y: -0.23268, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1666430257 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1666430259} + - component: {fileID: 1666430258} + m_Layer: 0 + m_Name: Circle DB + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!212 &1666430258 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1666430257} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: -876546973899608171, guid: 6ff5486b2396cb949b05d7e6b9db00d5, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 1 + m_MaskInteraction: 0 + m_Sprite: {fileID: -2413806693520163455, guid: a86470a33a6bf42c4b3595704624658b, + type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!4 &1666430259 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1666430257} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 7.2099996, y: 3.56, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1737432513 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1737432517} + - component: {fileID: 1737432516} + - component: {fileID: 1737432514} + - component: {fileID: 1737432515} + m_Layer: 0 + m_Name: Tilemap + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!483693784 &1737432514 +TilemapRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1737432513} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: -876546973899608171, guid: 6ff5486b2396cb949b05d7e6b9db00d5, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 2 + m_MaskInteraction: 0 + m_ChunkSize: {x: 32, y: 32, z: 32} + m_ChunkCullingBounds: {x: 0, y: 0, z: 0} + m_MaxChunkCount: 16 + m_MaxFrameAge: 16 + m_SortOrder: 0 + m_Mode: 0 + m_DetectChunkCullingBounds: 0 +--- !u!331 &1737432515 +SpriteMask: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1737432513} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 15d0c3709176029428a0da2f8cecf0b5, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: 0} + m_MaskAlphaCutoff: 0.2 + m_FrontSortingLayerID: 0 + m_BackSortingLayerID: 0 + m_FrontSortingLayer: 0 + m_BackSortingLayer: 0 + m_FrontSortingOrder: 0 + m_BackSortingOrder: 0 + m_IsCustomRangeActive: 0 + m_SpriteSortPoint: 0 + m_MaskSource: 1 +--- !u!1839735485 &1737432516 +Tilemap: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1737432513} + m_Enabled: 1 + m_Tiles: + - first: {x: 3, y: -4, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + - first: {x: 2, y: -3, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + - first: {x: 3, y: -3, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + - first: {x: 4, y: -3, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + - first: {x: 2, y: -2, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + - first: {x: 4, y: -2, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + m_AnimatedTiles: {} + m_TileAssetArray: + - serializedVersion: 2 + m_RefCount: 6 + m_Data: {fileID: 11400000, guid: 898ab856ab374ef428ab13e10c948a0d, type: 2} + m_TileSpriteArray: + - serializedVersion: 2 + m_RefCount: 6 + m_Data: {fileID: 21300000, guid: 0a451cb9697c39044815bbd2d048826c, type: 3} + m_TileMatrixArray: + - serializedVersion: 2 + m_RefCount: 6 + m_Data: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_TileColorArray: + - serializedVersion: 2 + m_RefCount: 6 + m_Data: {r: 0.94482756, g: 1, b: 0, a: 1} + m_TileObjectToInstantiateArray: [] + m_AnimationFrameRate: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Origin: {x: 0, y: -4, z: 0} + m_Size: {x: 5, y: 4, z: 1} + m_TileAnchor: {x: 0.5, y: 0.5, z: 0} + m_TileOrientation: 0 + m_TileOrientationMatrix: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 +--- !u!4 &1737432517 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1737432513} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -4.83, y: -0.15, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2054458973} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1790555614 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1790555616} + - component: {fileID: 1790555615} + - component: {fileID: 1790555617} + m_Layer: 0 + m_Name: GlobalLight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1790555615 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1790555614} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 073797afb82c5a1438f328866b10b3f0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ComponentVersion: 2 + m_LightType: 4 + m_BlendStyleIndex: 0 + m_FalloffIntensity: 0.5 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_LightVolumeIntensity: 1 + m_LightVolumeEnabled: 1 + m_ApplyToSortingLayers: 00000000 + m_LightCookieSprite: {fileID: 0} + m_DeprecatedPointLightCookieSprite: {fileID: 0} + m_LightOrder: 0 + m_AlphaBlendOnOverlap: 0 + m_OverlapOperation: 0 + m_NormalMapDistance: 3 + m_NormalMapQuality: 2 + m_UseNormalMap: 0 + m_ShadowsEnabled: 1 + m_ShadowIntensity: 0.75 + m_ShadowSoftness: 0 + m_ShadowSoftnessFalloffIntensity: 0.5 + m_ShadowVolumeIntensityEnabled: 1 + m_ShadowVolumeIntensity: 0.75 + m_LocalBounds: + m_Center: {x: 0, y: -0.00000011920929, z: 0} + m_Extent: {x: 0.9985302, y: 0.99853027, z: 0} + m_PointLightInnerAngle: 360 + m_PointLightOuterAngle: 360 + m_PointLightInnerRadius: 0 + m_PointLightOuterRadius: 1 + m_ShapeLightParametricSides: 5 + m_ShapeLightParametricAngleOffset: 0 + m_ShapeLightParametricRadius: 1 + m_ShapeLightFalloffSize: 0.5 + m_ShapeLightFalloffOffset: {x: 0, y: 0} + m_ShapePath: + - {x: -0.5, y: -0.5, z: 0} + - {x: 0.5, y: -0.5, z: 0} + - {x: 0.5, y: 0.5, z: 0} + - {x: -0.5, y: 0.5, z: 0} +--- !u!4 &1790555616 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1790555614} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1.6803958, y: -2.008776, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1790555617 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1790555614} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 47e1f4f12be88024ca7bcb580c6396df, type: 3} + m_Name: + m_EditorClassIdentifier: Universal2DGraphicsTests::SetUserShaderValue + m_SpriteShapeRenderer: {fileID: 254073880} + m_TilemapRenderer: {fileID: 2014967542} + m_SpriteRenderer: {fileID: 1580853456} +--- !u!1 &2014967539 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2014967540} + - component: {fileID: 2014967543} + - component: {fileID: 2014967542} + - component: {fileID: 2014967541} + m_Layer: 0 + m_Name: Tilemap + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2014967540 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2014967539} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -4.83, y: -0.15, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 862841584} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!331 &2014967541 +SpriteMask: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2014967539} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 15d0c3709176029428a0da2f8cecf0b5, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: 0} + m_MaskAlphaCutoff: 0.2 + m_FrontSortingLayerID: 0 + m_BackSortingLayerID: 0 + m_FrontSortingLayer: 0 + m_BackSortingLayer: 0 + m_FrontSortingOrder: 0 + m_BackSortingOrder: 0 + m_IsCustomRangeActive: 0 + m_SpriteSortPoint: 0 + m_MaskSource: 1 +--- !u!483693784 &2014967542 +TilemapRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2014967539} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: -876546973899608171, guid: 6ff5486b2396cb949b05d7e6b9db00d5, type: 3} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 2 + m_MaskInteraction: 0 + m_ChunkSize: {x: 32, y: 32, z: 32} + m_ChunkCullingBounds: {x: 0, y: 0, z: 0} + m_MaxChunkCount: 16 + m_MaxFrameAge: 16 + m_SortOrder: 0 + m_Mode: 2 + m_DetectChunkCullingBounds: 0 +--- !u!1839735485 &2014967543 +Tilemap: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2014967539} + m_Enabled: 1 + m_Tiles: + - first: {x: 3, y: -4, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + - first: {x: 2, y: -3, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + - first: {x: 3, y: -3, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + - first: {x: 4, y: -3, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + - first: {x: 2, y: -2, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + - first: {x: 4, y: -2, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 0 + m_TileSpriteIndex: 0 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 1073741825 + m_AnimatedTiles: {} + m_TileAssetArray: + - serializedVersion: 2 + m_RefCount: 6 + m_Data: {fileID: 11400000, guid: 898ab856ab374ef428ab13e10c948a0d, type: 2} + m_TileSpriteArray: + - serializedVersion: 2 + m_RefCount: 6 + m_Data: {fileID: 21300000, guid: 0a451cb9697c39044815bbd2d048826c, type: 3} + m_TileMatrixArray: + - serializedVersion: 2 + m_RefCount: 6 + m_Data: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_TileColorArray: + - serializedVersion: 2 + m_RefCount: 6 + m_Data: {r: 0.94482756, g: 1, b: 0, a: 1} + m_TileObjectToInstantiateArray: [] + m_AnimationFrameRate: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Origin: {x: 0, y: -4, z: 0} + m_Size: {x: 5, y: 4, z: 1} + m_TileAnchor: {x: 0.5, y: 0.5, z: 0} + m_TileOrientation: 0 + m_TileOrientationMatrix: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 +--- !u!1 &2054458972 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2054458973} + - component: {fileID: 2054458974} + m_Layer: 0 + m_Name: Grid DB + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2054458973 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2054458972} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 8.619999, y: -0.060000062, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1737432517} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!156049354 &2054458974 +Grid: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2054458972} + m_Enabled: 1 + m_CellSize: {x: 1, y: 1, z: 0} + m_CellGap: {x: 0, y: 0, z: 0} + m_CellLayout: 0 + m_CellSwizzle: 0 +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 933572719} + - {fileID: 1790555616} + - {fileID: 254073881} + - {fileID: 1580853457} + - {fileID: 862841584} + - {fileID: 1666430259} + - {fileID: 2054458973} + - {fileID: 1131597704} + - {fileID: 1515200456} + - {fileID: 1255792890} + - {fileID: 1252420227} + - {fileID: 1664041515} diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue.unity.meta b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue.unity.meta new file mode 100644 index 00000000000..d81bb8a5647 --- /dev/null +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5a3c03c76782d5746878add7b8536c9e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetShaderUserValue.shadergraph b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetShaderUserValue.shadergraph new file mode 100644 index 00000000000..1d6f4e64e6b --- /dev/null +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetShaderUserValue.shadergraph @@ -0,0 +1,997 @@ +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "91c84dca6cab49efb04846e14b860604", + "m_Properties": [ + { + "m_Id": "245592a62b6444248d7eeb2a3fc9859f" + } + ], + "m_Keywords": [], + "m_Dropdowns": [], + "m_CategoryData": [ + { + "m_Id": "f42062022a7141cda3972a80c392cd8c" + } + ], + "m_Nodes": [ + { + "m_Id": "f5d3ef8c4d9947fa9d2671fc83ea4eb7" + }, + { + "m_Id": "7b06ce45a6094103a72076cbd35c3be4" + }, + { + "m_Id": "978542536fa442dc8045a524bc9f64a0" + }, + { + "m_Id": "5ec8ab75517241db998b6723e63b6cec" + }, + { + "m_Id": "36ccd77e4e5046ad9a0e9c443332c126" + }, + { + "m_Id": "e06630b84c26444c8f6cd53d493958b3" + }, + { + "m_Id": "41eef920cd75431bb620b56871a8c2a0" + }, + { + "m_Id": "c8e51427e5d14ba78d11b4eb052a9096" + }, + { + "m_Id": "b2c70b35c506461b950b1ac2e62f4a24" + } + ], + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "41eef920cd75431bb620b56871a8c2a0" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c8e51427e5d14ba78d11b4eb052a9096" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "b2c70b35c506461b950b1ac2e62f4a24" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5ec8ab75517241db998b6723e63b6cec" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c8e51427e5d14ba78d11b4eb052a9096" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "b2c70b35c506461b950b1ac2e62f4a24" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e06630b84c26444c8f6cd53d493958b3" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "b2c70b35c506461b950b1ac2e62f4a24" + }, + "m_SlotId": 1 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 16.999984741210939, + "y": -341.0000305175781 + }, + "m_Blocks": [ + { + "m_Id": "f5d3ef8c4d9947fa9d2671fc83ea4eb7" + }, + { + "m_Id": "7b06ce45a6094103a72076cbd35c3be4" + }, + { + "m_Id": "978542536fa442dc8045a524bc9f64a0" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": -106.0, + "y": 123.0 + }, + "m_Blocks": [ + { + "m_Id": "5ec8ab75517241db998b6723e63b6cec" + }, + { + "m_Id": "36ccd77e4e5046ad9a0e9c443332c126" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "preventRotation": false + }, + "m_Path": "Shader Graphs", + "m_GraphPrecision": 1, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_SubDatas": [], + "m_ActiveTargets": [ + { + "m_Id": "cd0155d3c6a44aae862c196b548856ad" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "06e5345055ab4301958fb41a6a5a1258", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [], + "m_LiteralMode": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "082b6e347cde425f9d9c01faeb3a0b00", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "22008e932188486399109e4c1f41e471", + "m_Id": 1, + "m_DisplayName": "Blend", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Blend", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_LiteralMode": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "245592a62b6444248d7eeb2a3fc9859f", + "m_Guid": { + "m_GuidSerialized": "2e9f9de8-13b4-4e74-b31d-d81172bd436e" + }, + "promotedFromAssetID": "", + "promotedFromCategoryName": "", + "promotedOrdering": -1, + "m_Name": "_MainTex", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "_MainTex", + "m_DefaultReferenceName": "_MainTex", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_PerRendererData": false, + "m_customAttributes": [], + "m_Value": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "useTexelSize": true, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "323aa5e995014098a8b9171833e6df49", + "m_Id": 3, + "m_DisplayName": "Opacity", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Opacity", + "m_StageCapability": 3, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [], + "m_LiteralMode": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "33085f83897046e99b773046af2b89b3", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [], + "m_LiteralMode": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "36ccd77e4e5046ad9a0e9c443332c126", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Alpha", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "737944dbf5cf451fb666350e9e9df3ad" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Alpha" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "41eef920cd75431bb620b56871a8c2a0", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -881.0, + "y": -488.0, + "width": 131.99993896484376, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "c6060a4748494cf78ab295343fc8abb4" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "245592a62b6444248d7eeb2a3fc9859f" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "4a90f8adcec14cf6a28d1de8ba230ef9", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "5d737005e7dc4c71adb19b8e6bb526ad", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [], + "m_LiteralMode": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "5ec8ab75517241db998b6723e63b6cec", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BaseColor", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "4a90f8adcec14cf6a28d1de8ba230ef9" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "6b2f1fa8485a4f9abf2ef2e23b42efc4", + "m_Id": 0, + "m_DisplayName": "Base", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Base", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_LiteralMode": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "7140bc07ef8b46cdbcbd768cef0425f3", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "737944dbf5cf451fb666350e9e9df3ad", + "m_Id": 0, + "m_DisplayName": "Alpha", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [], + "m_LiteralMode": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "7b06ce45a6094103a72076cbd35c3be4", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Normal", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "a29edf616e1b4cbfa11ebb1348cd0276" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "8ea04a2a43774cb999695e688202a940", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_LiteralMode": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "978542536fa442dc8045a524bc9f64a0", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Tangent", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "f478b413d957470baa47d86b2b27c22e" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "a29edf616e1b4cbfa11ebb1348cd0276", + "m_Id": 0, + "m_DisplayName": "Normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "ae052170ee4d4214adac08cea43bb3e1", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [], + "m_LiteralMode": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlendNode", + "m_ObjectId": "b2c70b35c506461b950b1ac2e62f4a24", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Blend", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -330.0, + "y": -311.0, + "width": 208.0, + "height": 360.0 + } + }, + "m_Slots": [ + { + "m_Id": "6b2f1fa8485a4f9abf2ef2e23b42efc4" + }, + { + "m_Id": "22008e932188486399109e4c1f41e471" + }, + { + "m_Id": "323aa5e995014098a8b9171833e6df49" + }, + { + "m_Id": "8ea04a2a43774cb999695e688202a940" + } + ], + "synonyms": [ + "burn", + "darken", + "difference", + "dodge", + "divide", + "exclusion", + "hard light", + "hard mix", + "linear burn", + "linear dodge", + "linear light", + "multiply", + "negate", + "overlay", + "pin light", + "screen", + "soft light", + "subtract", + "vivid light", + "overwrite" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_BlendMode": 13 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "c6060a4748494cf78ab295343fc8abb4", + "m_Id": 0, + "m_DisplayName": "_MainTex", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "c8e51427e5d14ba78d11b4eb052a9096", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -679.0, + "y": -527.0, + "width": 208.0, + "height": 433.0 + } + }, + "m_Slots": [ + { + "m_Id": "7140bc07ef8b46cdbcbd768cef0425f3" + }, + { + "m_Id": "5d737005e7dc4c71adb19b8e6bb526ad" + }, + { + "m_Id": "06e5345055ab4301958fb41a6a5a1258" + }, + { + "m_Id": "33085f83897046e99b773046af2b89b3" + }, + { + "m_Id": "ae052170ee4d4214adac08cea43bb3e1" + }, + { + "m_Id": "d80e128bf0b04f1c9d5d389b75134a85" + }, + { + "m_Id": "082b6e347cde425f9d9c01faeb3a0b00" + }, + { + "m_Id": "e80b35ce238945f18c7febd87e7c2e0d" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "cd0155d3c6a44aae862c196b548856ad", + "m_Datas": [], + "m_ActiveSubTarget": { + "m_Id": "f1989abf8775406eb0d1fbe18e979976" + }, + "m_AllowMaterialOverride": false, + "m_SurfaceType": 0, + "m_ZTestMode": 4, + "m_ZWriteControl": 0, + "m_AlphaMode": 0, + "m_RenderFace": 2, + "m_AlphaClip": false, + "m_CastShadows": true, + "m_ReceiveShadows": true, + "m_DisableTint": false, + "m_Sort3DAs2DCompatible": false, + "m_AdditionalMotionVectorMode": 0, + "m_AlembicMotionVectors": false, + "m_SupportsLODCrossFade": false, + "m_CustomEditorGUI": "", + "m_SupportVFX": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "cd4b719ea80d4919b76389667b0c4520", + "m_Id": 0, + "m_DisplayName": "RSUVAsColor", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RSUVAsColor", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "d0dfb9b00234479b92cc0cfb3374e8b7", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "d80e128bf0b04f1c9d5d389b75134a85", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", + "m_ObjectId": "e06630b84c26444c8f6cd53d493958b3", + "m_Group": { + "m_Id": "" + }, + "m_Name": "GetUserShaderValueAsTint (Custom Function)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -827.0000610351563, + "y": -16.000011444091798, + "width": 356.00006103515627, + "height": 277.9999694824219 + } + }, + "m_Slots": [ + { + "m_Id": "cd4b719ea80d4919b76389667b0c4520" + } + ], + "synonyms": [ + "code", + "HLSL" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SourceType": 1, + "m_FunctionName": "GetUserShaderValueAsTint", + "m_FunctionSource": "", + "m_FunctionSourceUsePragmas": true, + "m_FunctionBody": "#ifdef SHADERGRAPH_PREVIEW\nRSUVAsColor = float4(1.0f, 1.0f, 1.0f, 1.0f);\n#else\n// Just a simple sample.\nif (0 != unity_RendererUserValue)\nRSUVAsColor = float4(asfloat(unity_RendererUserValue), 0.1f, 0.1f, 1.0f); \nelse\nRSUVAsColor = float4(1.0f, 1.0f, 1.0f, 1.0f);\n#endif" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "e80b35ce238945f18c7febd87e7c2e0d", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalSpriteUnlitSubTarget", + "m_ObjectId": "f1989abf8775406eb0d1fbe18e979976" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "f42062022a7141cda3972a80c392cd8c", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "245592a62b6444248d7eeb2a3fc9859f" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "f478b413d957470baa47d86b2b27c22e", + "m_Id": 0, + "m_DisplayName": "Tangent", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Tangent", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "f5d3ef8c4d9947fa9d2671fc83ea4eb7", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "d0dfb9b00234479b92cc0cfb3374e8b7" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetShaderUserValue.shadergraph.meta b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetShaderUserValue.shadergraph.meta new file mode 100644 index 00000000000..55bf7af3c0b --- /dev/null +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetShaderUserValue.shadergraph.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: 6ff5486b2396cb949b05d7e6b9db00d5 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} + useAsTemplate: 0 + exposeTemplateAsShader: 0 + template: + name: + category: + description: + icon: {instanceID: 0} + thumbnail: {instanceID: 0} diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValue.cs b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValue.cs new file mode 100644 index 00000000000..8aff8068ec1 --- /dev/null +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValue.cs @@ -0,0 +1,25 @@ +using System; +using UnityEngine; +using UnityEngine.Tilemaps; +using UnityEngine.U2D; + +public class SetUserShaderValue : MonoBehaviour +{ + public SpriteShapeRenderer m_SpriteShapeRenderer; + public TilemapRenderer m_TilemapRenderer; + public SpriteRenderer m_SpriteRenderer; + + // Start is called once before the first execution of Update after the MonoBehaviour is created + void Start() + { + m_SpriteShapeRenderer.SetShaderUserValue(1045220557); // ~0.2 + m_TilemapRenderer.SetShaderUserValue(1053609165); // ~0.4 + m_SpriteRenderer.SetShaderUserValue(1053609165); // ~0.8 + } + + // Update is called once per frame + void Update() + { + + } +} diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValue.cs.meta b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValue.cs.meta new file mode 100644 index 00000000000..bf8b0c08a08 --- /dev/null +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValue.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 47e1f4f12be88024ca7bcb580c6396df \ No newline at end of file diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValueForceDynamicBatching.cs b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValueForceDynamicBatching.cs new file mode 100644 index 00000000000..f948d15bf9b --- /dev/null +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValueForceDynamicBatching.cs @@ -0,0 +1,34 @@ +using UnityEngine; +using UnityEngine.Tilemaps; +using UnityEngine.U2D; + +public class SetUserShaderValueForceDynamicBatching : MonoBehaviour +{ + public SpriteShapeRenderer m_SpriteShapeRenderer; + public TilemapRenderer m_TilemapRenderer; + public SpriteRenderer m_SpriteRenderer; + + // Start is called once before the first execution of Update after the MonoBehaviour is created + void Start() + { + m_SpriteShapeRenderer.SetShaderUserValue(1045220557); // ~0.2 + m_TilemapRenderer.SetShaderUserValue(1053609165); // ~0.4 + m_SpriteRenderer.SetShaderUserValue(1053609165); // ~0.8 + + var mbp = new MaterialPropertyBlock(); + m_SpriteShapeRenderer.GetPropertyBlock(mbp); + mbp.SetColor("ForceDynamicBatching", Color.red); + m_SpriteShapeRenderer.SetPropertyBlock(mbp); + + mbp = new MaterialPropertyBlock(); + m_SpriteRenderer.GetPropertyBlock(mbp); + mbp.SetColor("ForceDynamicBatching", Color.red); + m_SpriteRenderer.SetPropertyBlock(mbp); + } + + // Update is called once per frame + void Update() + { + + } +} diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValueForceDynamicBatching.cs.meta b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValueForceDynamicBatching.cs.meta new file mode 100644 index 00000000000..5f8af772689 --- /dev/null +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/111_SetShaderUserValue/SetUserShaderValueForceDynamicBatching.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: b6c4668cf86ca174d8a9730358316727 \ No newline at end of file From 1cbe686dbfbb4772d2f762a20ac0ac37cd082ec3 Mon Sep 17 00:00:00 2001 From: Olga Belavina Date: Wed, 7 Jan 2026 22:50:10 +0000 Subject: [PATCH 04/43] UUM-126895/Fix Offscreen Rendering for Camera Capture Bridge (CapturePass) --- .../Runtime/Passes/CapturePass.cs | 10 +- .../Scenes/320_CameraCaptureBridge.unity | 529 ++++++++++++++++-- .../320_OffscreenCaptureTextureQuad.mat | 159 ++++++ .../320_OffscreenCaptureTextureQuad.mat.meta | 8 + .../CameraCaptureBridgeScript.cs | 5 +- .../OffscreenCaptureTex.renderTexture | 39 ++ .../OffscreenCaptureTex.renderTexture.meta | 8 + 7 files changed, 714 insertions(+), 44 deletions(-) create mode 100644 Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/320_OffscreenCaptureTextureQuad.mat create mode 100644 Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/320_OffscreenCaptureTextureQuad.mat.meta create mode 100644 Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/OffscreenCaptureTex.renderTexture create mode 100644 Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/OffscreenCaptureTex.renderTexture.meta diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CapturePass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CapturePass.cs index 1067501a9ef..c4c33516d3e 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CapturePass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CapturePass.cs @@ -35,13 +35,17 @@ public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer using (var builder = renderGraph.AddUnsafePass(passName, out var passData, profilingSampler)) { - // Setup up the pass data with cameraColor, which has the correct orientation and position in a built player - passData.source = resourceData.cameraColor; + // Setup up the pass data with activeColorTexture, which has the correct orientation and position in a built player + // In most cases, it will be resolved to cameraColor as the source since we cannot sample the backbuffer directly. + // However, activeColorTexture allows us to support offscreen rendering scenarios where URP renders + // to a fake backbuffer (an output texture with no final blit). When using a real backbuffer, + // Camera Capture forces an intermediate attachment, ensuring we can still sample activeColorTexture. + passData.source = resourceData.activeColorTexture; passData.captureActions = cameraData.captureActions; // Setup up the builder builder.AllowPassCulling(false); - builder.UseTexture(resourceData.cameraColor); + builder.UseTexture(resourceData.activeColorTexture, AccessFlags.Read); builder.SetRenderFunc(static (UnsafePassData data, UnsafeGraphContext unsafeContext) => { var nativeCommandBuffer = CommandBufferHelpers.GetNativeCommandBuffer(unsafeContext.cmd); diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge.unity b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge.unity index 2af56b8fa03..80903b39996 100644 --- a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge.unity +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge.unity @@ -38,12 +38,12 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 12 + serializedVersion: 13 + m_BakeOnSceneLoad: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -174,14 +174,14 @@ MonoBehaviour: m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} m_RequiresDepthTexture: 0 m_RequiresColorTexture: 0 - m_Version: 2 m_TaaSettings: - quality: 3 - frameInfluence: 0.1 - jitterScale: 1 - mipBias: 0 - varianceClampScale: 0.9 - contrastAdaptiveSharpening: 0 + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 + m_Version: 2 --- !u!20 &21695889 Camera: m_ObjectHideFlags: 0 @@ -191,7 +191,7 @@ Camera: m_GameObject: {fileID: 21695887} m_Enabled: 1 serializedVersion: 2 - m_ClearFlags: 1 + m_ClearFlags: 2 m_BackGroundColor: {r: 1, g: 0.009412639, b: 0, a: 0} m_projectionMatrixMode: 1 m_GateFitMode: 2 @@ -209,10 +209,10 @@ Camera: m_LensShift: {x: 0, y: 0} m_NormalizedViewPortRect: serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 + x: 0.5 + y: 0.5 + width: 0.5 + height: 0.5 near clip plane: 0.3 far clip plane: 1000 field of view: 60 @@ -242,11 +242,11 @@ Transform: m_GameObject: {fileID: 21695887} serializedVersion: 2 m_LocalRotation: {x: -0.0012251688, y: 0.042445634, z: 0.17100441, w: 0.9843548} - m_LocalPosition: {x: 0.09, y: 0.04, z: -1.81} + m_LocalPosition: {x: 12.263081, y: 0.04, z: -9.211599} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} + m_Father: {fileID: 237936511} m_LocalEulerAnglesHint: {x: -0.97, y: 4.77, z: 19.67} --- !u!114 &21695891 MonoBehaviour: @@ -261,6 +261,41 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_RenderTexture: {fileID: 8400000, guid: b5bd57a9bf268e3418c8837c459e0ad1, type: 2} +--- !u!1 &237936510 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 237936511} + m_Layer: 0 + m_Name: Cameras + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &237936511 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 237936510} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -12.17308, y: -0, z: 7.4016} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 971756575} + - {fileID: 1617279382} + - {fileID: 21695890} + - {fileID: 1337234961} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &407063389 GameObject: m_ObjectHideFlags: 0 @@ -299,6 +334,8 @@ MeshRenderer: m_RayTracingAccelStructBuildFlagsOverride: 0 m_RayTracingAccelStructBuildFlags: 1 m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -320,9 +357,11 @@ MeshRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_MaskInteraction: 0 m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &407063391 MeshFilter: @@ -385,6 +424,8 @@ MeshRenderer: m_RayTracingAccelStructBuildFlagsOverride: 0 m_RayTracingAccelStructBuildFlags: 1 m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -406,9 +447,11 @@ MeshRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_MaskInteraction: 0 m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &794075717 MeshFilter: @@ -471,6 +514,8 @@ MeshRenderer: m_RayTracingAccelStructBuildFlagsOverride: 0 m_RayTracingAccelStructBuildFlags: 1 m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -492,9 +537,11 @@ MeshRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_MaskInteraction: 0 m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &952102531 MeshFilter: @@ -563,7 +610,7 @@ MonoBehaviour: AverageCorrectnessThreshold: 0.001 IncorrectPixelsThreshold: 0.0000038146973 UseHDR: 0 - UseBackBuffer: 0 + UseBackBuffer: 1 ImageResolution: 0 ActiveImageTests: 1 ActivePixelTests: 7 @@ -572,7 +619,7 @@ MonoBehaviour: gpuDrivenCompatible: 1 CheckMemoryAllocation: 1 renderBackendCompatibility: 2 - SetBackBufferResolution: 0 + SetBackBufferResolution: 1 --- !u!81 &971756571 AudioListener: m_ObjectHideFlags: 0 @@ -617,9 +664,9 @@ Camera: m_NormalizedViewPortRect: serializedVersion: 2 x: 0 - y: 0 - width: 1 - height: 1 + y: 0.5 + width: 0.5 + height: 0.5 near clip plane: 0.5 far clip plane: 12 field of view: 15 @@ -649,11 +696,11 @@ Transform: m_GameObject: {fileID: 971756569} serializedVersion: 2 m_LocalRotation: {x: 0.05878363, y: 0.9982707, z: -0.00034843694, w: 0.000020517871} - m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalPosition: {x: 12.17308, y: 0, z: -17.4016} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} + m_Father: {fileID: 237936511} m_LocalEulerAnglesHint: {x: 0.04, y: 180, z: 6.74} --- !u!114 &971756576 MonoBehaviour: @@ -691,14 +738,14 @@ MonoBehaviour: m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} m_RequiresDepthTexture: 0 m_RequiresColorTexture: 0 - m_Version: 2 m_TaaSettings: - quality: 3 - frameInfluence: 0.1 - jitterScale: 1 - mipBias: 0 - varianceClampScale: 0.9 - contrastAdaptiveSharpening: 0 + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 + m_Version: 2 --- !u!1 &1161206970 GameObject: m_ObjectHideFlags: 0 @@ -725,14 +772,14 @@ Light: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1161206970} m_Enabled: 1 - serializedVersion: 11 + serializedVersion: 13 m_Type: 1 m_Color: {r: 1, g: 1, b: 1, a: 1} m_Intensity: 0.75 m_Range: 10 m_SpotAngle: 30 m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 + m_CookieSize2D: {x: 10, y: 10} m_Shadows: m_Type: 2 m_Resolution: -1 @@ -777,7 +824,7 @@ Light: m_UseBoundingSphereOverride: 0 m_UseViewFrustumForShadowCasterCull: 1 m_ForceVisible: 0 - m_ShadowRadius: 0 + m_ShapeRadius: 0 m_ShadowAngle: 0 m_LightUnit: 1 m_LuxAtDistance: 1 @@ -809,17 +856,415 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 3 m_UsePipelineSettings: 1 m_AdditionalLightsShadowResolutionTier: 2 - m_LightLayerMask: 1 - m_RenderingLayers: 1 m_CustomShadowLayers: 0 - m_ShadowLayerMask: 1 - m_ShadowRenderingLayers: 1 m_LightCookieSize: {x: 1, y: 1} m_LightCookieOffset: {x: 0, y: 0} m_SoftShadowQuality: 0 + m_RenderingLayersMask: + serializedVersion: 0 + m_Bits: 1 + m_ShadowRenderingLayersMask: + serializedVersion: 0 + m_Bits: 1 + m_Version: 4 + m_LightLayerMask: 1 + m_ShadowLayerMask: 1 + m_RenderingLayers: 1 + m_ShadowRenderingLayers: 1 +--- !u!1 &1337234957 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1337234961} + - component: {fileID: 1337234960} + - component: {fileID: 1337234959} + - component: {fileID: 1337234958} + m_Layer: 0 + m_Name: Offscreen Capture Camera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1337234958 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1337234957} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0a22c9a748e18334d8f68bafd8f166a9, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderTexture: {fileID: 0} +--- !u!114 &1337234959 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1337234957} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 0 + m_RequiresOpaqueTextureOption: 0 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 + m_Version: 2 +--- !u!20 &1337234960 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1337234957} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 1, g: 0.009412639, b: 0, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 8400000, guid: 9917dd92ab99f45138efebf18b3b5def, type: 2} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1337234961 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1337234957} + serializedVersion: 2 + m_LocalRotation: {x: 0.009144101, y: 0.041467085, z: -0.07375809, w: 0.99637175} + m_LocalPosition: {x: 12.263081, y: 0.040000055, z: -10.256599} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 237936511} + m_LocalEulerAnglesHint: {x: 1.395, y: 4.664, z: -8.411} +--- !u!1 &1617279381 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1617279382} + - component: {fileID: 1617279386} + - component: {fileID: 1617279385} + - component: {fileID: 1617279383} + m_Layer: 0 + m_Name: Main Camera 2 + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1617279382 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1617279381} + serializedVersion: 2 + m_LocalRotation: {x: -0.0000020286104, y: -0.9999962, z: -0.0026945297, w: 0.0006075392} + m_LocalPosition: {x: 9.717313, y: -1.0187706, z: -18.64283} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 237936511} + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} +--- !u!114 &1617279383 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1617279381} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 + m_Version: 2 +--- !u!124 &1617279385 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1617279381} + m_Enabled: 1 +--- !u!20 &1617279386 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1617279381} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.2509804, g: 0.2509804, b: 0.2509804, a: 1} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 0.5 + near clip plane: 0.5 + far clip plane: 12 + field of view: 15 + orthographic: 0 + orthographic size: 1.2 + m_Depth: 1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!1 &1624583177 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1624583181} + - component: {fileID: 1624583180} + - component: {fileID: 1624583179} + - component: {fileID: 1624583178} + m_Layer: 0 + m_Name: Quad_1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1624583178 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1624583177} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9853b44d40c2240ccbd967dd849242d6, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &1624583179 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1624583177} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 5 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1624583180 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1624583177} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1624583181 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1624583177} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} + m_LocalPosition: {x: -2.46, y: -1, z: -14.73} + m_LocalScale: {x: 2, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} --- !u!1 &1764573544 GameObject: m_ObjectHideFlags: 0 @@ -859,6 +1304,8 @@ MeshRenderer: m_RayTracingAccelStructBuildFlagsOverride: 0 m_RayTracingAccelStructBuildFlags: 1 m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -880,9 +1327,11 @@ MeshRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_MaskInteraction: 0 m_AdditionalVertexStreams: {fileID: 0} --- !u!64 &1764573546 MeshCollider: @@ -933,10 +1382,10 @@ Transform: SceneRoots: m_ObjectHideFlags: 0 m_Roots: - - {fileID: 971756575} - {fileID: 1161206972} - {fileID: 952102532} - - {fileID: 21695890} - {fileID: 1764573548} + - {fileID: 1624583181} - {fileID: 407063392} - {fileID: 794075718} + - {fileID: 237936511} diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/320_OffscreenCaptureTextureQuad.mat b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/320_OffscreenCaptureTextureQuad.mat new file mode 100644 index 00000000000..ee1958da7ba --- /dev/null +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/320_OffscreenCaptureTextureQuad.mat @@ -0,0 +1,159 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-2837999492683578002 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: 320_OffscreenCaptureTextureQuad + m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _EMISSION + - _SPECULAR_COLOR + m_InvalidKeywords: [] + m_LightmapFlags: 2 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Cube: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 8400000, guid: 9917dd92ab99f45138efebf18b3b5def, type: 2} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AddPrecomputedVelocity: 0 + - _AlphaClip: 0 + - _AlphaToMask: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _BumpScale: 1 + - _Cull: 2 + - _Cutoff: 0.199 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossinessSource: 1 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _ReflectionSource: 0 + - _Shininess: 0.5 + - _Smoothness: 0.5 + - _SmoothnessSource: 0 + - _SmoothnessTextureChannel: 0 + - _SpecSource: 0 + - _SpecularHighlights: 0 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Surface: 0 + - _UVSec: 0 + - _XRMotionVectorsPass: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0, g: 0, b: 0, a: 1} + - _Color: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _ReflectColor: {r: 1, g: 1, b: 1, a: 1} + - _SpecColor: {r: 1, g: 1, b: 1, a: 0.5} + m_BuildTextureStacks: [] + m_AllowLocking: 1 +--- !u!114 &6474889523495581265 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 10 diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/320_OffscreenCaptureTextureQuad.mat.meta b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/320_OffscreenCaptureTextureQuad.mat.meta new file mode 100644 index 00000000000..69dd621ca70 --- /dev/null +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/320_OffscreenCaptureTextureQuad.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9853b44d40c2240ccbd967dd849242d6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/CameraCaptureBridgeScript.cs b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/CameraCaptureBridgeScript.cs index 5092e0e57f7..3d88d67ec24 100644 --- a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/CameraCaptureBridgeScript.cs +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/CameraCaptureBridgeScript.cs @@ -24,6 +24,9 @@ void OnDisable() void Capture(RenderTargetIdentifier rtId, CommandBuffer cmd) { - cmd.Blit(rtId, m_RenderTexture); + if (m_RenderTexture != null) + { + cmd.Blit(rtId, m_RenderTexture); + } } } diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/OffscreenCaptureTex.renderTexture b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/OffscreenCaptureTex.renderTexture new file mode 100644 index 00000000000..b4b757ff40f --- /dev/null +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/OffscreenCaptureTex.renderTexture @@ -0,0 +1,39 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!84 &8400000 +RenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: OffscreenCaptureTex + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_IsAlphaChannelOptional: 0 + serializedVersion: 6 + m_Width: 512 + m_Height: 256 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthStencilFormat: 92 + m_ColorFormat: 8 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 0 + m_UseDynamicScaleExplicit: 0 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_EnableRandomWrite: 0 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 0 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 2 + m_VolumeDepth: 1 + m_ShadowSamplingMode: 2 diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/OffscreenCaptureTex.renderTexture.meta b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/OffscreenCaptureTex.renderTexture.meta new file mode 100644 index 00000000000..caad8eceb87 --- /dev/null +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/320_CameraCaptureBridge/OffscreenCaptureTex.renderTexture.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9917dd92ab99f45138efebf18b3b5def +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 8400000 + userData: + assetBundleName: + assetBundleVariant: From d5ef8d631fb2da4fc7bd29ece21f5d9978f92259 Mon Sep 17 00:00:00 2001 From: Miro Brodlova Date: Wed, 7 Jan 2026 22:50:11 +0000 Subject: [PATCH 05/43] Migrate Mono APIs to CoreCLR-compatible APIs in com.unity.shadergraph --- .../com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs | 7 +++++++ .../Editor/Data/Util/SerializationHelper.cs | 7 +++++++ .../Editor/Drawing/Inspector/MasterPreviewView.cs | 7 +++++++ .../Editor/Drawing/Views/MaterialGraphView.cs | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/Packages/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs b/Packages/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs index 2d5d60b908c..581cc2e7be4 100644 --- a/Packages/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs +++ b/Packages/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs @@ -13,6 +13,9 @@ using System.Reflection; using System.Runtime.Remoting.Metadata.W3cXsd2001; using UnityEditor.ProjectWindowCallback; +#if UNITY_6000_5_OR_NEWER +using UnityEngine.Assemblies; +#endif using UnityEditor.ShaderGraph.Internal; using UnityEngine; using UnityEngine.Rendering; @@ -336,7 +339,11 @@ static void Visit(List outputList, Dictionary(); +#if UNITY_6000_5_OR_NEWER + foreach (var assembly in CurrentAssemblies.GetLoadedAssemblies()) +#else foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) +#endif { foreach (var type in assembly.GetTypesOrNothing()) { diff --git a/Packages/com.unity.shadergraph/Editor/Data/Util/SerializationHelper.cs b/Packages/com.unity.shadergraph/Editor/Data/Util/SerializationHelper.cs index eb621c6cfdf..030342ca5fa 100644 --- a/Packages/com.unity.shadergraph/Editor/Data/Util/SerializationHelper.cs +++ b/Packages/com.unity.shadergraph/Editor/Data/Util/SerializationHelper.cs @@ -4,6 +4,9 @@ using System.Reflection; using UnityEditor.ShaderGraph.Serialization; using UnityEngine; +#if UNITY_6000_5_OR_NEWER +using UnityEngine.Assemblies; +#endif namespace UnityEditor.Graphing { @@ -52,7 +55,11 @@ static Type GetTypeFromSerializedString(TypeSerializationInfo typeInfo) if (!typeInfo.IsValid()) return null; +#if UNITY_6000_5_OR_NEWER + var assemblies = CurrentAssemblies.GetLoadedAssemblies(); +#else var assemblies = AppDomain.CurrentDomain.GetAssemblies(); +#endif foreach (var assembly in assemblies) { var type = assembly.GetType(typeInfo.fullName); diff --git a/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/MasterPreviewView.cs b/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/MasterPreviewView.cs index 6780a27ef64..056a7a9c126 100644 --- a/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/MasterPreviewView.cs +++ b/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/MasterPreviewView.cs @@ -7,6 +7,9 @@ using UnityEditor.Graphing.Util; using UnityEditor.ShaderGraph.Drawing.Interfaces; using Object = UnityEngine.Object; +#if UNITY_6000_5_OR_NEWER +using UnityEngine.Assemblies; +#endif using UnityEditor.UIElements; using UnityEngine.UIElements; @@ -42,7 +45,11 @@ public VisualElement preview } List m_DoNotShowPrimitives = new List(new string[] { PrimitiveType.Plane.ToString() }); +#if UNITY_6000_5_OR_NEWER + static Type s_ObjectSelector = CurrentAssemblies.GetLoadedAssemblies().SelectMany(x => x.GetTypesOrNothing()).FirstOrDefault(t => t.FullName == "UnityEditor.ObjectSelector"); +#else static Type s_ObjectSelector = AppDomain.CurrentDomain.GetAssemblies().SelectMany(x => x.GetTypesOrNothing()).FirstOrDefault(t => t.FullName == "UnityEditor.ObjectSelector"); +#endif public string assetName { diff --git a/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs b/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs index 20ccafd8706..1175f117473 100644 --- a/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs +++ b/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs @@ -13,6 +13,9 @@ using UnityEditor.ShaderGraph.Serialization; using UnityEngine.UIElements; using Edge = UnityEditor.Experimental.GraphView.Edge; +#if UNITY_6000_5_OR_NEWER +using UnityEngine.Assemblies; +#endif using Node = UnityEditor.Experimental.GraphView.Node; using UnityEngine.Pool; @@ -38,7 +41,11 @@ public MaterialGraphView() // Get reference to GraphView assembly Assembly graphViewAssembly = null; +#if UNITY_6000_5_OR_NEWER + foreach (var assembly in CurrentAssemblies.GetLoadedAssemblies()) +#else foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) +#endif { var assemblyName = assembly.GetName().ToString(); if (assemblyName.Contains("GraphView")) From 3772eb11d3accef851b4a40b2023d1843a0f68ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Carr=C3=A8re?= Date: Wed, 7 Jan 2026 22:50:15 +0000 Subject: [PATCH 06/43] docg-8237: Remove extra entry from ToC --- Packages/com.unity.shadergraph/Documentation~/TableOfContents.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Packages/com.unity.shadergraph/Documentation~/TableOfContents.md b/Packages/com.unity.shadergraph/Documentation~/TableOfContents.md index 144b17054f4..893161dacbf 100644 --- a/Packages/com.unity.shadergraph/Documentation~/TableOfContents.md +++ b/Packages/com.unity.shadergraph/Documentation~/TableOfContents.md @@ -278,7 +278,6 @@ * [Terrain](Terrain-Nodes.md) * [Terrain Properties](Terrain-Properties-Node.md) * [Terrain Texture](Terrain-Texture-Node.md) - * Layers * [UI](ui-nodes.md) * [Default Bitmap Text](default-bitmap-text-node.md) * [Default Gradient](default-gradient-node.md) From c17a3ee312ac2ff1d7a0645ecb0711f862c07c04 Mon Sep 17 00:00:00 2001 From: Rasmus Roenn Nielsen Date: Wed, 7 Jan 2026 22:50:16 +0000 Subject: [PATCH 07/43] Remove ReSTIR and RIS estimation methods from Surface Cache --- .../Lighting/SurfaceCache/Estimation.hlsl | 201 ++++++++ .../SurfaceCache/Estimation.hlsl.meta | 2 +- ...imation.urtshader => Estimation.urtshader} | 2 +- ...tshader.meta => Estimation.urtshader.meta} | 0 .../SurfaceCache/RestirCandidateTemporal.hlsl | 193 ------- .../RestirCandidateTemporal.hlsl.meta | 7 - .../RestirCandidateTemporal.urtshader | 8 - .../RestirCandidateTemporal.urtshader.meta | 10 - .../SurfaceCache/RestirEstimation.compute | 48 -- .../RestirEstimation.compute.meta | 7 - .../SurfaceCache/RestirEstimation.hlsl | 57 --- .../SurfaceCache/RestirEstimation.hlsl.meta | 7 - .../SurfaceCache/RestirSpatial.compute | 69 --- .../SurfaceCache/RestirSpatial.compute.meta | 7 - .../Lighting/SurfaceCache/RisEstimation.hlsl | 189 ------- .../SurfaceCache/RisEstimation.hlsl.meta | 7 - .../SurfaceCache/RisEstimation.urtshader.meta | 10 - .../Lighting/SurfaceCache/SurfaceCache.cs | 471 ++---------------- .../SurfaceCacheRenderPipelineResources.cs | 74 +-- .../SurfaceCache/UniformEstimation.hlsl | 203 -------- .../SurfaceCache/UniformEstimation.hlsl.meta | 7 - .../SurfaceCache/UniformEstimation.urtshader | 8 - .../SurfaceCacheGlobalIlluminationEditor.cs | 118 ++--- ...eCacheGlobalIlluminationRendererFeature.cs | 38 +- 24 files changed, 294 insertions(+), 1449 deletions(-) rename Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/{RisEstimation.urtshader => Estimation.urtshader} (88%) rename Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/{UniformEstimation.urtshader.meta => Estimation.urtshader.meta} (100%) delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.hlsl delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.hlsl.meta delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.urtshader delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.urtshader.meta delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.compute delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.compute.meta delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.hlsl delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.hlsl.meta delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirSpatial.compute delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirSpatial.compute.meta delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RisEstimation.hlsl delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RisEstimation.hlsl.meta delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RisEstimation.urtshader.meta delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/UniformEstimation.hlsl delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/UniformEstimation.hlsl.meta delete mode 100644 Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/UniformEstimation.urtshader diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/Estimation.hlsl b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/Estimation.hlsl index f9e4343307d..f744e7ea061 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/Estimation.hlsl +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/Estimation.hlsl @@ -1,6 +1,47 @@ +#define PATCH_UTIL_USE_RW_IRRADIANCE_BUFFER + #include "Common.hlsl" +#include "Packages/com.unity.render-pipelines.core/Runtime/Sampling/QuasiRandom.hlsl" +#include "Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/Common.hlsl" +#include "PathTracing.hlsl" +#include "RingBuffer.hlsl" #include "PatchUtil.hlsl" #include "TemporalFiltering.hlsl" +#include "PunctualLights.hlsl" + +StructuredBuffer _RingConfigBuffer; +RWStructuredBuffer _PatchIrradiances; +StructuredBuffer _PatchGeometries; +RWStructuredBuffer _PatchStatistics; +StructuredBuffer _CellPatchIndices; +StructuredBuffer _CascadeOffsets; +StructuredBuffer _MaterialEntries; +StructuredBuffer _PunctualLightSamples; +Texture2DArray _AlbedoTextures; +Texture2DArray _TransmissionTextures; +Texture2DArray _EmissionTextures; +SamplerState sampler_EmissionTextures; +SamplerState sampler_AlbedoTextures; +SamplerState sampler_TransmissionTextures; +TextureCube _EnvironmentCubemap; +SamplerState sampler_EnvironmentCubemap; +UNIFIED_RT_DECLARE_ACCEL_STRUCT(_RayTracingAccelerationStructure); + +uint _PunctualLightCount; +uint _FrameIdx; +uint _VolumeSpatialResolution; +uint _CascadeCount; +float _VolumeVoxelMinSize; +uint _MultiBounce; +uint _SampleCount; +float _ShortHysteresis; +uint _RingConfigOffset; +float3 _VolumeTargetPos; +float _MaterialAtlasTexelSize; // The size of 1 texel in the atlases above +float _AlbedoBoost; +uint _PunctualLightSampleCount; +float3 _DirectionalLightDirection; +float3 _DirectionalLightIntensity; void ProcessAndStoreRadianceSample(RWStructuredBuffer patchIrradiances, RWStructuredBuffer patchStatistics, uint patchIdx, SphericalHarmonics::RGBL1 radianceSample, float shortHysteresis) { @@ -33,3 +74,163 @@ void ProcessAndStoreRadianceSample(RWStructuredBuffer PatchUtil::SetUpdateCount(newStats.patchCounters, newUpdateCount); patchStatistics[patchIdx] = newStats; } + +void ProjectAndAccumulate(inout SphericalHarmonics::RGBL1 accumulator, float3 sample, float3 direction) +{ + accumulator.l0 += sample * SphericalHarmonics::y0; + accumulator.l1s[0] += sample * SphericalHarmonics::y1Constant * direction.y; + accumulator.l1s[1] += sample * SphericalHarmonics::y1Constant * direction.z; + accumulator.l1s[2] += sample * SphericalHarmonics::y1Constant * direction.x; +} + +void SamplePunctualLightBounceRadiance( + inout QrngKronecker rng, + uint patchIdx, + UnifiedRT::RayTracingAccelStruct accelStruct, + UnifiedRT::DispatchInfo dispatchInfo, + PatchUtil::PatchGeometry patchGeo, + inout SphericalHarmonics::RGBL1 accumulator, + inout bool gotValidSamples) +{ + rng.Init(patchIdx, _FrameIdx * _SampleCount); + SphericalHarmonics::RGBL1 radianceAccumulator = (SphericalHarmonics::RGBL1)0; + + uint validSampleCount = 0; + for(uint sampleIdx = 0; sampleIdx < _SampleCount; ++sampleIdx) + { + PunctualLightBounceRadianceSample sample = SamplePunctualLightBounceRadiance( + dispatchInfo, + accelStruct, + _PunctualLightSamples, + _PunctualLightSampleCount, + rng.GetFloat(0), + patchGeo.position, + patchGeo.normal); + + if (!sample.IsValid()) + continue; + + validSampleCount++; + ProjectAndAccumulate(radianceAccumulator, sample.radianceOverDensity, sample.direction); + + rng.NextSample(); + } + + if (validSampleCount != 0) + { + gotValidSamples = true; + const float normalizationFactor = rcp(validSampleCount); + SphericalHarmonics::AddMut(accumulator, SphericalHarmonics::MulPure(radianceAccumulator, normalizationFactor)); + } +} + +void SampleEnvironmentAndDirectionalBounceAndMultiBounceRadiance( + inout QrngKronecker rng, + uint patchIdx, + UnifiedRT::RayTracingAccelStruct accelStruct, + UnifiedRT::DispatchInfo dispatchInfo, + MaterialPoolParamSet matPoolParams, + PatchUtil::PatchGeometry patchGeo, + inout SphericalHarmonics::RGBL1 accumulator, + inout bool gotValidSamples) +{ + rng.Init(patchIdx, _FrameIdx * _SampleCount); + + UnifiedRT::Ray ray; + ray.origin = OffsetRayOrigin(patchGeo.position, patchGeo.normal); + ray.tMin = 0; + ray.tMax = FLT_MAX; + + SphericalHarmonics::RGBL1 radianceAccumulator = (SphericalHarmonics::RGBL1)0; + + uint validSampleCount = 0; + for(uint sampleIdx = 0; sampleIdx < _SampleCount; ++sampleIdx) + { + ray.direction = UniformHemisphereSample(float2(rng.GetFloat(0), rng.GetFloat(1)), patchGeo.normal); + const float3 radiance = IncomingEnviromentAndDirectionalBounceAndMultiBounceRadiance( + dispatchInfo, + accelStruct, + ray, + matPoolParams, + _DirectionalLightDirection, + _DirectionalLightIntensity, + _MultiBounce, + _EnvironmentCubemap, + sampler_EnvironmentCubemap, + _PatchIrradiances, + _CellPatchIndices, + _VolumeSpatialResolution, + _CascadeOffsets, + _VolumeTargetPos, + _CascadeCount, + _VolumeVoxelMinSize); + + if (all(radiance == invalidRadiance)) + continue; + + validSampleCount++; + ProjectAndAccumulate(radianceAccumulator, radiance, ray.direction); + + rng.NextSample(); + } + + if (validSampleCount != 0) + { + gotValidSamples = true; + const float reciprocalDensity = 2.0f * PI; + const float normalizationFactor = reciprocalDensity * rcp(validSampleCount); + SphericalHarmonics::AddMut(accumulator, SphericalHarmonics::MulPure(radianceAccumulator, normalizationFactor)); + } +} + +void Estimate(UnifiedRT::DispatchInfo dispatchInfo) +{ + uint patchIdx = dispatchInfo.dispatchThreadID.x; + + if (!RingBuffer::IsPositionInUse(_RingConfigBuffer, _RingConfigOffset, patchIdx)) + return; + + UnifiedRT::RayTracingAccelStruct accelStruct = UNIFIED_RT_GET_ACCEL_STRUCT(_RayTracingAccelerationStructure); + QrngKronecker rng; + + const PatchUtil::PatchGeometry patchGeo = _PatchGeometries[patchIdx]; + + MaterialPoolParamSet matPoolParams; + matPoolParams.materialEntries = _MaterialEntries; + matPoolParams.albedoTextures = _AlbedoTextures; + matPoolParams.transmissionTextures = _TransmissionTextures; + matPoolParams.emissionTextures = _EmissionTextures; + matPoolParams.emissionSampler = sampler_EmissionTextures; + matPoolParams.albedoSampler = sampler_AlbedoTextures; + matPoolParams.transmissionSampler = sampler_TransmissionTextures; + matPoolParams.atlasTexelSize = _MaterialAtlasTexelSize; + matPoolParams.albedoBoost = _AlbedoBoost; + + SphericalHarmonics::RGBL1 radianceSampleMean = (SphericalHarmonics::RGBL1)0; + bool gotValidSamples = false; + + SampleEnvironmentAndDirectionalBounceAndMultiBounceRadiance( + rng, + patchIdx, + accelStruct, + dispatchInfo, + matPoolParams, + patchGeo, + radianceSampleMean, + gotValidSamples); + + if (_PunctualLightCount != 0) + { + SamplePunctualLightBounceRadiance( + rng, + patchIdx, + accelStruct, + dispatchInfo, + patchGeo, + radianceSampleMean, + gotValidSamples); + } + + if (gotValidSamples) + ProcessAndStoreRadianceSample(_PatchIrradiances, _PatchStatistics, patchIdx, radianceSampleMean, _ShortHysteresis); +} diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/Estimation.hlsl.meta b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/Estimation.hlsl.meta index 4e3a0e94c90..e91e79244bc 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/Estimation.hlsl.meta +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/Estimation.hlsl.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6d141c681d76ebf4a954f3cbee57173c +guid: 87f25dcc02b54e84ab16e783d04d72d8 ShaderIncludeImporter: externalObjects: {} userData: diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RisEstimation.urtshader b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/Estimation.urtshader similarity index 88% rename from Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RisEstimation.urtshader rename to Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/Estimation.urtshader index e2bd5d8ebcc..16e318ce38b 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RisEstimation.urtshader +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/Estimation.urtshader @@ -5,4 +5,4 @@ #define UNIFIED_RT_GROUP_SIZE_Z 1 #define UNIFIED_RT_RAYGEN_FUNC Estimate -#include "RisEstimation.hlsl" +#include "Estimation.hlsl" diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/UniformEstimation.urtshader.meta b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/Estimation.urtshader.meta similarity index 100% rename from Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/UniformEstimation.urtshader.meta rename to Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/Estimation.urtshader.meta diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.hlsl b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.hlsl deleted file mode 100644 index 96f04519ac6..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.hlsl +++ /dev/null @@ -1,193 +0,0 @@ -#include "Common.hlsl" -#include "RingBuffer.hlsl" -#include "PathTracing.hlsl" -#include "RestirEstimation.hlsl" -#include "Packages/com.unity.render-pipelines.core/Runtime/Sampling/PseudoRandom.hlsl" -#include "Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/Common.hlsl" - -StructuredBuffer _RingConfigBuffer; -StructuredBuffer _PatchIrradiances; -StructuredBuffer _PatchGeometries; -StructuredBuffer _CellPatchIndices; -StructuredBuffer _CascadeOffsets; -RWStructuredBuffer _PatchRealizations; -StructuredBuffer _MaterialEntries; -Texture2DArray _AlbedoTextures; -Texture2DArray _TransmissionTextures; -Texture2DArray _EmissionTextures; -SamplerState sampler_EmissionTextures; -SamplerState sampler_AlbedoTextures; -SamplerState sampler_TransmissionTextures; -TextureCube _EnvironmentCubemap; -SamplerState sampler_EnvironmentCubemap; -UNIFIED_RT_DECLARE_ACCEL_STRUCT(_RayTracingAccelerationStructure); - -uint _FrameIdx; -uint _VolumeSpatialResolution; -uint _CascadeCount; -float _VolumeVoxelMinSize; -float3 _VolumeTargetPos; -uint _MultiBounce; -float _ConfidenceCap; -uint _ValidationFrameInterval; -uint _RingConfigOffset; -float _MaterialAtlasTexelSize; // The size of 1 texel in the atlases above -float _AlbedoBoost; -float3 _DirectionalLightDirection; -float3 _DirectionalLightIntensity; - -void GenerateCandidateAndResampleTemporally(UnifiedRT::DispatchInfo dispatchInfo) -{ - uint patchIdx = dispatchInfo.dispatchThreadID.x; - - if (!RingBuffer::IsPositionInUse(_RingConfigBuffer, _RingConfigOffset, patchIdx)) - return; - - UnifiedRT::RayTracingAccelStruct accelStruct = UNIFIED_RT_GET_ACCEL_STRUCT(_RayTracingAccelerationStructure); - const Realization oldRealization = _PatchRealizations[patchIdx]; - Realization newRealization = (Realization)0; // Initializing only to silence shader warning. - - MaterialPoolParamSet matPoolParams; - matPoolParams.materialEntries = _MaterialEntries; - matPoolParams.albedoTextures = _AlbedoTextures; - matPoolParams.transmissionTextures = _TransmissionTextures; - matPoolParams.emissionTextures = _EmissionTextures; - matPoolParams.emissionSampler = sampler_EmissionTextures; - matPoolParams.albedoSampler = sampler_AlbedoTextures; - matPoolParams.transmissionSampler = sampler_TransmissionTextures; - matPoolParams.atlasTexelSize = _MaterialAtlasTexelSize; - matPoolParams.albedoBoost = _AlbedoBoost; - - const bool isCandidateFrame = _FrameIdx % _ValidationFrameInterval != _ValidationFrameInterval - 1; - - // We expect this branch to have relatively low divergence because almost all realizations either - // have a non-zero weight or they have been allocated this frame. Therefore, realizations that are - // nearby in the buffer should almost always agree on whether their weight is zero or not. - if (isCandidateFrame || oldRealization.weight == 0.0f) - { - Reservoir reservoir; - - QrngPcg4D rng; - const uint candidateFrameIdx = _FrameIdx - _FrameIdx / _ValidationFrameInterval; - rng.Init(uint2(patchIdx, 0), candidateFrameIdx); - - { - const PatchUtil::PatchGeometry patchGeo = _PatchGeometries[patchIdx]; - - UnifiedRT::Ray ray; - ray.origin = OffsetRayOrigin(patchGeo.position, patchGeo.normal); - ray.direction = UniformHemisphereSample(float2(rng.GetFloat(0), rng.GetFloat(1)), patchGeo.normal); - ray.tMin = 0; - ray.tMax = FLT_MAX; - - UnifiedRT::Hit hitResult = UnifiedRT::TraceRayClosestHit(dispatchInfo, accelStruct, 0xFFFFFFFF, ray, UnifiedRT::kRayFlagNone); - Sample sample = (Sample)0; // Initializing value only to silence shader compilation warning. - sample.rayOrigin = ray.origin; - sample.rayDirection = ray.direction; - if (hitResult.IsValid()) - { - const UnifiedRT::InstanceData hitInstance = UnifiedRT::GetInstance(hitResult.instanceID); - const SurfaceGeometry hitGeo = FetchSurfaceGeometry(hitInstance, hitResult); - const MaterialPool::MaterialProperties mat = MaterialPool::LoadMaterialProperties( - _MaterialEntries, - _AlbedoTextures, - sampler_AlbedoTextures, - _TransmissionTextures, - sampler_TransmissionTextures, - _EmissionTextures, - sampler_EmissionTextures, - _AlbedoBoost, - _MaterialAtlasTexelSize, - hitInstance.userMaterialID, - hitGeo.uv0, - hitGeo.uv1); - - sample.sampleType = SAMPLE_TYPE_HIT; - sample.hitPointOrDirection = hitGeo.position; - - if (!hitResult.isFrontFace) - { - // If we hit the backface of a water-tight piece of geometry we do nothing. This is to prevent accumulating "false" darkness - // which can give artifacts if a patch reappears after temporarily being inside moving geometry. - // If we hit the backface of geometry which is not water tight, then this most likely a user authoring problem. - return; - } - else - { - sample.radiance = OutgoingDirectionalBounceAndMultiBounceRadiance( - hitGeo.position, - hitGeo.normal, - dispatchInfo, - accelStruct, - _DirectionalLightDirection, - _DirectionalLightIntensity, - _MultiBounce, - _PatchIrradiances, - _CellPatchIndices, - _VolumeSpatialResolution, - _CascadeOffsets, - _VolumeTargetPos, - _CascadeCount, - _VolumeVoxelMinSize, - mat.baseColor, - mat.emissive); - } - } - else - { - sample.sampleType = SAMPLE_TYPE_ENV; - sample.radiance = _EnvironmentCubemap.SampleLevel(sampler_EnvironmentCubemap, ray.direction, 0); - sample.hitPointOrDirection = ray.direction; - } - - float invCandidateWeight = 2.0f * PI; - float candidateWeight = TargetFunction(sample) * invCandidateWeight; - reservoir.InitWithSample(sample, 1.0f, candidateWeight); - } - - { - float cappedConfidence = min(oldRealization.confidence, _ConfidenceCap); - float candidateWeight = TargetFunction(oldRealization.sample) * oldRealization.weight * cappedConfidence; - reservoir.Update(oldRealization.sample, cappedConfidence, candidateWeight, rng.GetFloat(2)); - } - - newRealization = CreateRealizationFromReservoir(reservoir); - } - else - { - UnifiedRT::Ray ray; - ray.origin = oldRealization.sample.rayOrigin; - ray.direction = oldRealization.sample.rayDirection; - ray.tMin = 0; - ray.tMax = FLT_MAX; - - const float3 radianceSample = IncomingEnviromentAndDirectionalBounceAndMultiBounceRadiance( - dispatchInfo, - accelStruct, - ray, - matPoolParams, - _DirectionalLightDirection, - _DirectionalLightIntensity, - _MultiBounce, - _EnvironmentCubemap, - sampler_EnvironmentCubemap, - _PatchIrradiances, - _CellPatchIndices, - _VolumeSpatialResolution, - _CascadeOffsets, - _VolumeTargetPos, - _CascadeCount, - _VolumeVoxelMinSize); - - if (all(radianceSample != invalidRadiance)) - { - newRealization = oldRealization; - if (all(radianceSample + oldRealization.sample.radiance != 0.0f)) - { - newRealization.confidence *= max(0, 1.0f - length(abs(radianceSample - oldRealization.sample.radiance) / (radianceSample + oldRealization.sample.radiance)) / length(float3(1,1,1))); - } - } - } - - _PatchRealizations[patchIdx] = newRealization; -} diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.hlsl.meta b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.hlsl.meta deleted file mode 100644 index ed1343525db..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.hlsl.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: e78ab4c515da1e442a19a4905ed03844 -ShaderIncludeImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.urtshader b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.urtshader deleted file mode 100644 index 659a0c89843..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.urtshader +++ /dev/null @@ -1,8 +0,0 @@ -#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal glcore ps5 - -#define UNIFIED_RT_GROUP_SIZE_X 64 -#define UNIFIED_RT_GROUP_SIZE_Y 1 -#define UNIFIED_RT_GROUP_SIZE_Z 1 -#define UNIFIED_RT_RAYGEN_FUNC GenerateCandidateAndResampleTemporally - -#include "RestirCandidateTemporal.hlsl" diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.urtshader.meta b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.urtshader.meta deleted file mode 100644 index 44a50bfa39e..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.urtshader.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: ad3a9f9982f8c4f4a839a78955e78458 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 42d537a8a4089e448a99fc57a06d74a9, type: 3} diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.compute b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.compute deleted file mode 100644 index 85700741ed0..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.compute +++ /dev/null @@ -1,48 +0,0 @@ -#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal glcore ps5 - -#pragma kernel Estimate - -#include "Common.hlsl" -#include "Estimation.hlsl" -#include "RingBuffer.hlsl" -#include "RestirEstimation.hlsl" - -StructuredBuffer _RingConfigBuffer; -StructuredBuffer _PatchRealizations; -StructuredBuffer _PatchGeometries; -RWStructuredBuffer _PatchIrradiances; -RWStructuredBuffer _PatchStatistics; - -uint _RingConfigOffset; -float _ShortHysteresis; - -[numthreads(64, 1, 1)] -void Estimate(uint patchIdx : SV_DispatchThreadID) -{ - if (!RingBuffer::IsPositionInUse(_RingConfigBuffer, _RingConfigOffset, patchIdx)) - return; - - const Realization realization = _PatchRealizations[patchIdx]; - - float3 rayDirection; - if (realization.sample.sampleType == SAMPLE_TYPE_ENV) - { - rayDirection = realization.sample.hitPointOrDirection; - } - else - { - const float3 patchPosition = _PatchGeometries[patchIdx].position; - rayDirection = normalize(realization.sample.hitPointOrDirection - patchPosition); - } - - if (realization.weight != 0.0f) - { - SphericalHarmonics::RGBL1 estimate; - estimate.l0 = realization.sample.radiance * SphericalHarmonics::y0; - estimate.l1s[0] = realization.sample.radiance * SphericalHarmonics::y1Constant * rayDirection.y; - estimate.l1s[1] = realization.sample.radiance * SphericalHarmonics::y1Constant * rayDirection.z; - estimate.l1s[2] = realization.sample.radiance * SphericalHarmonics::y1Constant * rayDirection.x; - SphericalHarmonics::MulMut(estimate, realization.weight); - ProcessAndStoreRadianceSample(_PatchIrradiances, _PatchStatistics, patchIdx, estimate, _ShortHysteresis); - } -} diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.compute.meta b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.compute.meta deleted file mode 100644 index b72136bd2c3..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.compute.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: b5dbdcea251f42c4a9b8721877f436bf -ComputeShaderImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.hlsl b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.hlsl deleted file mode 100644 index 1ff5f53537a..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.hlsl +++ /dev/null @@ -1,57 +0,0 @@ -#define SAMPLE_TYPE_HIT 0 -#define SAMPLE_TYPE_ENV 1 - -struct Sample -{ - float3 radiance; - float3 hitPointOrDirection; - float3 rayOrigin; - float3 rayDirection; - uint sampleType; // SAMPLE_TYPE_HIT is hit, SAMPLE_TYPE_ENV is env. -}; - -struct Realization -{ - Sample sample; - float weight; - float confidence; -}; - -float TargetFunction(Sample sample) -{ - return sample.radiance.r + sample.radiance.g + sample.radiance.b; -} - -struct Reservoir -{ - Sample sample; - float weightSum; - float confidenceSum; - - void InitWithSample(in Sample newSample, float confidence, float weight) - { - confidenceSum = confidence; - weightSum = weight; - sample = newSample; - } - - void Update(in Sample newSample, float confidence, float weight, float u) - { - confidenceSum += confidence; - weightSum += weight; - if (u * weightSum < weight) - sample = newSample; - } -}; - -Realization CreateRealizationFromReservoir(in Reservoir reservoir) -{ - Realization realization; - realization.sample = reservoir.sample; - realization.confidence = reservoir.confidenceSum; - if (reservoir.weightSum == 0.0f) - realization.weight = 0.0f; - else - realization.weight = reservoir.weightSum / (TargetFunction(reservoir.sample) * reservoir.confidenceSum); - return realization; -} diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.hlsl.meta b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.hlsl.meta deleted file mode 100644 index 118f9bfe784..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirEstimation.hlsl.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 66f41beb195ccdf408b955566b037e9d -ShaderIncludeImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirSpatial.compute b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirSpatial.compute deleted file mode 100644 index b873edaf285..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirSpatial.compute +++ /dev/null @@ -1,69 +0,0 @@ -#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal glcore ps5 - -#pragma kernel ResampleSpatially - -#include "PatchUtil.hlsl" -#include "RingBuffer.hlsl" -#include "Packages/com.unity.render-pipelines.core/Runtime/Sampling/QuasiRandom.hlsl" -#include "RestirEstimation.hlsl" - -StructuredBuffer _RingConfigBuffer; -StructuredBuffer _InputPatchRealizations; -StructuredBuffer _PatchGeometries; -RWStructuredBuffer _OutputPatchRealizations; -StructuredBuffer _CellPatchIndices; -StructuredBuffer _CascadeOffsets; - -uint _FrameIdx; -uint _CascadeCount; -uint _VolumeSpatialResolution; -uint _SampleCount; -float _FilterSize; -uint _RingConfigOffset; -float _VolumeVoxelMinSize; -float3 _VolumeTargetPos; - -[numthreads(64, 1, 1)] -void ResampleSpatially(uint patchIdx : SV_DispatchThreadID) -{ - if (!RingBuffer::IsPositionInUse(_RingConfigBuffer, _RingConfigOffset, patchIdx)) - return; - - Reservoir reservoir; - - const PatchUtil::PatchGeometry patchGeo = _PatchGeometries[patchIdx]; - const int cascadeResolution = PatchUtil::ResolveCascadeIndex(_VolumeTargetPos, patchGeo.position, _VolumeSpatialResolution, _CascadeCount, _VolumeVoxelMinSize); - const uint cascadeIdx = cascadeResolution != -1 ? cascadeResolution : _CascadeCount - 1; - - QrngKronecker rng; - rng.Init(uint2(patchIdx, 0), _FrameIdx * _SampleCount); - - { - const Realization realization = _InputPatchRealizations[patchIdx]; - const float candidateWeight = TargetFunction(realization.sample) * realization.weight * realization.confidence; - reservoir.InitWithSample(realization.sample, realization.confidence, candidateWeight); - } - - for (uint sampleIdx = 0; sampleIdx < _SampleCount; ++sampleIdx) - { - float3 up; - float3 right; - OrthoBasisFromVector(patchGeo.normal, up, right); - - const float2 jitter = (float2(rng.GetFloat(0), rng.GetFloat(1)) * 2.0f - 1.0f) * _FilterSize; - const float3 displacement = (up * jitter.x + right * jitter.y) * PatchUtil::GetVoxelSize(_VolumeVoxelMinSize, cascadeIdx); - const float3 jitteredPosition = patchGeo.position + displacement; - - uint neighbourPatchIdx = PatchUtil::FindPatchIndex(_VolumeTargetPos, _CellPatchIndices, _VolumeSpatialResolution, _CascadeOffsets, _CascadeCount, _VolumeVoxelMinSize, jitteredPosition, patchGeo.normal); - if (neighbourPatchIdx != PatchUtil::invalidPatchIndex) - { - Realization realization = _InputPatchRealizations[neighbourPatchIdx]; - float candidateWeight = TargetFunction(realization.sample) * realization.weight * realization.confidence; - reservoir.Update(realization.sample, realization.confidence, candidateWeight, rng.GetFloat(2)); - } - - rng.NextSample(); - } - - _OutputPatchRealizations[patchIdx] = CreateRealizationFromReservoir(reservoir); -} diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirSpatial.compute.meta b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirSpatial.compute.meta deleted file mode 100644 index 7925e482813..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RestirSpatial.compute.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 8bf708594b6a9224b9a0915f3db08c5d -ComputeShaderImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RisEstimation.hlsl b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RisEstimation.hlsl deleted file mode 100644 index b892df2507e..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RisEstimation.hlsl +++ /dev/null @@ -1,189 +0,0 @@ -#define PATCH_UTIL_USE_RW_IRRADIANCE_BUFFER - -#include "Common.hlsl" -#include "PathTracing.hlsl" -#include "Estimation.hlsl" -#include "RingBuffer.hlsl" -#include "Packages/com.unity.render-pipelines.core/Runtime/Sampling/PseudoRandom.hlsl" -#include "Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/Common.hlsl" - -struct Sample -{ - float3 direction; -}; - -struct Reservoir -{ - Sample sample; - float weightSum; - - void Init() - { - sample = (Sample)0; - weightSum = 0.0f; - } - - void Update(in Sample newSample, float weight, float u) - { - weightSum += weight; - if (u * weightSum < weight) - sample = newSample; - } -}; - -StructuredBuffer _RingConfigBuffer; -RWStructuredBuffer _PatchIrradiances; -RWStructuredBuffer _PatchStatistics; -StructuredBuffer _PatchGeometries; -StructuredBuffer _CellPatchIndices; -StructuredBuffer _CascadeOffsets; -RWStructuredBuffer _PatchAccumulatedLuminances; -StructuredBuffer _MaterialEntries; -Texture2DArray _AlbedoTextures; -Texture2DArray _TransmissionTextures; -Texture2DArray _EmissionTextures; -SamplerState sampler_EmissionTextures; -SamplerState sampler_AlbedoTextures; -SamplerState sampler_TransmissionTextures; -TextureCube _EnvironmentCubemap; -SamplerState sampler_EnvironmentCubemap; -UNIFIED_RT_DECLARE_ACCEL_STRUCT(_RayTracingAccelerationStructure); - -uint _FrameIdx; -uint _VolumeSpatialResolution; -uint _CascadeCount; -uint _MultiBounce; -uint _CandidateCount; -float _TargetFunctionUpdateWeight; -uint _RingConfigOffset; -float _ShortHysteresis; -float3 _VolumeTargetPos; -float _VolumeVoxelMinSize; -float _MaterialAtlasTexelSize; // The size of 1 texel in the atlases above -float _AlbedoBoost; -float3 _DirectionalLightDirection; -float3 _DirectionalLightIntensity; - -void ProcessAndStoreLuminanceSample(RWStructuredBuffer patchLuminances, uint patchIdx, SphericalHarmonics::ScalarL2 luminanceSample, float updateWeight) -{ - const SphericalHarmonics::ScalarL2 oldLuminance = patchLuminances[patchIdx]; - SphericalHarmonics::ScalarL2 output = SphericalHarmonics::Lerp(oldLuminance, luminanceSample, updateWeight); - patchLuminances[patchIdx] = output; -} - -float TargetFunction(Sample sample, SphericalHarmonics::ScalarL2 accumulatedPatchLuminance) -{ - float luminance = SphericalHarmonics::Eval(accumulatedPatchLuminance, sample.direction); - if (luminance < FLT_EPSILON) - { - luminance = 0.05 * accumulatedPatchLuminance.l0 * SphericalHarmonics::y0 + FLT_EPSILON; - } - return luminance; -} - -SphericalHarmonics::ScalarL2 EstimateFromLuminanceSample(float luminanceSample, float3 rayDirection) -{ - SphericalHarmonics::ScalarL2 estimate; - estimate.l0 = luminanceSample * SphericalHarmonics::y0; - estimate.l1s[0] = luminanceSample * (SphericalHarmonics::y1Constant * rayDirection.y); - estimate.l1s[1] = luminanceSample * (SphericalHarmonics::y1Constant * rayDirection.z); - estimate.l1s[2] = luminanceSample * (SphericalHarmonics::y1Constant * rayDirection.x); - estimate.l2s[0] = luminanceSample * (SphericalHarmonics::y20Constant * rayDirection.x * rayDirection.y); - estimate.l2s[1] = luminanceSample * (SphericalHarmonics::y21Constant * rayDirection.y * rayDirection.z); - estimate.l2s[2] = luminanceSample * (SphericalHarmonics::y22Constant * (3.0f * rayDirection.z * rayDirection.z - 1.0f)); - estimate.l2s[3] = luminanceSample * (SphericalHarmonics::y23Constant * rayDirection.x * rayDirection.z); - estimate.l2s[4] = luminanceSample * (0.5 * SphericalHarmonics::y24Constant * (rayDirection.x * rayDirection.x - rayDirection.y * rayDirection.y)); - return estimate; -} - -SphericalHarmonics::RGBL1 EstimateFromSampleAndWeight(float3 radianceSample, float3 rayDirection, float weight) -{ - SphericalHarmonics::RGBL1 estimate; - estimate.l0 = radianceSample * SphericalHarmonics::y0; - estimate.l1s[0] = radianceSample * SphericalHarmonics::y1Constant * rayDirection.y; - estimate.l1s[1] = radianceSample * SphericalHarmonics::y1Constant * rayDirection.z; - estimate.l1s[2] = radianceSample * SphericalHarmonics::y1Constant * rayDirection.x; - SphericalHarmonics::MulMut(estimate, weight); - return estimate; -} - -void Estimate(UnifiedRT::DispatchInfo dispatchInfo) -{ - uint patchIdx = dispatchInfo.dispatchThreadID.x; - - if (!RingBuffer::IsPositionInUse(_RingConfigBuffer, _RingConfigOffset, patchIdx)) - return; - - uint candidateCount = _CandidateCount; - UnifiedRT::RayTracingAccelStruct accelStruct = UNIFIED_RT_GET_ACCEL_STRUCT(_RayTracingAccelerationStructure); - - Reservoir reservoir; - reservoir.Init(); - - QrngPcg4D rng; - rng.Init(uint2(patchIdx, 0), _FrameIdx); - - const PatchUtil::PatchGeometry patchGeo = _PatchGeometries[patchIdx]; - const SphericalHarmonics::ScalarL2 accumulatedPatchLuminance = _PatchAccumulatedLuminances[patchIdx]; - - for(uint candidateIdx = 0; candidateIdx < candidateCount; ++candidateIdx) - { - Sample sample; - sample.direction = UniformHemisphereSample(float2(rng.GetFloat(0), rng.GetFloat(1)), patchGeo.normal); - float invCandidateWeight = 2.0f * PI; - float candidateWeight = TargetFunction(sample, accumulatedPatchLuminance) * invCandidateWeight; - reservoir.Update(sample, candidateWeight, rng.GetFloat(2)); - - rng.NextSample(); - } - - const float outputWeight = reservoir.weightSum / (TargetFunction(reservoir.sample, accumulatedPatchLuminance) * candidateCount); - - UnifiedRT::Ray ray; - ray.direction = reservoir.sample.direction; - ray.origin = OffsetRayOrigin(patchGeo.position, patchGeo.normal); - ray.tMin = 0; - ray.tMax = FLT_MAX; - - MaterialPoolParamSet matPoolParams; - matPoolParams.materialEntries = _MaterialEntries; - matPoolParams.albedoTextures = _AlbedoTextures; - matPoolParams.transmissionTextures = _TransmissionTextures; - matPoolParams.emissionTextures = _EmissionTextures; - matPoolParams.emissionSampler = sampler_EmissionTextures; - matPoolParams.albedoSampler = sampler_AlbedoTextures; - matPoolParams.transmissionSampler = sampler_TransmissionTextures; - matPoolParams.atlasTexelSize = _MaterialAtlasTexelSize; - matPoolParams.albedoBoost = _AlbedoBoost; - - const float3 radianceSample = IncomingEnviromentAndDirectionalBounceAndMultiBounceRadiance( - dispatchInfo, - accelStruct, - ray, - matPoolParams, - _DirectionalLightDirection, - _DirectionalLightIntensity, - _MultiBounce, - _EnvironmentCubemap, - sampler_EnvironmentCubemap, - _PatchIrradiances, - _CellPatchIndices, - _VolumeSpatialResolution, - _CascadeOffsets, - _VolumeTargetPos, - _CascadeCount, - _VolumeVoxelMinSize); - - // If we hit the backface of a water-tight piece of geometry we do nothing. This is to prevent accumulating "false" darkness - // which can give artifacts if a patch reappears after temporarily being inside moving geometry. - // If we hit the backface of geometry which is not water tight, then this most likely a user authoring problem. - if (all(radianceSample != invalidRadiance)) - { - float luminance = dot(radianceSample, float3(0.2126f, 0.7152f, 0.0722f)); - SphericalHarmonics::ScalarL2 luminanceEstimate = EstimateFromLuminanceSample(luminance, reservoir.sample.direction); - ProcessAndStoreLuminanceSample(_PatchAccumulatedLuminances, patchIdx, luminanceEstimate, _TargetFunctionUpdateWeight); - - const SphericalHarmonics::RGBL1 estimate = EstimateFromSampleAndWeight(radianceSample, reservoir.sample.direction, outputWeight); - ProcessAndStoreRadianceSample(_PatchIrradiances, _PatchStatistics, patchIdx, estimate, _ShortHysteresis); - } -} diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RisEstimation.hlsl.meta b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RisEstimation.hlsl.meta deleted file mode 100644 index 89659f13cdc..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RisEstimation.hlsl.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 3fdd957f94ad7874198e756569ec013e -ShaderIncludeImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RisEstimation.urtshader.meta b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RisEstimation.urtshader.meta deleted file mode 100644 index 3ba8b9a2ad1..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/RisEstimation.urtshader.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 713f6141bd66a134383b787f2eaa7c11 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 42d537a8a4089e448a99fc57a06d74a9, type: 3} diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/SurfaceCache.cs b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/SurfaceCache.cs index 7a5c71c6d58..6a753935de2 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/SurfaceCache.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/SurfaceCache.cs @@ -58,18 +58,14 @@ internal class SurfaceCachePatchList : IDisposable private GraphicsBuffer _cellIndices; private GraphicsBuffer[] _irradiances; private GraphicsBuffer _statistics; - private GraphicsBuffer[] _restirRealizations; - private GraphicsBuffer _risAccumulatedLuminances; public uint Capacity => _capacity; public GraphicsBuffer Geometries => _geometries; public GraphicsBuffer CellIndices => _cellIndices; public GraphicsBuffer[] Irradiances => _irradiances; public GraphicsBuffer Statistics => _statistics; - public GraphicsBuffer[] RestirRealizations => _restirRealizations; - public GraphicsBuffer RisAccumulatedLuminances => _risAccumulatedLuminances; - public SurfaceCachePatchList(uint capacity, SurfaceCacheEstimationMethod estimationMethod) + public SurfaceCachePatchList(uint capacity) { _capacity = capacity; int capacityInt = (int)capacity; @@ -82,21 +78,8 @@ public SurfaceCachePatchList(uint capacity, SurfaceCacheEstimationMethod estimat _irradiances[0] = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacityInt, irradianceStride); _irradiances[1] = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacityInt, irradianceStride); _irradiances[2] = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacityInt, irradianceStride); - _statistics = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacityInt, sizeof(float) * 3 * 2 + sizeof(uint)); - if (estimationMethod == SurfaceCacheEstimationMethod.Restir) - { - _restirRealizations = new GraphicsBuffer[2]; - uint sampleLength = sizeof(float) * 3 * 4 + sizeof(uint); - uint realizationLength = sampleLength + sizeof(float) * 2; - _restirRealizations[0] = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacityInt, (int)realizationLength); - _restirRealizations[1] = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacityInt, (int)realizationLength); - } - else if (estimationMethod == SurfaceCacheEstimationMethod.Ris) - { - uint luminanceLength = sizeof(float) * 9; - _risAccumulatedLuminances = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacityInt, (int)luminanceLength); - } + _statistics = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacityInt, sizeof(float) * 3 * 2 + sizeof(uint)); } public void Dispose() @@ -108,13 +91,6 @@ public void Dispose() _geometries.Dispose(); _cellIndices.Dispose(); _statistics.Dispose(); - _risAccumulatedLuminances?.Dispose(); - - if (_restirRealizations != null) - { - foreach (var b in _restirRealizations) - b.Dispose(); - } } } @@ -168,13 +144,6 @@ public void Dispose() } } - internal enum SurfaceCacheEstimationMethod - { - Uniform, - Restir, - Ris - } - internal struct SurfaceCacheVolumeParameterSet { public float Size; @@ -184,15 +153,8 @@ internal struct SurfaceCacheVolumeParameterSet internal struct SurfaceCacheEstimationParameterSet { - public SurfaceCacheEstimationMethod Method; public bool MultiBounce; - public uint RestirEstimationConfidenceCap; - public uint RestirEstimationSpatialSampleCount; - public float RestirEstimationSpatialFilterSize; - public uint RestirEstimationValidationFrameInterval; - public uint UniformEstimationSampleCount; - public uint RisEstimationCandidateCount; - public float RisEstimationTargetFunctionUpdateWeight; + public uint SampleCount; } internal struct SurfaceCachePatchFilteringParameterSet @@ -220,17 +182,7 @@ internal class SurfaceCacheResourceSet internal LocalKeyword DefragKeyword; internal IRayTracingShader PunctualLightSamplingShader; - internal IRayTracingShader UniformEstimationShader; - internal IRayTracingShader RestirCandidateTemporalShader; - internal IRayTracingShader RisEstimationShader; - - internal ComputeShader RestirSpatialShader; - internal int RestirSpatialKernel; - internal uint3 RestirSpatialKernelGroupSize; - - internal ComputeShader RestirEstimationShader; - internal int RestirEstimationKernel; - internal uint3 RestirEstimationKernelGroupSize; + internal IRayTracingShader EstimationShader; internal ComputeShader SpatialFilteringShader; internal int SpatialFilteringKernel; @@ -261,14 +213,6 @@ internal bool LoadFromRenderPipelineResources(RayTracingContext rtContext) EvictionKernel = EvictionShader.FindKernel("Evict"); EvictionShader.GetKernelThreadGroupSizes(EvictionKernel, out EvictionKernelGroupSize.x, out EvictionKernelGroupSize.y, out EvictionKernelGroupSize.z); - RestirSpatialShader = rpResources.restirSpatialShader; - RestirSpatialKernel = RestirSpatialShader.FindKernel("ResampleSpatially"); - RestirSpatialShader.GetKernelThreadGroupSizes(RestirSpatialKernel, out RestirSpatialKernelGroupSize.x, out RestirSpatialKernelGroupSize.y, out RestirSpatialKernelGroupSize.z); - - RestirEstimationShader = rpResources.restirEstimationShader; - RestirEstimationKernel = RestirEstimationShader.FindKernel("Estimate"); - RestirEstimationShader.GetKernelThreadGroupSizes(RestirEstimationKernel, out RestirEstimationKernelGroupSize.x, out RestirEstimationKernelGroupSize.y, out RestirEstimationKernelGroupSize.z); - SpatialFilteringShader = rpResources.spatialFilteringShader; SpatialFilteringKernel = SpatialFilteringShader.FindKernel("FilterSpatially"); SpatialFilteringShader.GetKernelThreadGroupSizes(SpatialFilteringKernel, out SpatialFilteringKernelGroupSize.x, out SpatialFilteringKernelGroupSize.y, out SpatialFilteringKernelGroupSize.z); @@ -287,28 +231,20 @@ internal bool LoadFromRenderPipelineResources(RayTracingContext rtContext) DefragShader.DisableKeyword(defragKeyword); Object punctualLightSamplingUnifiedObj; - Object uniformEstimationUnifiedObj; - Object restirCandidateTemporalUnifiedObj; - Object risEstimationUnifiedObj; + Object estimationUnifiedObj; if (rtContext.BackendType == RayTracingBackend.Compute) { punctualLightSamplingUnifiedObj = rpResources.punctualLightSamplingComputeShader; - uniformEstimationUnifiedObj = rpResources.uniformEstimationComputeShader; - restirCandidateTemporalUnifiedObj = rpResources.restirCandidateTemporalComputeShader; - risEstimationUnifiedObj = rpResources.risEstimationComputeShader; + estimationUnifiedObj = rpResources.estimationComputeShader; } else { punctualLightSamplingUnifiedObj = rpResources.punctualLightSamplingRayTracingShader; - uniformEstimationUnifiedObj = rpResources.uniformEstimationRayTracingShader; - restirCandidateTemporalUnifiedObj = rpResources.restirCandidateTemporalRayTracingShader; - risEstimationUnifiedObj = rpResources.risEstimationRayTracingShader; + estimationUnifiedObj = rpResources.estimationRayTracingShader; } PunctualLightSamplingShader = rtContext.CreateRayTracingShader(punctualLightSamplingUnifiedObj); - UniformEstimationShader = rtContext.CreateRayTracingShader(uniformEstimationUnifiedObj); - RestirCandidateTemporalShader = rtContext.CreateRayTracingShader(restirCandidateTemporalUnifiedObj); - RisEstimationShader = rtContext.CreateRayTracingShader(risEstimationUnifiedObj); + EstimationShader = rtContext.CreateRayTracingShader(estimationUnifiedObj); return true; } @@ -387,7 +323,7 @@ private class DefragPassData internal uint OddIterationPatchOffset; } - private class UniformEstimationPassData + private class EstimationPassData { internal uint PatchCapacity; internal IRayTracingShader PunctualLightSamplingShader; @@ -414,93 +350,6 @@ private class UniformEstimationPassData internal GraphicsBuffer TraceScratchBuffer; } - private class RestirCandidateTemporalPassData - { - internal uint PatchCapacity; - internal IRayTracingShader Shader; - internal GraphicsBuffer RingConfigBuffer; - internal GraphicsBuffer PatchIrradiances; - internal GraphicsBuffer PatchGeometries; - internal GraphicsBuffer PatchRealizations; - internal GraphicsBuffer CascadeOffsets; - internal GraphicsBuffer CellPatchIndices; - internal Vector3 VolumeTargetPos; - internal SurfaceCacheWorld World; - internal float AlbedoBoost; - internal uint FrameIdx; - internal uint RingConfigOffset; - internal uint CascadeCount; - internal bool MultiBounce; - internal uint ConfidenceCap; - internal uint VolumeSpatialResolution; - internal float VolumeVoxelMinSize; - internal uint ValidationFrameInterval; - internal GraphicsBuffer TraceScratchBuffer; - } - - private class RestirSpatialPassData - { - internal ComputeShader Shader; - internal int KernelIndex; - internal uint3 ThreadGroupSize; - internal uint PatchCapacity; - internal uint FrameIdx; - internal uint CascadeCount; - internal uint RingConfigOffset; - internal uint SampleCount; - internal float FilterSize; - internal uint VolumeSpatialResolution; - internal Vector3 VolumeTargetPos; - internal float VolumeVoxelMinSize; - internal GraphicsBuffer CellPatchIndices; - internal GraphicsBuffer CascadeOffsets; - internal GraphicsBuffer RingConfigBuffer; - internal GraphicsBuffer PatchGeometries; - internal GraphicsBuffer InputPatchRealizations; - internal GraphicsBuffer OutputPatchRealizations; - } - - private class RestirEstimationPassData - { - internal int KernelIndex; - internal uint3 ThreadGroupSize; - internal uint PatchCapacity; - internal ComputeShader Shader; - internal GraphicsBuffer RingConfigBuffer; - internal GraphicsBuffer PatchIrradiances; - internal GraphicsBuffer PatchStatistics; - internal GraphicsBuffer PatchGeometries; - internal GraphicsBuffer PatchRealizations; - internal uint RingConfigOffset; - internal float ShortHysteresis; - } - - private class RisEstimationPassData - { - internal uint PatchCapacity; - internal IRayTracingShader Shader; - internal GraphicsBuffer RingConfigBuffer; - internal GraphicsBuffer PatchIrradiances; - internal GraphicsBuffer PatchStatistics; - internal GraphicsBuffer PatchGeometries; - internal GraphicsBuffer CascadeOffsets; - internal GraphicsBuffer CellPatchIndices; - internal GraphicsBuffer PatchAccumulatedLuminances; - internal SurfaceCacheWorld World; - internal float AlbedoBoost; - internal uint FrameIdx; - internal uint CascadeCount; - internal bool MultiBounce; - internal uint CandidateCount; - internal uint RingConfigOffset; - internal float ShortHysteresis; - internal uint VolumeSpatialResolution; - internal Vector3 VolumeTargetPos; - internal float TargetFunctionUpdateWeight; - internal float VolumeVoxelMinSize; - internal GraphicsBuffer TraceScratchBuffer; - } - private class SpatialFilterPassData { internal GraphicsBuffer InputPatchIrradiances; @@ -556,13 +405,8 @@ internal static class ShaderIDs public static readonly int _OldCascadeOffsets = Shader.PropertyToID("_OldCascadeOffsets"); public static readonly int _VolumeSpatialResolution = Shader.PropertyToID("_VolumeSpatialResolution"); public static readonly int _CascadeCount = Shader.PropertyToID("_CascadeCount"); - public static readonly int _ConfidenceCap = Shader.PropertyToID("_ConfidenceCap"); - public static readonly int _CandidateCount = Shader.PropertyToID("_CandidateCount"); - public static readonly int _TargetFunctionUpdateWeight = Shader.PropertyToID("_TargetFunctionUpdateWeight"); public static readonly int _SampleCount = Shader.PropertyToID("_SampleCount"); - public static readonly int _FilterSize = Shader.PropertyToID("_FilterSize"); public static readonly int _MultiBounce = Shader.PropertyToID("_MultiBounce"); - public static readonly int _ValidationFrameInterval = Shader.PropertyToID("_ValidationFrameInterval"); public static readonly int _VolumeVoxelMinSize = Shader.PropertyToID("_VolumeVoxelMinSize"); public static readonly int _PunctualLightSampleCount = Shader.PropertyToID("_PunctualLightSampleCount"); public static readonly int _ShortHysteresis = Shader.PropertyToID("_ShortHysteresis"); @@ -584,11 +428,6 @@ internal static class ShaderIDs public static readonly int _PatchGeometries = Shader.PropertyToID("_PatchGeometries"); public static readonly int _PunctualLightSamples = Shader.PropertyToID("_PunctualLightSamples"); public static readonly int _Samples = Shader.PropertyToID("_Samples"); - public static readonly int _PatchRealizations = Shader.PropertyToID("_PatchRealizations"); - public static readonly int _PatchAccumulatedLuminances = Shader.PropertyToID("_PatchAccumulatedLuminances"); - public static readonly int _InputPatchRealizations = Shader.PropertyToID("_InputPatchRealizations"); - public static readonly int _OutputPatchRealizations = Shader.PropertyToID("_OutputPatchRealizations"); - public static readonly int _RingConfigOffset = Shader.PropertyToID("_RingConfigOffset"); } @@ -611,7 +450,7 @@ public SurfaceCache( _resources = resources; _volume = new SurfaceCacheVolume(volParams.Resolution, volParams.CascadeCount, volParams.Size); _ringConfig = new SurfaceCacheRingConfig(); - _patches = new SurfaceCachePatchList(patchCapacity, estimationParams.Method); + _patches = new SurfaceCachePatchList(patchCapacity); _punctualLightSamples = new GraphicsBuffer(GraphicsBuffer.Target.Structured, (int)punctualLightSampleCount, sizeof(float) * 19); _estimationParams = estimationParams; @@ -745,151 +584,36 @@ private uint RecordFiltering(RenderGraph renderGraph, uint frameIdx) private void RecordEstimation(RenderGraph renderGraph, uint frameIdx, SurfaceCacheWorld world) { - if (_estimationParams.Method == SurfaceCacheEstimationMethod.Uniform) - { - using (var builder = renderGraph.AddUnsafePass("Surface Cache Uniform Estimation", out UniformEstimationPassData passData)) - { - passData.PatchCapacity = Patches.Capacity; - passData.PunctualLightSamplingShader = _resources.PunctualLightSamplingShader; - passData.EstimationShader = _resources.UniformEstimationShader; - passData.RingConfigBuffer = RingConfig.Buffer; - passData.PatchIrradiances = Patches.Irradiances[0]; - passData.PatchGeometries = Patches.Geometries; - passData.PatchStatistics = Patches.Statistics; - passData.PunctualLightSamples = PunctualLightSamples; - passData.PunctualLightSampleCount = (uint)PunctualLightSamples.count; - passData.World = world; - passData.CellPatchIndices = Volume.CellPatchIndices; - passData.VolumeTargetPos = Volume.TargetPos; - passData.FrameIdx = frameIdx; - passData.AlbedoBoost = _albedoBoost; - passData.VolumeSpatialResolution = Volume.SpatialResolution; - passData.CascadeOffsets = Volume.CascadeOffsetBuffer; - passData.CascadeCount = Volume.CascadeCount; - passData.MultiBounce = _estimationParams.MultiBounce; - passData.ShortHysteresis = _shortHysteresis; - passData.RingConfigOffset = RingConfig.OffsetA; - passData.SampleCount = _estimationParams.UniformEstimationSampleCount; - passData.VolumeVoxelMinSize = Volume.VoxelMinSize; - - RayTracingHelper.ResizeScratchBufferForTrace(passData.EstimationShader, passData.PatchCapacity, 1, 1, ref _traceScratch); - RayTracingHelper.ResizeScratchBufferForTrace(passData.PunctualLightSamplingShader, passData.PunctualLightSampleCount, 1, 1, ref _traceScratch); - passData.TraceScratchBuffer = _traceScratch; - - builder.AllowGlobalStateModification(true); // Set to ensure ordering. - builder.SetRenderFunc((UniformEstimationPassData data, UnsafeGraphContext cgContext) => UniformEstimate(data, cgContext)); - } - } - else if (_estimationParams.Method == SurfaceCacheEstimationMethod.Restir) + using (var builder = renderGraph.AddUnsafePass("Surface Cache Estimation", out EstimationPassData passData)) { - using (var builder = renderGraph.AddUnsafePass("Surface Cache Restir Candidate + Temporal", out RestirCandidateTemporalPassData passData)) - { - passData.PatchCapacity = Patches.Capacity; - passData.Shader = _resources.RestirCandidateTemporalShader; - passData.RingConfigBuffer = RingConfig.Buffer; - passData.PatchIrradiances = Patches.Irradiances[0]; - passData.PatchGeometries = Patches.Geometries; - passData.PatchRealizations = Patches.RestirRealizations[0]; - passData.CascadeOffsets = Volume.CascadeOffsetBuffer; - passData.World = world; - passData.AlbedoBoost = _albedoBoost; - passData.CellPatchIndices = Volume.CellPatchIndices; - passData.VolumeTargetPos = Volume.TargetPos; - passData.FrameIdx = frameIdx; - passData.VolumeSpatialResolution = Volume.SpatialResolution; - passData.RingConfigOffset = RingConfig.OffsetA; - passData.CascadeCount = Volume.CascadeCount; - passData.MultiBounce = _estimationParams.MultiBounce; - passData.ConfidenceCap = _estimationParams.RestirEstimationConfidenceCap; - passData.VolumeVoxelMinSize = Volume.VoxelMinSize; - passData.ValidationFrameInterval = _estimationParams.RestirEstimationValidationFrameInterval; - - RayTracingHelper.ResizeScratchBufferForTrace(passData.Shader, passData.PatchCapacity, 1, 1, ref _traceScratch); - passData.TraceScratchBuffer = _traceScratch; - - builder.AllowGlobalStateModification(true); - builder.SetRenderFunc((RestirCandidateTemporalPassData data, UnsafeGraphContext cgContext) => RestirGenerateCandidateAndResampleTemporally(data, cgContext)); - } - - using (var builder = renderGraph.AddComputePass("Surface Cache Restir Spatial", out RestirSpatialPassData passData)) - { - passData.Shader = _resources.RestirSpatialShader; - passData.KernelIndex = _resources.RestirSpatialKernel; - passData.ThreadGroupSize = _resources.RestirSpatialKernelGroupSize; - passData.RingConfigBuffer = RingConfig.Buffer; - passData.RingConfigOffset = RingConfig.OffsetA; - passData.PatchGeometries = Patches.Geometries; - passData.CellPatchIndices = Volume.CellPatchIndices; - passData.CascadeOffsets = Volume.CascadeOffsetBuffer; - passData.InputPatchRealizations = Patches.RestirRealizations[0]; - passData.OutputPatchRealizations = Patches.RestirRealizations[1]; - passData.PatchCapacity = Patches.Capacity; - passData.FrameIdx = frameIdx; - passData.VolumeVoxelMinSize = Volume.VoxelMinSize; - passData.VolumeSpatialResolution = Volume.SpatialResolution; - passData.CascadeCount = Volume.CascadeCount; - passData.SampleCount = _estimationParams.RestirEstimationSpatialSampleCount; - passData.FilterSize = _estimationParams.RestirEstimationSpatialFilterSize; - passData.VolumeTargetPos = Volume.TargetPos; - - builder.AllowGlobalStateModification(true); // Set to ensure ordering. - builder.SetRenderFunc((RestirSpatialPassData data, ComputeGraphContext cgContext) => RestirResampleSpatially(data, cgContext)); - } - - using (var builder = renderGraph.AddComputePass("Surface Cache Restir Estimation", out RestirEstimationPassData passData)) - { - passData.KernelIndex = _resources.RestirEstimationKernel; - passData.ThreadGroupSize = _resources.RestirEstimationKernelGroupSize; - passData.RingConfigBuffer = RingConfig.Buffer; - passData.PatchGeometries = Patches.Geometries; - passData.PatchRealizations = Patches.RestirRealizations[1]; - passData.PatchIrradiances = Patches.Irradiances[0]; - passData.PatchStatistics = Patches.Statistics; - passData.RingConfigOffset = RingConfig.OffsetA; - passData.ShortHysteresis = _shortHysteresis; - passData.Shader = _resources.RestirEstimationShader; - passData.PatchCapacity = Patches.Capacity; - - builder.AllowGlobalStateModification(true); // Set to ensure ordering. - builder.SetRenderFunc((RestirEstimationPassData data, ComputeGraphContext cgContext) => RestirEstimate(data, cgContext)); - } - } - else if (_estimationParams.Method == SurfaceCacheEstimationMethod.Ris) - { - using (var builder = renderGraph.AddUnsafePass("Surface Cache RIS Estimation", out RisEstimationPassData passData)) - { - passData.PatchCapacity = Patches.Capacity; - passData.Shader = _resources.RisEstimationShader; - passData.RingConfigBuffer = RingConfig.Buffer; - passData.PatchIrradiances = Patches.Irradiances[0]; - passData.PatchStatistics = Patches.Statistics; - passData.PatchGeometries = Patches.Geometries; - passData.CascadeOffsets = Volume.CascadeOffsetBuffer; - passData.World = world; - passData.AlbedoBoost = _albedoBoost; - passData.CellPatchIndices = Volume.CellPatchIndices; - passData.FrameIdx = frameIdx; - passData.VolumeSpatialResolution = Volume.SpatialResolution; - passData.CascadeCount = Volume.CascadeCount; - passData.MultiBounce = _estimationParams.MultiBounce; - passData.CandidateCount = _estimationParams.RisEstimationCandidateCount; - passData.RingConfigOffset = RingConfig.OffsetA; - passData.ShortHysteresis = _shortHysteresis; - passData.VolumeTargetPos = Volume.TargetPos; - passData.TargetFunctionUpdateWeight = _estimationParams.RisEstimationTargetFunctionUpdateWeight; - passData.VolumeVoxelMinSize = Volume.VoxelMinSize; - passData.PatchAccumulatedLuminances = Patches.RisAccumulatedLuminances; - - RayTracingHelper.ResizeScratchBufferForTrace(passData.Shader, passData.PatchCapacity, 1, 1, ref _traceScratch); - passData.TraceScratchBuffer = _traceScratch; + passData.PatchCapacity = Patches.Capacity; + passData.PunctualLightSamplingShader = _resources.PunctualLightSamplingShader; + passData.EstimationShader = _resources.EstimationShader; + passData.RingConfigBuffer = RingConfig.Buffer; + passData.PatchIrradiances = Patches.Irradiances[0]; + passData.PatchGeometries = Patches.Geometries; + passData.PatchStatistics = Patches.Statistics; + passData.PunctualLightSamples = PunctualLightSamples; + passData.PunctualLightSampleCount = (uint)PunctualLightSamples.count; + passData.World = world; + passData.CellPatchIndices = Volume.CellPatchIndices; + passData.VolumeTargetPos = Volume.TargetPos; + passData.FrameIdx = frameIdx; + passData.AlbedoBoost = _albedoBoost; + passData.VolumeSpatialResolution = Volume.SpatialResolution; + passData.CascadeOffsets = Volume.CascadeOffsetBuffer; + passData.CascadeCount = Volume.CascadeCount; + passData.MultiBounce = _estimationParams.MultiBounce; + passData.ShortHysteresis = _shortHysteresis; + passData.RingConfigOffset = RingConfig.OffsetA; + passData.SampleCount = _estimationParams.SampleCount; + passData.VolumeVoxelMinSize = Volume.VoxelMinSize; - builder.AllowGlobalStateModification(true); // Set to ensure ordering. - builder.SetRenderFunc((RisEstimationPassData data, UnsafeGraphContext cgContext) => RisEstimate(data, cgContext)); - } - } - else - { - Debug.Assert(false, "Unexpected estimation method."); + RayTracingHelper.ResizeScratchBufferForTrace(passData.EstimationShader, passData.PatchCapacity, 1, 1, ref _traceScratch); + RayTracingHelper.ResizeScratchBufferForTrace(passData.PunctualLightSamplingShader, passData.PunctualLightSampleCount, 1, 1, ref _traceScratch); + passData.TraceScratchBuffer = _traceScratch; + builder.AllowGlobalStateModification(true); // Set to ensure ordering. + builder.SetRenderFunc((EstimationPassData data, UnsafeGraphContext cgContext) => Estimate(data, cgContext)); } } @@ -933,7 +657,7 @@ private void RecordScrolling(RenderGraph renderGraph) } } - static void UniformEstimate(UniformEstimationPassData data, UnsafeGraphContext graphCtx) + static void Estimate(EstimationPassData data, UnsafeGraphContext graphCtx) { var cmd = CommandBufferHelpers.GetNativeCommandBuffer(graphCtx.cmd); var punctualLightBuffer = data.World.GetPunctualLightBuffer(); @@ -1002,123 +726,6 @@ static void UniformEstimate(UniformEstimationPassData data, UnsafeGraphContext g return (Vector3.zero, Vector3.zero); } - static void RestirGenerateCandidateAndResampleTemporally(RestirCandidateTemporalPassData data, UnsafeGraphContext graphCtx) - { - var shader = data.Shader; - var cmd = CommandBufferHelpers.GetNativeCommandBuffer(graphCtx.cmd); - - shader.SetBufferParam(cmd, ShaderIDs._RingConfigBuffer, data.RingConfigBuffer); - shader.SetBufferParam(cmd, ShaderIDs._PatchIrradiances, data.PatchIrradiances); - shader.SetBufferParam(cmd, ShaderIDs._PatchGeometries, data.PatchGeometries); - shader.SetBufferParam(cmd, ShaderIDs._PatchRealizations, data.PatchRealizations); - shader.SetBufferParam(cmd, ShaderIDs._CascadeOffsets, data.CascadeOffsets); - shader.SetIntParam(cmd, ShaderIDs._FrameIdx, (int)data.FrameIdx); - shader.SetIntParam(cmd, ShaderIDs._VolumeSpatialResolution, (int)data.VolumeSpatialResolution); - shader.SetIntParam(cmd, ShaderIDs._RingConfigOffset, (int)data.RingConfigOffset); - shader.SetIntParam(cmd, ShaderIDs._CascadeCount, (int)data.CascadeCount); - shader.SetFloatParam(cmd, ShaderIDs._ConfidenceCap, data.ConfidenceCap); - shader.SetIntParam(cmd, ShaderIDs._MultiBounce, data.MultiBounce ? 1 : 0); - shader.SetIntParam(cmd, ShaderIDs._ValidationFrameInterval, (int)data.ValidationFrameInterval); - shader.SetFloatParam(cmd, ShaderIDs._VolumeVoxelMinSize, data.VolumeVoxelMinSize); - shader.SetBufferParam(cmd, ShaderIDs._CellPatchIndices, data.CellPatchIndices); - shader.SetVectorParam(cmd, ShaderIDs._VolumeTargetPos, data.VolumeTargetPos); - shader.SetTextureParam(cmd, ShaderIDs._EnvironmentCubemap, data.World.GetEnvironmentTexture()); - shader.SetBufferParam(cmd, ShaderIDs._MaterialEntries, data.World.GetMaterialListBuffer()); - shader.SetTextureParam(cmd, ShaderIDs._AlbedoTextures, data.World.GetMaterialAlbedoTextures()); - shader.SetTextureParam(cmd, ShaderIDs._EmissionTextures, data.World.GetMaterialEmissionTextures()); - shader.SetTextureParam(cmd, ShaderIDs._TransmissionTextures, data.World.GetMaterialTransmissionTextures()); - shader.SetFloatParam(cmd, ShaderIDs._AlbedoBoost, data.AlbedoBoost); - shader.SetFloatParam(cmd, ShaderIDs._MaterialAtlasTexelSize, GetMaterialAtlasTexelSize(data.World.GetMaterialAlbedoTextures())); - - var (dirLightIntensity, dirLightDirection) = GetDirectionalLightUniforms(data.World.GetDirectionalLight()); - shader.SetVectorParam(cmd, ShaderIDs._DirectionalLightIntensity, dirLightIntensity); - shader.SetVectorParam(cmd, ShaderIDs._DirectionalLightDirection, dirLightDirection); - - data.World.GetAccelerationStructure().Bind(cmd, "_RayTracingAccelerationStructure", data.Shader); - - shader.Dispatch(cmd, data.TraceScratchBuffer, data.PatchCapacity, 1, 1); - } - - static void RestirResampleSpatially(RestirSpatialPassData data, ComputeGraphContext cgContext) - { - var cmd = cgContext.cmd; - var shader = data.Shader; - var kernelIndex = data.KernelIndex; - cmd.SetComputeBufferParam(shader, kernelIndex, ShaderIDs._RingConfigBuffer, data.RingConfigBuffer); - cmd.SetComputeBufferParam(shader, kernelIndex, ShaderIDs._InputPatchRealizations, data.InputPatchRealizations); - cmd.SetComputeBufferParam(shader, kernelIndex, ShaderIDs._OutputPatchRealizations, data.OutputPatchRealizations); - cmd.SetComputeBufferParam(shader, kernelIndex, ShaderIDs._PatchGeometries, data.PatchGeometries); - cmd.SetComputeBufferParam(shader, kernelIndex, ShaderIDs._CellPatchIndices, data.CellPatchIndices); - cmd.SetComputeBufferParam(shader, kernelIndex, ShaderIDs._CascadeOffsets, data.CascadeOffsets); - cmd.SetComputeIntParam(shader, ShaderIDs._FrameIdx, (int)data.FrameIdx); - cmd.SetComputeFloatParam(shader, ShaderIDs._VolumeVoxelMinSize, data.VolumeVoxelMinSize); - cmd.SetComputeIntParam(shader, ShaderIDs._VolumeSpatialResolution, (int)data.VolumeSpatialResolution); - cmd.SetComputeIntParam(shader, ShaderIDs._CascadeCount, (int)data.CascadeCount); - cmd.SetComputeIntParam(shader, ShaderIDs._SampleCount, (int)data.SampleCount); - cmd.SetComputeIntParam(shader, ShaderIDs._FilterSize, (int)data.FilterSize); - cmd.SetComputeIntParam(shader, ShaderIDs._RingConfigOffset, (int)data.RingConfigOffset); - cmd.SetComputeVectorParam(shader, ShaderIDs._VolumeTargetPos, data.VolumeTargetPos); - - uint3 groupCount = DivUp(new uint3(data.PatchCapacity, 1, 1), data.ThreadGroupSize); - cmd.DispatchCompute(data.Shader, data.KernelIndex, (int)groupCount.x, (int)groupCount.y, 1); - } - - static void RestirEstimate(RestirEstimationPassData data, ComputeGraphContext cgContext) - { - var cmd = cgContext.cmd; - var shader = data.Shader; - var kernelIndex = data.KernelIndex; - cmd.SetComputeBufferParam(shader, kernelIndex, ShaderIDs._RingConfigBuffer, data.RingConfigBuffer); - cmd.SetComputeBufferParam(shader, kernelIndex, ShaderIDs._PatchIrradiances, data.PatchIrradiances); - cmd.SetComputeBufferParam(shader, kernelIndex, ShaderIDs._PatchStatistics, data.PatchStatistics); - cmd.SetComputeBufferParam(shader, kernelIndex, ShaderIDs._PatchRealizations, data.PatchRealizations); - cmd.SetComputeBufferParam(shader, kernelIndex, ShaderIDs._PatchGeometries, data.PatchGeometries); - cmd.SetComputeIntParam(shader, ShaderIDs._RingConfigOffset, (int)data.RingConfigOffset); - cmd.SetComputeFloatParam(shader, ShaderIDs._ShortHysteresis, data.ShortHysteresis); - - uint3 groupCount = DivUp(new uint3(data.PatchCapacity, 1, 1), data.ThreadGroupSize); - cmd.DispatchCompute(shader, kernelIndex, (int)groupCount.x, (int)groupCount.y, 1); - } - - static void RisEstimate(RisEstimationPassData data, UnsafeGraphContext graphCtx) - { - var shader = data.Shader; - var cmd = CommandBufferHelpers.GetNativeCommandBuffer(graphCtx.cmd); - - shader.SetBufferParam(cmd, ShaderIDs._RingConfigBuffer, data.RingConfigBuffer); - shader.SetBufferParam(cmd, ShaderIDs._PatchIrradiances, data.PatchIrradiances); - shader.SetBufferParam(cmd, ShaderIDs._PatchStatistics, data.PatchStatistics); - shader.SetBufferParam(cmd, ShaderIDs._PatchGeometries, data.PatchGeometries); - shader.SetBufferParam(cmd, ShaderIDs._CascadeOffsets, data.CascadeOffsets); - shader.SetIntParam(cmd, ShaderIDs._FrameIdx, (int)data.FrameIdx); - shader.SetIntParam(cmd, ShaderIDs._VolumeSpatialResolution, (int)data.VolumeSpatialResolution); - shader.SetIntParam(cmd, ShaderIDs._CascadeCount, (int)data.CascadeCount); - shader.SetIntParam(cmd, ShaderIDs._CandidateCount, (int)data.CandidateCount); - shader.SetFloatParam(cmd, ShaderIDs._TargetFunctionUpdateWeight, data.TargetFunctionUpdateWeight); - shader.SetIntParam(cmd, ShaderIDs._MultiBounce, data.MultiBounce ? 1 : 0); - shader.SetFloatParam(cmd, ShaderIDs._VolumeVoxelMinSize, data.VolumeVoxelMinSize); - shader.SetBufferParam(cmd, ShaderIDs._CellPatchIndices, data.CellPatchIndices); - shader.SetBufferParam(cmd, ShaderIDs._PatchAccumulatedLuminances, data.PatchAccumulatedLuminances); - shader.SetIntParam(cmd, ShaderIDs._RingConfigOffset, (int)data.RingConfigOffset); - shader.SetFloatParam(cmd, ShaderIDs._ShortHysteresis, data.ShortHysteresis); - shader.SetVectorParam(cmd, ShaderIDs._VolumeTargetPos, data.VolumeTargetPos); - shader.SetTextureParam(cmd, ShaderIDs._EnvironmentCubemap, data.World.GetEnvironmentTexture()); - shader.SetBufferParam(cmd, ShaderIDs._MaterialEntries, data.World.GetMaterialListBuffer()); - shader.SetTextureParam(cmd, ShaderIDs._AlbedoTextures, data.World.GetMaterialAlbedoTextures()); - shader.SetTextureParam(cmd, ShaderIDs._EmissionTextures, data.World.GetMaterialEmissionTextures()); - shader.SetTextureParam(cmd, ShaderIDs._TransmissionTextures, data.World.GetMaterialTransmissionTextures()); - shader.SetFloatParam(cmd, ShaderIDs._AlbedoBoost, data.AlbedoBoost); - shader.SetFloatParam(cmd, ShaderIDs._MaterialAtlasTexelSize, GetMaterialAtlasTexelSize(data.World.GetMaterialAlbedoTextures())); - - var (dirLightIntensity, dirLightDirection) = GetDirectionalLightUniforms(data.World.GetDirectionalLight()); - shader.SetVectorParam(cmd, ShaderIDs._DirectionalLightIntensity, dirLightIntensity); - shader.SetVectorParam(cmd, ShaderIDs._DirectionalLightDirection, dirLightDirection); - - data.World.GetAccelerationStructure().Bind(cmd, "_RayTracingAccelerationStructure", data.Shader); - - shader.Dispatch(cmd, data.TraceScratchBuffer, data.PatchCapacity, 1, 1); - } - static void Defrag(DefragPassData data, ComputeGraphContext cgContext) { var cmd = cgContext.cmd; diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/SurfaceCacheRenderPipelineResources.cs b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/SurfaceCacheRenderPipelineResources.cs index a236ee59913..d6b45d03cd0 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/SurfaceCacheRenderPipelineResources.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/SurfaceCacheRenderPipelineResources.cs @@ -20,15 +20,6 @@ sealed class SurfaceCacheRenderPipelineResourceSet : IRenderPipelineResources [ResourcePath("Runtime/Lighting/SurfaceCache/SpatialFiltering.compute")] public ComputeShader m_SpatialFilteringShader; - [ResourcePath("Runtime/Lighting/SurfaceCache/RestirEstimation.compute")] - public ComputeShader m_RestirEstimationShader; - - [ResourcePath("Runtime/Lighting/SurfaceCache/RisEstimation.urtshader")] - public ComputeShader m_RisEstimationComputeShader; - - [ResourcePath("Runtime/Lighting/SurfaceCache/RisEstimation.urtshader")] - public RayTracingShader m_RisEstimationRayTracingShader; - [ResourcePath("Runtime/Lighting/SurfaceCache/Scrolling.compute")] public ComputeShader m_ScrollingShader; @@ -44,20 +35,11 @@ sealed class SurfaceCacheRenderPipelineResourceSet : IRenderPipelineResources [ResourcePath("Runtime/Lighting/SurfaceCache/PunctualLightSampling.urtshader")] public RayTracingShader m_PunctualLightSamplingRayTracingShader; - [ResourcePath("Runtime/Lighting/SurfaceCache/UniformEstimation.urtshader")] - public ComputeShader m_UniformEstimationComputeShader; - - [ResourcePath("Runtime/Lighting/SurfaceCache/UniformEstimation.urtshader")] - public RayTracingShader m_UniformEstimationRayTracingShader; - - [ResourcePath("Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.urtshader")] - public ComputeShader m_RestirCandidateTemporalComputeShader; - - [ResourcePath("Runtime/Lighting/SurfaceCache/RestirCandidateTemporal.urtshader")] - public RayTracingShader m_RestirCandidateTemporalRayTracingShader; + [ResourcePath("Runtime/Lighting/SurfaceCache/Estimation.urtshader")] + public ComputeShader m_EstimationComputeShader; - [ResourcePath("Runtime/Lighting/SurfaceCache/RestirSpatial.compute")] - public ComputeShader m_RestirSpatialShader; + [ResourcePath("Runtime/Lighting/SurfaceCache/Estimation.urtshader")] + public RayTracingShader m_EstimationRayTracingShader; public ComputeShader spatialFilteringShader { @@ -83,40 +65,16 @@ public RayTracingShader punctualLightSamplingRayTracingShader set => this.SetValueAndNotify(ref m_PunctualLightSamplingRayTracingShader, value, nameof(m_PunctualLightSamplingRayTracingShader)); } - public ComputeShader uniformEstimationComputeShader - { - get => m_UniformEstimationComputeShader; - set => this.SetValueAndNotify(ref m_UniformEstimationComputeShader, value, nameof(m_UniformEstimationComputeShader)); - } - - public RayTracingShader uniformEstimationRayTracingShader - { - get => m_UniformEstimationRayTracingShader; - set => this.SetValueAndNotify(ref m_UniformEstimationRayTracingShader, value, nameof(m_UniformEstimationRayTracingShader)); - } - - public ComputeShader restirCandidateTemporalComputeShader + public ComputeShader estimationComputeShader { - get => m_RestirCandidateTemporalComputeShader; - set => this.SetValueAndNotify(ref m_RestirCandidateTemporalComputeShader, value, nameof(m_RestirCandidateTemporalComputeShader)); + get => m_EstimationComputeShader; + set => this.SetValueAndNotify(ref m_EstimationComputeShader, value, nameof(m_EstimationComputeShader)); } - public RayTracingShader restirCandidateTemporalRayTracingShader + public RayTracingShader estimationRayTracingShader { - get => m_RestirCandidateTemporalRayTracingShader; - set => this.SetValueAndNotify(ref m_RestirCandidateTemporalRayTracingShader, value, nameof(m_RestirCandidateTemporalRayTracingShader)); - } - - public ComputeShader restirSpatialShader - { - get => m_RestirSpatialShader; - set => this.SetValueAndNotify(ref m_RestirSpatialShader, value, nameof(m_RestirSpatialShader)); - } - - public ComputeShader restirEstimationShader - { - get => m_RestirEstimationShader; - set => this.SetValueAndNotify(ref m_RestirEstimationShader, value, nameof(m_RestirEstimationShader)); + get => m_EstimationRayTracingShader; + set => this.SetValueAndNotify(ref m_EstimationRayTracingShader, value, nameof(m_EstimationRayTracingShader)); } public ComputeShader defragShader @@ -125,18 +83,6 @@ public ComputeShader defragShader set => this.SetValueAndNotify(ref m_DefragShader, value, nameof(m_DefragShader)); } - public ComputeShader risEstimationComputeShader - { - get => m_RisEstimationComputeShader; - set => this.SetValueAndNotify(ref m_RisEstimationComputeShader, value, nameof(m_RisEstimationComputeShader)); - } - - public RayTracingShader risEstimationRayTracingShader - { - get => m_RisEstimationRayTracingShader; - set => this.SetValueAndNotify(ref m_RisEstimationRayTracingShader, value, nameof(m_RisEstimationRayTracingShader)); - } - public ComputeShader scrollingShader { get => m_ScrollingShader; diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/UniformEstimation.hlsl b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/UniformEstimation.hlsl deleted file mode 100644 index 9dbb7d41780..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/UniformEstimation.hlsl +++ /dev/null @@ -1,203 +0,0 @@ -#define PATCH_UTIL_USE_RW_IRRADIANCE_BUFFER - -#include "Common.hlsl" -#include "Packages/com.unity.render-pipelines.core/Runtime/Sampling/QuasiRandom.hlsl" -#include "Packages/com.unity.render-pipelines.core/Runtime/UnifiedRayTracing/Common.hlsl" -#include "PathTracing.hlsl" -#include "Estimation.hlsl" -#include "RingBuffer.hlsl" -#include "PunctualLights.hlsl" - -StructuredBuffer _RingConfigBuffer; -RWStructuredBuffer _PatchIrradiances; -StructuredBuffer _PatchGeometries; -RWStructuredBuffer _PatchStatistics; -StructuredBuffer _CellPatchIndices; -StructuredBuffer _CascadeOffsets; -StructuredBuffer _MaterialEntries; -StructuredBuffer _PunctualLightSamples; -Texture2DArray _AlbedoTextures; -Texture2DArray _TransmissionTextures; -Texture2DArray _EmissionTextures; -SamplerState sampler_EmissionTextures; -SamplerState sampler_AlbedoTextures; -SamplerState sampler_TransmissionTextures; -TextureCube _EnvironmentCubemap; -SamplerState sampler_EnvironmentCubemap; -UNIFIED_RT_DECLARE_ACCEL_STRUCT(_RayTracingAccelerationStructure); - -uint _PunctualLightCount; -uint _FrameIdx; -uint _VolumeSpatialResolution; -uint _CascadeCount; -float _VolumeVoxelMinSize; -uint _MultiBounce; -uint _SampleCount; -float _ShortHysteresis; -uint _RingConfigOffset; -float3 _VolumeTargetPos; -float _MaterialAtlasTexelSize; // The size of 1 texel in the atlases above -float _AlbedoBoost; -uint _PunctualLightSampleCount; -float3 _DirectionalLightDirection; -float3 _DirectionalLightIntensity; - -void ProjectAndAccumulate(inout SphericalHarmonics::RGBL1 accumulator, float3 sample, float3 direction) -{ - accumulator.l0 += sample * SphericalHarmonics::y0; - accumulator.l1s[0] += sample * SphericalHarmonics::y1Constant * direction.y; - accumulator.l1s[1] += sample * SphericalHarmonics::y1Constant * direction.z; - accumulator.l1s[2] += sample * SphericalHarmonics::y1Constant * direction.x; -} - -void SamplePunctualLightBounceRadiance( - inout QrngKronecker rng, - uint patchIdx, - UnifiedRT::RayTracingAccelStruct accelStruct, - UnifiedRT::DispatchInfo dispatchInfo, - PatchUtil::PatchGeometry patchGeo, - inout SphericalHarmonics::RGBL1 accumulator, - inout bool gotValidSamples) -{ - rng.Init(patchIdx, _FrameIdx * _SampleCount); - SphericalHarmonics::RGBL1 radianceAccumulator = (SphericalHarmonics::RGBL1)0; - - uint validSampleCount = 0; - for(uint sampleIdx = 0; sampleIdx < _SampleCount; ++sampleIdx) - { - PunctualLightBounceRadianceSample sample = SamplePunctualLightBounceRadiance( - dispatchInfo, - accelStruct, - _PunctualLightSamples, - _PunctualLightSampleCount, - rng.GetFloat(0), - patchGeo.position, - patchGeo.normal); - - if (!sample.IsValid()) - continue; - - validSampleCount++; - ProjectAndAccumulate(radianceAccumulator, sample.radianceOverDensity, sample.direction); - - rng.NextSample(); - } - - if (validSampleCount != 0) - { - gotValidSamples = true; - const float normalizationFactor = rcp(validSampleCount); - SphericalHarmonics::AddMut(accumulator, SphericalHarmonics::MulPure(radianceAccumulator, normalizationFactor)); - } -} - -void SampleEnvironmentAndDirectionalBounceAndMultiBounceRadiance( - inout QrngKronecker rng, - uint patchIdx, - UnifiedRT::RayTracingAccelStruct accelStruct, - UnifiedRT::DispatchInfo dispatchInfo, - MaterialPoolParamSet matPoolParams, - PatchUtil::PatchGeometry patchGeo, - inout SphericalHarmonics::RGBL1 accumulator, - inout bool gotValidSamples) -{ - rng.Init(patchIdx, _FrameIdx * _SampleCount); - - UnifiedRT::Ray ray; - ray.origin = OffsetRayOrigin(patchGeo.position, patchGeo.normal); - ray.tMin = 0; - ray.tMax = FLT_MAX; - - SphericalHarmonics::RGBL1 radianceAccumulator = (SphericalHarmonics::RGBL1)0; - - uint validSampleCount = 0; - for(uint sampleIdx = 0; sampleIdx < _SampleCount; ++sampleIdx) - { - ray.direction = UniformHemisphereSample(float2(rng.GetFloat(0), rng.GetFloat(1)), patchGeo.normal); - const float3 radiance = IncomingEnviromentAndDirectionalBounceAndMultiBounceRadiance( - dispatchInfo, - accelStruct, - ray, - matPoolParams, - _DirectionalLightDirection, - _DirectionalLightIntensity, - _MultiBounce, - _EnvironmentCubemap, - sampler_EnvironmentCubemap, - _PatchIrradiances, - _CellPatchIndices, - _VolumeSpatialResolution, - _CascadeOffsets, - _VolumeTargetPos, - _CascadeCount, - _VolumeVoxelMinSize); - - if (all(radiance == invalidRadiance)) - continue; - - validSampleCount++; - ProjectAndAccumulate(radianceAccumulator, radiance, ray.direction); - - rng.NextSample(); - } - - if (validSampleCount != 0) - { - gotValidSamples = true; - const float reciprocalDensity = 2.0f * PI; - const float normalizationFactor = reciprocalDensity * rcp(validSampleCount); - SphericalHarmonics::AddMut(accumulator, SphericalHarmonics::MulPure(radianceAccumulator, normalizationFactor)); - } -} - -void Estimate(UnifiedRT::DispatchInfo dispatchInfo) -{ - uint patchIdx = dispatchInfo.dispatchThreadID.x; - - if (!RingBuffer::IsPositionInUse(_RingConfigBuffer, _RingConfigOffset, patchIdx)) - return; - - UnifiedRT::RayTracingAccelStruct accelStruct = UNIFIED_RT_GET_ACCEL_STRUCT(_RayTracingAccelerationStructure); - QrngKronecker rng; - - const PatchUtil::PatchGeometry patchGeo = _PatchGeometries[patchIdx]; - - MaterialPoolParamSet matPoolParams; - matPoolParams.materialEntries = _MaterialEntries; - matPoolParams.albedoTextures = _AlbedoTextures; - matPoolParams.transmissionTextures = _TransmissionTextures; - matPoolParams.emissionTextures = _EmissionTextures; - matPoolParams.emissionSampler = sampler_EmissionTextures; - matPoolParams.albedoSampler = sampler_AlbedoTextures; - matPoolParams.transmissionSampler = sampler_TransmissionTextures; - matPoolParams.atlasTexelSize = _MaterialAtlasTexelSize; - matPoolParams.albedoBoost = _AlbedoBoost; - - SphericalHarmonics::RGBL1 radianceSampleMean = (SphericalHarmonics::RGBL1)0; - bool gotValidSamples = false; - - SampleEnvironmentAndDirectionalBounceAndMultiBounceRadiance( - rng, - patchIdx, - accelStruct, - dispatchInfo, - matPoolParams, - patchGeo, - radianceSampleMean, - gotValidSamples); - - if (_PunctualLightCount != 0) - { - SamplePunctualLightBounceRadiance( - rng, - patchIdx, - accelStruct, - dispatchInfo, - patchGeo, - radianceSampleMean, - gotValidSamples); - } - - if (gotValidSamples) - ProcessAndStoreRadianceSample(_PatchIrradiances, _PatchStatistics, patchIdx, radianceSampleMean, _ShortHysteresis); -} diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/UniformEstimation.hlsl.meta b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/UniformEstimation.hlsl.meta deleted file mode 100644 index e91e79244bc..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/UniformEstimation.hlsl.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 87f25dcc02b54e84ab16e783d04d72d8 -ShaderIncludeImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/UniformEstimation.urtshader b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/UniformEstimation.urtshader deleted file mode 100644 index c6ec22e888b..00000000000 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/UniformEstimation.urtshader +++ /dev/null @@ -1,8 +0,0 @@ -#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal glcore ps5 - -#define UNIFIED_RT_GROUP_SIZE_X 64 -#define UNIFIED_RT_GROUP_SIZE_Y 1 -#define UNIFIED_RT_GROUP_SIZE_Z 1 -#define UNIFIED_RT_RAYGEN_FUNC Estimate - -#include "UniformEstimation.hlsl" diff --git a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/SurfaceCacheGlobalIlluminationEditor.cs b/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/SurfaceCacheGlobalIlluminationEditor.cs index 07563bc2bf2..0afb8877dbf 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/SurfaceCacheGlobalIlluminationEditor.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/SurfaceCacheGlobalIlluminationEditor.cs @@ -11,15 +11,8 @@ internal class SurfaceCacheGlobalIlluminationEditor : Editor { private bool m_IsInitialized; - private SerializedProperty _uniformEstimationSampleCount; - private SerializedProperty _restirEstimationConfidenceCap; - private SerializedProperty _restirEstimationSpatialSampleCount; - private SerializedProperty _restirEstimationSpatialFilterSize; - private SerializedProperty _restirEstimationValidationFrameInterval; - private SerializedProperty _risEstimationCandidateCount; - private SerializedProperty _risEstimationTargetFunctionUpdateWeight; + private SerializedProperty _estimationSampleCount; private SerializedProperty _multiBounce; - private SerializedProperty _estimationMethod; private SerializedProperty _temporalSmoothing; private SerializedProperty _spatialFilterEnabled; private SerializedProperty _spatialFilterSampleCount; @@ -39,15 +32,8 @@ internal class SurfaceCacheGlobalIlluminationEditor : Editor private struct TextContent { - public static GUIContent UniformEstimationSampleCount = EditorGUIUtility.TrTextContent("Sample Count", ""); - public static GUIContent RestirEstimationConfidenceCap = EditorGUIUtility.TrTextContent("Confidence Cap", ""); - public static GUIContent RestirEstimationSpatialSampleCount = EditorGUIUtility.TrTextContent("Spatial Sample Count", ""); - public static GUIContent RestirEstimationSpatialFilterSize = EditorGUIUtility.TrTextContent("Spatial Filter Size", ""); - public static GUIContent RestirEstimationValidationFrameInterval = EditorGUIUtility.TrTextContent("Validation Frame Interval", ""); - public static GUIContent RisEstimationCandidateCount = EditorGUIUtility.TrTextContent("Candidate Count", ""); - public static GUIContent RisEstimationTargetFunctionUpdateWeight = EditorGUIUtility.TrTextContent("Target Function Update Weight", ""); + public static GUIContent EstimationSampleCount = EditorGUIUtility.TrTextContent("Sample Count", ""); public static GUIContent MultiBounce = EditorGUIUtility.TrTextContent("Multi Bounce", ""); - public static GUIContent EstimationMethod = EditorGUIUtility.TrTextContent("Estimation Method", ""); public static GUIContent TemporalSmoothing = EditorGUIUtility.TrTextContent("Temporal Smoothing", ""); public static GUIContent SpatialFilterEnabled = EditorGUIUtility.TrTextContent("Spatial Filter Enabled", ""); @@ -73,48 +59,38 @@ private struct TextContent private void Init() { - SerializedProperty paramSet = serializedObject.FindProperty("_parameterSet"); - - SerializedProperty uniformParamSet = paramSet.FindPropertyRelative("UniformEstimationParams"); - SerializedProperty restirParamSet = paramSet.FindPropertyRelative("RestirEstimationParams"); - SerializedProperty risParamSet = paramSet.FindPropertyRelative("RisEstimationParams"); - SerializedProperty patchFilteringParamSet = paramSet.FindPropertyRelative("PatchFilteringParams"); - SerializedProperty screenFilteringParamSet = paramSet.FindPropertyRelative("ScreenFilteringParams"); - SerializedProperty gridParamSet = paramSet.FindPropertyRelative("GridParams"); - SerializedProperty volumeParamSet = paramSet.FindPropertyRelative("VolumeParams"); - SerializedProperty advancedParamSet = paramSet.FindPropertyRelative("AdvancedParams"); - - _multiBounce = paramSet.FindPropertyRelative("MultiBounce"); - _estimationMethod = paramSet.FindPropertyRelative("EstimationMethod"); - - _uniformEstimationSampleCount = uniformParamSet.FindPropertyRelative("SampleCount"); - _restirEstimationConfidenceCap = restirParamSet.FindPropertyRelative("ConfidenceCap"); - _restirEstimationSpatialSampleCount = restirParamSet.FindPropertyRelative("SpatialSampleCount"); - _restirEstimationSpatialFilterSize = restirParamSet.FindPropertyRelative("SpatialFilterSize"); - _restirEstimationValidationFrameInterval = restirParamSet.FindPropertyRelative("ValidationFrameInterval"); - _risEstimationCandidateCount = risParamSet.FindPropertyRelative("CandidateCount"); - _risEstimationTargetFunctionUpdateWeight = risParamSet.FindPropertyRelative("TargetFunctionUpdateWeight"); - - _temporalSmoothing = patchFilteringParamSet.FindPropertyRelative("TemporalSmoothing"); - _spatialFilterEnabled = patchFilteringParamSet.FindPropertyRelative("SpatialFilterEnabled"); - _spatialFilterSampleCount = patchFilteringParamSet.FindPropertyRelative("SpatialFilterSampleCount"); - _spatialFilterRadius = patchFilteringParamSet.FindPropertyRelative("SpatialFilterRadius"); - _temporalPostFilterEnabled = patchFilteringParamSet.FindPropertyRelative("TemporalPostFilterEnabled"); - - _lookupSampleCount = screenFilteringParamSet.FindPropertyRelative("LookupSampleCount"); - _upsamplingKernelSize = screenFilteringParamSet.FindPropertyRelative("UpsamplingKernelSize"); - _upsamplingSampleCount = screenFilteringParamSet.FindPropertyRelative("UpsamplingSampleCount"); - - _volumeSize = volumeParamSet.FindPropertyRelative("Size"); - _volumeResolution = volumeParamSet.FindPropertyRelative("Resolution"); - _volumeCascadeCount = volumeParamSet.FindPropertyRelative("CascadeCount"); - _volumeMovement = volumeParamSet.FindPropertyRelative("Movement"); - - _debugEnabled = paramSet.FindPropertyRelative("DebugEnabled"); - _debugViewMode = paramSet.FindPropertyRelative("DebugViewMode"); - _debugShowSamplePosition = paramSet.FindPropertyRelative("DebugShowSamplePosition"); - - _defragCount = advancedParamSet.FindPropertyRelative("DefragCount"); + SerializedProperty paramSets = serializedObject.FindProperty("_parameterSet"); + + SerializedProperty estimationParams = paramSets.FindPropertyRelative("EstimationParams"); + SerializedProperty patchFilteringParams = paramSets.FindPropertyRelative("PatchFilteringParams"); + SerializedProperty screenFilteringParams = paramSets.FindPropertyRelative("ScreenFilteringParams"); + SerializedProperty volumeParams = paramSets.FindPropertyRelative("VolumeParams"); + SerializedProperty advancedParams = paramSets.FindPropertyRelative("AdvancedParams"); + + _multiBounce = paramSets.FindPropertyRelative("MultiBounce"); + + _estimationSampleCount = estimationParams.FindPropertyRelative("SampleCount"); + + _temporalSmoothing = patchFilteringParams.FindPropertyRelative("TemporalSmoothing"); + _spatialFilterEnabled = patchFilteringParams.FindPropertyRelative("SpatialFilterEnabled"); + _spatialFilterSampleCount = patchFilteringParams.FindPropertyRelative("SpatialFilterSampleCount"); + _spatialFilterRadius = patchFilteringParams.FindPropertyRelative("SpatialFilterRadius"); + _temporalPostFilterEnabled = patchFilteringParams.FindPropertyRelative("TemporalPostFilterEnabled"); + + _lookupSampleCount = screenFilteringParams.FindPropertyRelative("LookupSampleCount"); + _upsamplingKernelSize = screenFilteringParams.FindPropertyRelative("UpsamplingKernelSize"); + _upsamplingSampleCount = screenFilteringParams.FindPropertyRelative("UpsamplingSampleCount"); + + _volumeSize = volumeParams.FindPropertyRelative("Size"); + _volumeResolution = volumeParams.FindPropertyRelative("Resolution"); + _volumeCascadeCount = volumeParams.FindPropertyRelative("CascadeCount"); + _volumeMovement = volumeParams.FindPropertyRelative("Movement"); + + _debugEnabled = paramSets.FindPropertyRelative("DebugEnabled"); + _debugViewMode = paramSets.FindPropertyRelative("DebugViewMode"); + _debugShowSamplePosition = paramSets.FindPropertyRelative("DebugShowSamplePosition"); + + _defragCount = advancedParams.FindPropertyRelative("DefragCount"); } public override void OnInspectorGUI() @@ -127,31 +103,9 @@ public override void OnInspectorGUI() EditorGUILayout.HelpBox("Enable \"Always Refresh\" in the Scene View to see realtime updates in the Scene View.", MessageType.Info); } - EditorGUILayout.LabelField("Light Transport", EditorStyles.boldLabel); + EditorGUILayout.LabelField("Sampling", EditorStyles.boldLabel); EditorGUILayout.PropertyField(_multiBounce, TextContent.MultiBounce); - EditorGUILayout.PropertyField(_estimationMethod, TextContent.EstimationMethod); - if (_estimationMethod.intValue == (int)SurfaceCacheEstimationMethod.Uniform) - { - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Uniform Estimation", EditorStyles.boldLabel); - EditorGUILayout.IntSlider(_uniformEstimationSampleCount, 1, 32, TextContent.UniformEstimationSampleCount); - } - else if (_estimationMethod.intValue == (int)SurfaceCacheEstimationMethod.Restir) - { - EditorGUILayout.Space(); - EditorGUILayout.LabelField("Restir Estimation", EditorStyles.boldLabel); - EditorGUILayout.IntSlider(_restirEstimationConfidenceCap, 1, 64, TextContent.RestirEstimationConfidenceCap); - EditorGUILayout.IntSlider(_restirEstimationSpatialSampleCount, 0, 8, TextContent.RestirEstimationSpatialSampleCount); - EditorGUILayout.Slider(_restirEstimationSpatialFilterSize, 0.0f, 4.0f, TextContent.RestirEstimationSpatialFilterSize); - EditorGUILayout.IntSlider(_restirEstimationValidationFrameInterval, 2, 8, TextContent.RestirEstimationValidationFrameInterval); - } - else if (_estimationMethod.intValue == (int)SurfaceCacheEstimationMethod.Ris) - { - EditorGUILayout.Space(); - EditorGUILayout.LabelField("SH-Guided Ris Estimation", EditorStyles.boldLabel); - EditorGUILayout.IntSlider(_risEstimationCandidateCount, 2, 64, TextContent.RisEstimationCandidateCount); - EditorGUILayout.Slider(_risEstimationTargetFunctionUpdateWeight, 0.0f, 1.0f, TextContent.RisEstimationTargetFunctionUpdateWeight); - } + EditorGUILayout.IntSlider(_estimationSampleCount, 1, 32, TextContent.EstimationSampleCount); EditorGUILayout.Space(); EditorGUILayout.LabelField("Patch Filtering", EditorStyles.boldLabel); diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/SurfaceCacheGlobalIlluminationRendererFeature/SurfaceCacheGlobalIlluminationRendererFeature.cs b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/SurfaceCacheGlobalIlluminationRendererFeature/SurfaceCacheGlobalIlluminationRendererFeature.cs index 91fe6256dbb..b4f77fb7107 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/SurfaceCacheGlobalIlluminationRendererFeature/SurfaceCacheGlobalIlluminationRendererFeature.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/SurfaceCacheGlobalIlluminationRendererFeature/SurfaceCacheGlobalIlluminationRendererFeature.cs @@ -1175,27 +1175,11 @@ internal static SurfaceCacheWorld.LightDescriptor[] ConvertUnityLightsToLightDes [SerializeField] private ParameterSet _parameterSet = new ParameterSet(); [Serializable] - class UniformEstimationParameterSet + class EstimationParameterSet { public uint SampleCount = 2; } - [Serializable] - class RestirEstimationParameterSet - { - public uint ConfidenceCap = 30; - public uint SpatialSampleCount = 4; - public float SpatialFilterSize = 2.0f; - public uint ValidationFrameInterval = 4; - } - - [Serializable] - class RisEstimationParameterSet - { - public uint CandidateCount = 8; - public float TargetFunctionUpdateWeight = 0.8f; - } - [Serializable] class PatchFilteringParameterSet { @@ -1232,16 +1216,13 @@ class AdvancedParameterSet [Serializable] class ParameterSet { - public SurfaceCacheEstimationMethod EstimationMethod = SurfaceCacheEstimationMethod.Uniform; public bool MultiBounce = true; - [SerializeField] public UniformEstimationParameterSet UniformEstimationParams = new UniformEstimationParameterSet(); - [SerializeField] public RestirEstimationParameterSet RestirEstimationParams = new RestirEstimationParameterSet(); - [SerializeField] public RisEstimationParameterSet RisEstimationParams = new RisEstimationParameterSet(); + public EstimationParameterSet EstimationParams = new EstimationParameterSet(); public PatchFilteringParameterSet PatchFilteringParams = new PatchFilteringParameterSet(); - [SerializeField] public ScreenFilteringParameterSet ScreenFilteringParams = new ScreenFilteringParameterSet(); - [SerializeField] public VolumeParameterSet VolumeParams = new VolumeParameterSet(); - [SerializeField] public AdvancedParameterSet AdvancedParams = new AdvancedParameterSet(); + public ScreenFilteringParameterSet ScreenFilteringParams = new ScreenFilteringParameterSet(); + public VolumeParameterSet VolumeParams = new VolumeParameterSet(); + public AdvancedParameterSet AdvancedParams = new AdvancedParameterSet(); public bool DebugEnabled = false; public DebugViewMode_ DebugViewMode = DebugViewMode_.CellIndex; @@ -1294,15 +1275,8 @@ public override void Create() var estimationParams = new SurfaceCacheEstimationParameterSet { - Method = _parameterSet.EstimationMethod, MultiBounce = _parameterSet.MultiBounce, - RestirEstimationConfidenceCap = _parameterSet.RestirEstimationParams.ConfidenceCap, - RestirEstimationSpatialSampleCount = _parameterSet.RestirEstimationParams.SpatialSampleCount, - RestirEstimationSpatialFilterSize = _parameterSet.RestirEstimationParams.SpatialFilterSize, - RestirEstimationValidationFrameInterval = _parameterSet.RestirEstimationParams.ValidationFrameInterval, - UniformEstimationSampleCount = _parameterSet.UniformEstimationParams.SampleCount, - RisEstimationCandidateCount = _parameterSet.RisEstimationParams.CandidateCount, - RisEstimationTargetFunctionUpdateWeight = _parameterSet.RisEstimationParams.TargetFunctionUpdateWeight + SampleCount = _parameterSet.EstimationParams.SampleCount, }; var patchFilteringParams = new SurfaceCachePatchFilteringParameterSet From 41f88b27944c98f9e49be639ba616cbd7064b2aa Mon Sep 17 00:00:00 2001 From: Aljosha Demeulemeester Date: Wed, 7 Jan 2026 22:50:18 +0000 Subject: [PATCH 08/43] Fix issue with depth priming where intermediate textures are not requested when needing a depth copy --- .../Runtime/UniversalRendererRenderGraph.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererRenderGraph.cs b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererRenderGraph.cs index 3226bd3b3ad..c35cee77d54 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererRenderGraph.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererRenderGraph.cs @@ -675,7 +675,7 @@ internal override void OnRecordRenderGraph(RenderGraph renderGraph, ScriptableRe bool requirePrepass = requirePrepassForTextures || useDepthPriming; // Only use a depth format when we do a prepass directly the cameraDepthTexture. If we do depth priming (ie, prepass to the activeCameraDepth), we don't do a prepass to the texture. Instead, we do a copy from the primed attachment. - bool prepassToCameraDepthTexture = requirePrepassForTextures && !usesDeferredLighting; + bool prepassToCameraDepthTexture = requirePrepassForTextures && !usesDeferredLighting && !useDepthPriming; bool depthTextureIsDepthFormat = prepassToCameraDepthTexture; bool requireCopyFromDepth = renderPassInputs.requiresDepthTexture && !prepassToCameraDepthTexture; From 110819ecd08285bf1df899dfb8d8e8270588d156 Mon Sep 17 00:00:00 2001 From: Giulia Canu Date: Thu, 8 Jan 2026 08:02:33 +0000 Subject: [PATCH 09/43] Add info message for light loop unroll shader improvement for Meta Platforms --- .../UniversalRenderPipelineAssetUI.Drawers.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Packages/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineAsset/UniversalRenderPipelineAssetUI.Drawers.cs b/Packages/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineAsset/UniversalRenderPipelineAssetUI.Drawers.cs index e6a3645e5ee..e81e65cc403 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineAsset/UniversalRenderPipelineAssetUI.Drawers.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineAsset/UniversalRenderPipelineAssetUI.Drawers.cs @@ -497,6 +497,12 @@ static void DrawLighting(SerializedUniversalRenderPipelineAsset serialized, Edit disableGroup = serialized.additionalLightsRenderingModeProp.intValue == (int)LightRenderingMode.Disabled; EditorGUI.BeginDisabledGroup(disableGroup); serialized.additionalLightsPerObjectLimitProp.intValue = EditorGUILayout.IntSlider(Styles.perObjectLimit, serialized.additionalLightsPerObjectLimitProp.intValue, 0, UniversalRenderPipeline.maxPerObjectLights); +#if UNITY_META_QUEST + if (serialized.additionalLightsPerObjectLimitProp.intValue > 1) + { + EditorGUILayout.HelpBox("When targeting Meta Quest, setting the Per Object Limit to 1 will improve shader performance.", MessageType.Info); + } +#endif EditorGUI.EndDisabledGroup(); disableGroup |= (serialized.additionalLightsPerObjectLimitProp.intValue == 0 || serialized.additionalLightsRenderingModeProp.intValue != (int)LightRenderingMode.PerPixel); From 46835c5d07198d84fd3a8eda61bcc1dd9c31aac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Carr=C3=A8re?= Date: Thu, 8 Jan 2026 08:02:36 +0000 Subject: [PATCH 10/43] docg-7366: Fix links --- Packages/com.unity.shadergraph/Documentation~/Graph-Target.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md b/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md index 652b6b20eb4..05e4feb18b6 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md +++ b/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md @@ -10,7 +10,7 @@ Target Settings are specific to each Target, and can vary between assets dependi Typically, each Target you select generates a valid subshader from the graph. For example, a Shader Graph asset with both URP and HDRP Targets will generate two subshaders. When you use a graph that targets multiple render pipelines, you must reimport the Shader Graph asset if you change the active render pipeline. This updates the Material Inspector for any Materials that use your graph. -Shader Graph supports three targets: the [Universal Render Pipeline](https://docs.unity3d.com/Manual/urp/urp-introduction.html), the [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@12.0/manual/index.html), and the [Built-In Render Pipeline](https://docs.unity3d.com/2020.3/Documentation/Manual/render-pipelines). +Shader Graph supports three targets: the [Universal Render Pipeline](https://docs.unity3d.com/Manual/urp/urp-introduction.html), the [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html?subfolder=/manual/), and the [Built-In Render Pipeline](https://docs.unity3d.com/Documentation/Manual/built-in-render-pipeline.html). Not all blocks are compatible with all targets. If a block in your graph becomes inactive when you choose a target, that block is not compatible with that target. From d0d8edfa36d0448e5431beebb4337c4f3091f558 Mon Sep 17 00:00:00 2001 From: Yvain Raeymaekers Date: Thu, 8 Jan 2026 08:02:39 +0000 Subject: [PATCH 11/43] [UUM-131484] Fixed missing icon when creating a Unified Ray Tracing Shader --- .../Editor/UnifiedRayTracing/CreateUnifiedRTShaderMenuItem.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/CreateUnifiedRTShaderMenuItem.cs b/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/CreateUnifiedRTShaderMenuItem.cs index 51aad347df4..415e80f192a 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/CreateUnifiedRTShaderMenuItem.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/UnifiedRayTracing/CreateUnifiedRTShaderMenuItem.cs @@ -7,11 +7,13 @@ namespace UnityEditor.Rendering.UnifiedRayTracing { internal class ShaderTemplates { + internal static readonly Texture2D shaderIcon = EditorGUIUtility.IconContent("d_TextAsset Icon").image as Texture2D; + [MenuItem("Assets/Create/Shader/Unified Ray Tracing Shader", false, 1)] internal static void CreateNewUnifiedRayTracingShader() { var action = ScriptableObject.CreateInstance(); - ProjectWindowUtil.StartNameEditingIfProjectWindowExists(EntityId.None, action, "NewUnifiedRayTracingShader.urtshader", null, null); + ProjectWindowUtil.StartNameEditingIfProjectWindowExists(EntityId.None, action, "NewUnifiedRayTracingShader.urtshader", shaderIcon, null); } internal class DoCreateUnifiedRayTracingShader : AssetCreationEndAction From 24f4b024b7b835f9b7c8d9b0f9e3b5b371322956 Mon Sep 17 00:00:00 2001 From: Mark Green Date: Thu, 8 Jan 2026 11:40:13 +0000 Subject: [PATCH 12/43] DOCG-8269 Remove typo in HDRP Fog Volume docs --- .../Documentation~/fog-volume-master-stack-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/fog-volume-master-stack-reference.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/fog-volume-master-stack-reference.md index b2b0243f3f8..fe1d79b9f6b 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/fog-volume-master-stack-reference.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/fog-volume-master-stack-reference.md @@ -68,4 +68,4 @@ These settings appear when you select the Fog’s material in the Asset window. | **Fog Volume options** | | | | | **Single Scattering Albedo** | Control the color of each fog particle. The fog’s density doesn’t affect this color. | | | **Fog Distance** | Control how far you can see through the fog in meters. This controls how far the light passes through fog to affect how opaque it appears. A value of 0 makes the fog appear opaque. | -| | **Blend mode** | Determine how this fog shader blends with existing fog in the scene. This property overwrites the Blend mode you set in the Surface Options:
• **Overwrite:** Replaces existing fog in the volume area with this fog shader.Presented **content strategy** initiatives to leads in key team meetings.•**Additive:** Adds the color and density of this fog shader to other fog in the scene. This is the default value.
**Multiply:** Multiplies the color and density of this fog shader with other fog in the scene. You can use this to create effects relative to a specific fog density.
• **Min:** Determines the minimum density value of this fog shader and the scene fog inside its bounding box. For example, a value of 0 appears to remove fog in a certain area.
• **Max:** Determines the maximum density value of this fog shader and the scene fog inside its bounding box. | +| | **Blend mode** | Determine how this fog shader blends with existing fog in the scene. This property overwrites the Blend mode you set in the Surface Options:
• **Overwrite:** Replaces existing fog in the volume area with this fog shader.
•**Additive:** Adds the color and density of this fog shader to other fog in the scene. This is the default value.
**Multiply:** Multiplies the color and density of this fog shader with other fog in the scene. You can use this to create effects relative to a specific fog density.
• **Min:** Determines the minimum density value of this fog shader and the scene fog inside its bounding box. For example, a value of 0 appears to remove fog in a certain area.
• **Max:** Determines the maximum density value of this fog shader and the scene fog inside its bounding box. | From 004027d8cdb8bca5c3dc8656782bbcf87f1da5a6 Mon Sep 17 00:00:00 2001 From: Yohann Vaast Date: Fri, 9 Jan 2026 10:35:09 +0000 Subject: [PATCH 13/43] Fix for "Trying to load color backbuffer into a complex RenderPass setup, results undefined." --- .../Compiler/NativePassCompiler.Debug.cs | 4 + .../RenderGraph/Compiler/PassesData.cs | 39 +++++ .../RenderGraph/Compiler/ResourcesData.cs | 26 ++-- .../RenderGraphResourceRegistry.cs | 10 +- .../RenderGraph/RenderGraphResources.cs | 1 + .../NativePassCompilerRenderGraphTests.cs | 126 +++++++++------ .../Tests/Editor/RenderGraphTests.cs | 145 +++++++++++++++++- .../Runtime/Passes/CopyColorPass.cs | 4 +- .../FullScreenPassRendererFeature.cs | 26 ---- 9 files changed, 286 insertions(+), 95 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.Debug.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.Debug.cs index a1f1df72cd0..1bf92afcdb0 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.Debug.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.Debug.cs @@ -108,6 +108,10 @@ internal static string MakePassMergeMessage(CompilerContextData ctx, in PassData case PassBreakReason.PassMergingDisabled: message += "The pass merging is disabled."; break; + case PassBreakReason.BackbufferInMultipleRenderTargetsNotSupported: + message += "Mixing backbuffer and custom render textures is not supported on this platform " + + "(see SystemInfo.supportsBackbufferInMultipleRenderTargets)."; + break; default: throw new ArgumentOutOfRangeException(); } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/PassesData.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/PassesData.cs index b9aece61b79..fe5d7fd665a 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/PassesData.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/PassesData.cs @@ -611,6 +611,7 @@ internal enum PassBreakReason MultisampledShaderResolveMustBeLastPass, // The current pass has MultisampledShaderResolve specified and so must be the last pass ExtendedFeatureFlagsIncompatible, // Handles the case where flags added via SetExtendedFeatureFlags are not compatible PassMergingDisabled, // Wasn't merged because pass merging is disabled + BackbufferInMultipleRenderTargetsNotSupported, // Prevent RG pass merging if one pass targets the backbuffer and the other pass some user render targets Merged, // I actually got merged Count @@ -649,6 +650,7 @@ public PassBreakAudit(PassBreakReason reason, int breakPass) "The current merged pass uses multisampled shader resolve and so can't have any more passes merged into it.", "Extended feature flags are incompatible", "Pass merging is disabled so this pass was not merged", + "One pass targets the backbuffer while the other pass targets some user texture, this is not supported on this platform.", "The next pass got merged into this pass.", }; } @@ -862,6 +864,7 @@ public static PassBreakAudit CanMerge(CompilerContextData contextData, int activ if (nativePass.hasDepth && passToMerge.fragmentInfoHasDepth) { ref readonly var firstFragment = ref contextData.fragmentData.ElementAt(passToMerge.firstFragment); + if (nativePass.fragments[0].resource.index != firstFragment.resource.index) { return new PassBreakAudit(PassBreakReason.DifferentDepthTextures, passIdToMerge); @@ -1048,10 +1051,46 @@ public static PassBreakAudit CanMerge(CompilerContextData contextData, int activ return new PassBreakAudit(PassBreakReason.SubPassLimitReached, passIdToMerge); } + var compatibleAttachments = CanMergeBackBufferAndCustomRenderTargets(contextData, ref nativePass, ref passToMerge, passIdToMerge); + if (!compatibleAttachments) + { + return new PassBreakAudit(PassBreakReason.BackbufferInMultipleRenderTargetsNotSupported, passIdToMerge); + } + // All is good! Pass can be merged into active native pass return new PassBreakAudit(PassBreakReason.Merged, passIdToMerge); } + static bool CanMergeBackBufferAndCustomRenderTargets(CompilerContextData contextData, ref NativePassData nativePass, ref PassData passToMerge, int passIdToMerge) + { + if (SystemInfo.supportsBackbufferInMultipleRenderTargets) + return true; + + var hasBackBuffer = false; + var hasCustomRenderTarget = false; + + foreach (ref readonly var graphPassFragment in passToMerge.Fragments(contextData)) + { + var isBackBuffer = contextData.UnversionedResourceData(graphPassFragment.resource).isBackBuffer; + + hasBackBuffer |= isBackBuffer; + hasCustomRenderTarget |= !isBackBuffer; + } + + for (int i = 0; i < nativePass.fragments.size; ++i) + { + var isBackBuffer = contextData.UnversionedResourceData(nativePass.fragments[i].resource).isBackBuffer; + + hasBackBuffer |= isBackBuffer; + hasCustomRenderTarget |= !isBackBuffer; + + if (hasBackBuffer && hasCustomRenderTarget) + return false; + } + + return true; + } + static bool TotalAttachmentsSizeExceedPixelStorageLimit(CompilerContextData contextData, ref NativePassData nativePass, ref FixedAttachmentArray attachmentsToTryAdding) { // TODO: We are currently only checking for iOS GPU Family 1 to 3 since the storage size is much more restricted (16 bytes for Family 1 and 32 for Family 2 & 3). diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/ResourcesData.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/ResourcesData.cs index 37685bbe3b0..1b5781e7b97 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/ResourcesData.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/ResourcesData.cs @@ -43,16 +43,17 @@ internal struct ResourceUnversionedData public readonly bool clear; // graph.m_Resources.GetTextureResourceDesc(fragment.resource).clearBuffer; public readonly bool discard; // graph.m_Resources.GetTextureResourceDesc(fragment.resource).discardBuffer; public readonly bool bindMS; + public readonly bool isBackBuffer; public TextureUVOriginSelection textureUVOrigin; [MethodImpl(MethodImplOptions.AggressiveInlining)] public string GetName(CompilerContextData ctx, in ResourceHandle h) => ctx.GetResourceName(h); - public ResourceUnversionedData(TextureResource rll, ref RenderTargetInfo info, ref TextureDesc desc, bool isResourceShared) + public ResourceUnversionedData(TextureResource rll, ref RenderTargetInfo info, ref TextureDesc desc, bool isResBackBuffer) { isImported = rll.imported; - isShared = isResourceShared; + isShared = false; tag = 0; firstUsePassID = -1; lastUsePassID = -1; @@ -69,16 +70,17 @@ public ResourceUnversionedData(TextureResource rll, ref RenderTargetInfo info, r clear = desc.clearBuffer; discard = desc.discardBuffer; bindMS = info.bindMS; + isBackBuffer = isResBackBuffer; textureUVOrigin = rll.textureUVOrigin; graphicsFormat = desc.format; } - public ResourceUnversionedData(IRenderGraphResource rll, ref BufferDesc _, bool isResourceShared) + public ResourceUnversionedData(IRenderGraphResource rll, ref BufferDesc _, bool isResBackBuffer) { // We don't do anything with the BufferDesc for now. The compiler doesn't really need the details of the buffer like it does with textures // since for textures it needs the details to merge passes etc. Which is not relevant for buffers. isImported = rll.imported; - isShared = isResourceShared; + isShared = false; tag = 0; firstUsePassID = -1; lastUsePassID = -1; @@ -95,16 +97,17 @@ public ResourceUnversionedData(IRenderGraphResource rll, ref BufferDesc _, bool clear = false; discard = false; bindMS = false; + isBackBuffer = isResBackBuffer; textureUVOrigin = TextureUVOriginSelection.Unknown; graphicsFormat = GraphicsFormat.None; } - public ResourceUnversionedData(IRenderGraphResource rll, ref RayTracingAccelerationStructureDesc _, bool isResourceShared) + public ResourceUnversionedData(IRenderGraphResource rll, ref RayTracingAccelerationStructureDesc _, bool isResBackBuffer) { // We don't do anything with the RayTracingAccelerationStructureDesc for now. The compiler doesn't really need the details of the acceleration structures like it does with textures // since for textures it needs the details to merge passes etc. Which is not relevant for acceleration structures. isImported = rll.imported; - isShared = isResourceShared; + isShared = false; tag = 0; firstUsePassID = -1; lastUsePassID = -1; @@ -121,6 +124,7 @@ public ResourceUnversionedData(IRenderGraphResource rll, ref RayTracingAccelerat clear = false; discard = false; bindMS = false; + isBackBuffer = isResBackBuffer; textureUVOrigin = TextureUVOriginSelection.Unknown; graphicsFormat = GraphicsFormat.None; } @@ -294,25 +298,27 @@ public void Initialize(RenderGraphResourceRegistry resources) var tex = rll as TextureResource; resources.GetRenderTargetInfo(h, out var info); ref var desc = ref tex.desc; - bool isResourceShared = resources.IsRenderGraphResourceShared(h); + bool isBackBuffer = resources.IsRenderGraphResourceBackBuffer(h); - unversionedData[t][r] = new ResourceUnversionedData(tex, ref info, ref desc, isResourceShared); + unversionedData[t][r] = new ResourceUnversionedData(tex, ref info, ref desc, isBackBuffer); break; } case (int)RenderGraphResourceType.Buffer: { ref var desc = ref (rll as BufferResource).desc; bool isResourceShared = resources.IsRenderGraphResourceShared(h); + bool isBackBuffer = resources.IsRenderGraphResourceBackBuffer(h); - unversionedData[t][r] = new ResourceUnversionedData(rll, ref desc, isResourceShared); + unversionedData[t][r] = new ResourceUnversionedData(rll, ref desc, isBackBuffer); break; } case (int)RenderGraphResourceType.AccelerationStructure: { ref var desc = ref (rll as RayTracingAccelerationStructureResource).desc; bool isResourceShared = resources.IsRenderGraphResourceShared(h); + bool isBackBuffer = resources.IsRenderGraphResourceBackBuffer(h); - unversionedData[t][r] = new ResourceUnversionedData(rll, ref desc, isResourceShared); + unversionedData[t][r] = new ResourceUnversionedData(rll, ref desc, isBackBuffer); break; } default: diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceRegistry.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceRegistry.cs index a1cb9aebe0c..1ffefcf7cb7 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceRegistry.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceRegistry.cs @@ -66,7 +66,6 @@ public struct ImportResourceParams /// Fully discarding both multisampled and resolved data is not currently possible. ///
public bool discardOnLastUse; - /// /// The uv orientation that should be used by texture resources imported into the rendergraph. /// @@ -391,6 +390,13 @@ internal bool IsRenderGraphResourceImported(in ResourceHandle res) return m_RenderGraphResources[res.iType].resourceArray[res.index].imported; } + internal bool IsRenderGraphResourceBackBuffer(in ResourceHandle res) + { + CheckHandleValidity(res); + + return m_RenderGraphResources[res.iType].resourceArray[res.index].isBackBuffer; + } + internal bool IsRenderGraphResourceShared(RenderGraphResourceType type, int index) { CheckHandleValidity(type, index); @@ -484,6 +490,7 @@ internal TextureHandle ImportTexture(in RTHandle rt, in ImportResourceParams imp texResource.desc.clearColor = importParams.clearColor; texResource.desc.discardBuffer = importParams.discardOnLastUse; texResource.textureUVOrigin = (TextureUVOriginSelection)importParams.textureUVOrigin; + texResource.isBackBuffer = (rt != null) ? rt.m_NameID == BuiltinRenderTextureType.CameraTarget || rt.m_NameID == BuiltinRenderTextureType.Depth : false; var texHandle = new TextureHandle(newHandle, false, isBuiltin); @@ -504,6 +511,7 @@ internal TextureHandle ImportTexture(in RTHandle rt, RenderTargetInfo info, in I texResource.imported = true; // Be sure to clear the desc to the default state texResource.desc = new TextureDesc(); + texResource.isBackBuffer = rt.m_NameID == BuiltinRenderTextureType.CameraTarget || rt.m_NameID == BuiltinRenderTextureType.Depth; // Apparently existing code tries to import null textures !?? So we sort of allow them then :( if (rt != null) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResources.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResources.cs index 4f93f130107..36920a1c17f 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResources.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResources.cs @@ -136,6 +136,7 @@ class IRenderGraphResource public int cachedHash; public int transientPassIndex; public int sharedResourceLastFrameUsed; + public bool isBackBuffer; [MethodImpl(MethodImplOptions.AggressiveInlining)] public virtual void Reset(IRenderGraphResourcePool _ = null) diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/NativePassCompilerRenderGraphTests.cs b/Packages/com.unity.render-pipelines.core/Tests/Editor/NativePassCompilerRenderGraphTests.cs index 8f961ade5e0..b8a52e84ae6 100644 --- a/Packages/com.unity.render-pipelines.core/Tests/Editor/NativePassCompilerRenderGraphTests.cs +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/NativePassCompilerRenderGraphTests.cs @@ -18,11 +18,11 @@ class RenderGraphTestPassData public BufferHandle[] buffers = new BufferHandle[8]; } - TextureDesc SimpleTextureDesc(string name, int w, int h, int samples) + TextureDesc SimpleTextureDesc(string name, int w, int h, int samples, GraphicsFormat graphicsFormat) { TextureDesc result = new TextureDesc(w, h); result.msaaSamples = (MSAASamples)samples; - result.format = GraphicsFormat.R8G8B8A8_UNorm; + result.format = graphicsFormat; result.name = name; return result; } @@ -36,6 +36,7 @@ class TestRenderTargets public TextureHandle extraDepthBufferBottomLeft; public TextureHandle extraTextureBottomLeft; public TextureHandle extraTextureTopLeft; + public TextureHandle extraTextureDepth; }; TestRenderTargets ImportAndCreateRenderTargets(RenderGraph g) @@ -74,9 +75,11 @@ TestRenderTargets ImportAndCreateRenderTargets(RenderGraph g) for (int i = 0; i < result.extraTextures.Length; i++) { - result.extraTextures[i] = g.CreateTexture(SimpleTextureDesc("ExtraTexture" + i, 1024, 768, 1)); + result.extraTextures[i] = g.CreateTexture(SimpleTextureDesc("ExtraTexture" + i, 1024, 768, 1, GraphicsFormat.R8G8B8A8_UNorm)); } + result.extraTextureDepth = g.CreateTexture(SimpleTextureDesc("ExtraDepthTexture", 1024, 768, 1, GraphicsFormat.D24_UNorm)); + importParams.textureUVOrigin = TextureUVOrigin.TopLeft; result.extraTextureTopLeft = g.ImportTexture(extraTextureTopLeftHandle, importInfo, importParams); importParams.textureUVOrigin = TextureUVOrigin.BottomLeft; @@ -113,27 +116,30 @@ public void SimpleMergePasses() // Render something to 0,1 using (var builder = g.AddRasterRenderPass("TestPass0", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[1], 1, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } // Render extra bits to 1 using (var builder = g.AddRasterRenderPass("TestPass1", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } // Render to final buffer using (var builder = g.AddRasterRenderPass("TestPass2", out var passData)) { builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[1], 1, AccessFlags.Write); - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); - builder.SetRenderAttachment(renderTargets.backBuffer, 2, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); + builder.SetRenderAttachment(renderTargets.extraTextures[2], 2, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } var result = g.CompileNativeRenderGraph(g.ComputeGraphHash()); @@ -144,7 +150,7 @@ public void SimpleMergePasses() Assert.AreEqual(3, passes[0].numGraphPasses); ref var firstAttachment = ref passes[0].attachments[0]; - Assert.AreEqual(RenderBufferLoadAction.Load, firstAttachment.loadAction); + Assert.AreEqual(RenderBufferLoadAction.Clear, firstAttachment.loadAction); ref var secondAttachment = ref passes[0].attachments[1]; Assert.AreEqual(RenderBufferLoadAction.Clear, secondAttachment.loadAction); @@ -153,7 +159,7 @@ public void SimpleMergePasses() Assert.AreEqual(RenderBufferLoadAction.Clear, thirdAttachment.loadAction); ref var fourthAttachment = ref passes[0].attachments[3]; - Assert.AreEqual(RenderBufferLoadAction.Load, fourthAttachment.loadAction); + Assert.AreEqual(RenderBufferLoadAction.Clear, fourthAttachment.loadAction); } /*[Test] @@ -210,7 +216,7 @@ public void MergeDepthPassWithNoDepthPass() // depth using (var builder = g.AddRasterRenderPass("TestPass0", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraDepthBuffer, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); } @@ -219,7 +225,7 @@ public void MergeDepthPassWithNoDepthPass() using (var builder = g.AddRasterRenderPass("TestPass1", out var passData)) { builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Write); - builder.SetRenderAttachment(renderTargets.backBuffer, 2, AccessFlags.Write); + builder.SetRenderAttachment(renderTargets.extraTextures[1], 2, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); } @@ -275,7 +281,7 @@ public void MergeMultiplePassesDifferentDepth() // with depth using (var builder = g.AddRasterRenderPass("TestPass1", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraDepthBuffer, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); } @@ -284,7 +290,7 @@ public void MergeMultiplePassesDifferentDepth() using (var builder = g.AddRasterRenderPass("TestPass2", out var passData)) { builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Write); - builder.SetRenderAttachment(renderTargets.backBuffer, 2, AccessFlags.Write); + builder.SetRenderAttachment(renderTargets.extraTextures[1], 2, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); } @@ -334,15 +340,17 @@ public void MergePassWithWriteAllPass() // Render something to depth using (var builder = g.AddRasterRenderPass("TestPass0", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } // Merge pass, render with WriteAll in extra 0 using (var builder = g.AddRasterRenderPass("TestPass1", out var passData)) { builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.WriteAll); - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } var result = g.CompileNativeRenderGraph(g.ComputeGraphHash()); @@ -352,11 +360,11 @@ public void MergePassWithWriteAllPass() Assert.AreEqual(2, passes[0].numGraphPasses); // Validate attachments - Assert.AreEqual(renderTargets.depthBuffer.handle.index, passes[0].attachments[0].handle.index); + Assert.AreEqual(renderTargets.extraTextureDepth.handle.index, passes[0].attachments[0].handle.index); Assert.AreEqual(renderTargets.extraTextures[0].handle.index, passes[0].attachments[1].handle.index); ref var depthAttachment = ref passes[0].attachments[0]; - Assert.AreEqual(RenderBufferLoadAction.Load, depthAttachment.loadAction); + Assert.AreEqual(RenderBufferLoadAction.Clear, depthAttachment.loadAction); ref var extraAttachment = ref passes[0].attachments[1]; Assert.AreEqual(RenderBufferLoadAction.DontCare, extraAttachment.loadAction); @@ -372,16 +380,18 @@ public void MergeWriteAllPassWithReadPass() // Render something to extra 0 using (var builder = g.AddRasterRenderPass("TestPass0", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.WriteAll); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } // Read from extra 0 using (var builder = g.AddRasterRenderPass("TestPass1", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetInputAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Read); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } var result = g.CompileNativeRenderGraph(g.ComputeGraphHash()); @@ -391,11 +401,11 @@ public void MergeWriteAllPassWithReadPass() Assert.AreEqual(2, passes[0].numGraphPasses); // Validate attachments - Assert.AreEqual(renderTargets.depthBuffer.handle.index, passes[0].attachments[0].handle.index); + Assert.AreEqual(renderTargets.extraTextureDepth.handle.index, passes[0].attachments[0].handle.index); Assert.AreEqual(renderTargets.extraTextures[0].handle.index, passes[0].attachments[1].handle.index); ref var depthAttachment = ref passes[0].attachments[0]; - Assert.AreEqual(RenderBufferLoadAction.Load, depthAttachment.loadAction); + Assert.AreEqual(RenderBufferLoadAction.Clear, depthAttachment.loadAction); ref var extraAttachment = ref passes[0].attachments[1]; Assert.AreEqual(RenderBufferLoadAction.DontCare, extraAttachment.loadAction); @@ -411,16 +421,18 @@ public void MergeReadPassWithWriteAllPass() // Render something to 0,1 using (var builder = g.AddRasterRenderPass("TestPass0", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Read); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } // Render to final buffer using (var builder = g.AddRasterRenderPass("TestPass1", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.WriteAll); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } var result = g.CompileNativeRenderGraph(g.ComputeGraphHash()); @@ -430,11 +442,11 @@ public void MergeReadPassWithWriteAllPass() Assert.AreEqual(2, passes[0].numGraphPasses); // Validate attachments - Assert.AreEqual(renderTargets.depthBuffer.handle.index, passes[0].attachments[0].handle.index); + Assert.AreEqual(renderTargets.extraTextureDepth.handle.index, passes[0].attachments[0].handle.index); Assert.AreEqual(renderTargets.extraTextures[0].handle.index, passes[0].attachments[1].handle.index); ref var depthAttachment = ref passes[0].attachments[0]; - Assert.AreEqual(RenderBufferLoadAction.Load, depthAttachment.loadAction); + Assert.AreEqual(RenderBufferLoadAction.Clear, depthAttachment.loadAction); // LoadAction is Clear because it was not used by another pass before, in other case it should be Load ref var extraAttachment = ref passes[0].attachments[1]; @@ -451,28 +463,31 @@ public void MergeDiscardPassWithWrite() // Discard extra 0 using (var builder = g.AddRasterRenderPass("TestPass0", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Discard); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } // Read extra 0 using (var builder = g.AddRasterRenderPass("TestPass1", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Read); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } // Write to extra 0 using (var builder = g.AddRasterRenderPass("TestPass2", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } // break pass using another depth, Read extra 0 using (var builder = g.AddRasterRenderPass("TestPass1", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.extraDepthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Read); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); } @@ -484,12 +499,12 @@ public void MergeDiscardPassWithWrite() Assert.AreEqual(3, passes[0].numGraphPasses); // Validate attachments - Assert.AreEqual(renderTargets.depthBuffer.handle.index, passes[0].attachments[0].handle.index); + Assert.AreEqual(renderTargets.extraTextureDepth.handle.index, passes[0].attachments[0].handle.index); Assert.AreEqual(renderTargets.extraTextures[0].handle.index, passes[0].attachments[1].handle.index); Assert.AreEqual(renderTargets.extraTextures[0].handle.index, passes[1].attachments[1].handle.index); ref var depthAttachment = ref passes[0].attachments[0]; - Assert.AreEqual(RenderBufferLoadAction.Load, depthAttachment.loadAction); + Assert.AreEqual(RenderBufferLoadAction.Clear, depthAttachment.loadAction); // As we have a discard flag in the pass the LoadAction is DontCare, but as it has also a Write flag it should Store the result for the next pass ref var extraAttachmentPass0 = ref passes[0].attachments[1]; @@ -498,7 +513,6 @@ public void MergeDiscardPassWithWrite() ref var extraAttachmentPass1 = ref passes[1].attachments[1]; Assert.AreEqual(RenderBufferLoadAction.Load, extraAttachmentPass1.loadAction); - } [Test] @@ -729,9 +743,10 @@ public void NativeSubPassesLimitNotExceeded() using (var builder = g.AddRasterRenderPass($"TestPass_{i}", out var passData)) { builder.SetInputAttachment(renderTargets.extraTextures[1 - i % 2], 0); - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth); builder.SetRenderAttachment(renderTargets.extraTextures[i % 2], 1); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } } @@ -753,27 +768,30 @@ public void AllocateFreeInMergedPassesWorks() // Render something to extra 0 using (var builder = g.AddRasterRenderPass("TestPass0", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } // Render extra bits to extra 1, this causes 1 to be allocated in pass 1 which will be the first sub pass of the merged native pass using (var builder = g.AddRasterRenderPass("TestPass1", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[1], 0, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } // Render extra bits to extra 2, this causes 2 to be allocated in pass 2 which will be the second sub pass of the merged native pass // It's also the last time extra 1 is used so it gets freed using (var builder = g.AddRasterRenderPass("TestPass2", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[1], 0, AccessFlags.ReadWrite); builder.SetRenderAttachment(renderTargets.extraTextures[2], 1, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } // Render to final buffer @@ -781,9 +799,10 @@ public void AllocateFreeInMergedPassesWorks() { builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[2], 1, AccessFlags.Write); - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); - builder.SetRenderAttachment(renderTargets.backBuffer, 2, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); + builder.SetRenderAttachment(renderTargets.extraTextures[3], 2, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } var result = g.CompileNativeRenderGraph(g.ComputeGraphHash()); @@ -810,7 +829,6 @@ public void AllocateFreeInMergedPassesWorks() Assert.AreEqual(1, lastUsed.Count); Assert.AreEqual(renderTargets.extraTextures[1].handle.index, lastUsed[0].index); - } [Test] @@ -823,18 +841,20 @@ public void MemorylessWorks() // Render something to extra 0 using (var builder = g.AddRasterRenderPass("TestPass0", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } // Render to final buffer using (var builder = g.AddRasterRenderPass("TestPass2", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.ReadWrite); - builder.SetRenderAttachment(renderTargets.backBuffer, 1, AccessFlags.Write); + builder.SetRenderAttachment(renderTargets.extraTextures[1], 1, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } var result = g.CompileNativeRenderGraph(g.ComputeGraphHash()); @@ -876,22 +896,24 @@ public void InputAttachmentsWork() // Render something to extra 0,1,2 using (var builder = g.AddRasterRenderPass("TestPass0", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[1], 1, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[2], 2, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } // Render to final buffer using extra 0 as attachment using (var builder = g.AddRasterRenderPass("TestPass2", out var passData)) { - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.ReadWrite); - builder.SetRenderAttachment(renderTargets.backBuffer, 1, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.ReadWrite); + builder.SetRenderAttachment(renderTargets.extraTextures[4], 1, AccessFlags.Write); builder.SetInputAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Read); builder.SetInputAttachment(renderTargets.extraTextures[1], 1, AccessFlags.Read); builder.SetInputAttachment(renderTargets.extraTextures[2], 2, AccessFlags.Read); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } var result = g.CompileNativeRenderGraph(g.ComputeGraphHash()); @@ -902,11 +924,11 @@ public void InputAttachmentsWork() Assert.AreEqual(2, nativePasses[0].numGraphPasses); // Validate attachments - Assert.AreEqual(renderTargets.depthBuffer.handle.index, nativePasses[0].attachments[0].handle.index); + Assert.AreEqual(renderTargets.extraTextureDepth.handle.index, nativePasses[0].attachments[0].handle.index); Assert.AreEqual(renderTargets.extraTextures[0].handle.index, nativePasses[0].attachments[1].handle.index); Assert.AreEqual(renderTargets.extraTextures[1].handle.index, nativePasses[0].attachments[2].handle.index); Assert.AreEqual(renderTargets.extraTextures[2].handle.index, nativePasses[0].attachments[3].handle.index); - Assert.AreEqual(renderTargets.backBuffer.handle.index, nativePasses[0].attachments[4].handle.index); + Assert.AreEqual(renderTargets.extraTextures[4].handle.index, nativePasses[0].attachments[4].handle.index); // Sub Pass 0 ref var subPass = ref result.contextData.nativeSubPassData.ElementAt(nativePasses[0].firstNativeSubPass); @@ -1653,7 +1675,7 @@ public void UpdateSubpassAttachmentIndices_WhenDepthAttachmentIsAdded() using (var builder = g.AddRasterRenderPass("Depth_Subpass3", out var passData)) { builder.SetInputAttachment(renderTargets.extraTextures[0], 0); - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Write); builder.SetRenderAttachment(renderTargets.extraTextures[3], 0); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); builder.AllowPassCulling(false); @@ -1673,7 +1695,7 @@ public void UpdateSubpassAttachmentIndices_WhenDepthAttachmentIsAdded() Assert.IsTrue(passes != null && passes.Count == 1 && passes[0].numGraphPasses == 5 && passes[0].numNativeSubPasses == 4); // Depth is the first attachment - Assert.IsTrue(passes[0].attachments[0].handle.index == renderTargets.depthBuffer.handle.index); + Assert.IsTrue(passes[0].attachments[0].handle.index == renderTargets.extraTextureDepth.handle.index); Assert.IsTrue(passes[0].attachments[1].handle.index == renderTargets.extraTextures[1].handle.index); Assert.IsTrue(passes[0].attachments[2].handle.index == renderTargets.extraTextures[2].handle.index); Assert.IsTrue(passes[0].attachments[3].handle.index == renderTargets.extraTextures[0].handle.index); @@ -1917,8 +1939,9 @@ public void UnusedResourceCulling_DoNotCullProducer_WhenOneOfItsWrittenResources { builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.ReadWrite); builder.SetRenderAttachment(renderTargets.extraTextures[1], 1, AccessFlags.Write); - builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Read); + builder.SetRenderAttachmentDepth(renderTargets.extraTextureDepth, AccessFlags.Read); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } // This pass explicitly reads version 1 of extraTextures[1] and writes its version 2 that none reads - no side effect @@ -2018,8 +2041,9 @@ public void UnusedResourceCulling_KeepUnusedLatestVersion_WhenProducerIsNotCulle using (var builder = g.AddRasterRenderPass("TestPass0", out var passData)) { builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.ReadWrite); - builder.SetRenderAttachment(renderTargets.backBuffer, 1, AccessFlags.Write); + builder.SetRenderAttachment(renderTargets.extraTextures[1], 1, AccessFlags.Write); builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); } // This pass writes version 2 of extraTextures[2] that no one uses diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderGraphTests.cs b/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderGraphTests.cs index de4cf06fdd7..7e5ba6852a4 100644 --- a/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderGraphTests.cs +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderGraphTests.cs @@ -6,7 +6,8 @@ using UnityEngine.TestTools; using Unity.Collections; using UnityEngine.Rendering.RendererUtils; -using System.Text.RegularExpressions; +using UnityEngine.Rendering.RenderGraphModule.NativeRenderPassCompiler; + #if UNITY_EDITOR using UnityEditor; @@ -43,11 +44,11 @@ class RenderGraphTestPassData public BufferHandle[] buffers = new BufferHandle[8]; } - TextureDesc SimpleTextureDesc(string name, int w, int h, int samples) + TextureDesc SimpleTextureDesc(string name, int w, int h, int samples, GraphicsFormat graphicsFormat) { TextureDesc result = new TextureDesc(w, h); result.msaaSamples = (MSAASamples)samples; - result.format = GraphicsFormat.R8G8B8A8_UNorm; + result.format = graphicsFormat; result.name = name; return result; } @@ -59,8 +60,21 @@ class TestRenderTargets public TextureHandle[] extraTextures = new TextureHandle[10]; public TextureHandle extraDepthBuffer; public TextureHandle extraDepthBufferBottomLeft; + public TextureHandle extraTextureDepth; }; + [OneTimeSetUp] + public void OneTimeSetUp() + { + NativePassCompiler.s_ForceGenerateAuditsForTests = true; + } + + [OneTimeTearDown] + public void OneTimeTearDown() + { + NativePassCompiler.s_ForceGenerateAuditsForTests = false; + } + TestRenderTargets ImportAndCreateRenderTargets(RenderGraph g, TextureUVOrigin backBufferUVOrigin = TextureUVOrigin.BottomLeft) { TestRenderTargets result = new TestRenderTargets(); @@ -95,9 +109,11 @@ TestRenderTargets ImportAndCreateRenderTargets(RenderGraph g, TextureUVOrigin ba for (int i = 0; i < result.extraTextures.Length; i++) { - result.extraTextures[i] = g.CreateTexture(SimpleTextureDesc("ExtraTexture" + i, 1024, 768, 1)); + result.extraTextures[i] = g.CreateTexture(SimpleTextureDesc("ExtraTexture" + i, 1024, 768, 1, GraphicsFormat.R8G8B8A8_UNorm)); } + result.extraTextureDepth = g.CreateTexture(SimpleTextureDesc("ExtraDepthTexture", 1024, 768, 1, GraphicsFormat.D24_UNorm)); + return result; } @@ -1291,6 +1307,11 @@ public void RenderGraphMultisampledShaderResolvePassWorksForMSAATarget() { m_RenderGraphTestPipeline.recordRenderGraphBody = (context, camera, cmd) => { + if (!SystemInfo.supportsMultisampledShaderResolve) + { + return; // Skip the test if the platform does not support multisampled shader resolve + } + var colorTexDesc = new TextureDesc(Vector2.one, false, false) { width = 4, @@ -2344,6 +2365,11 @@ public void TextureUVOrigin_CheckBackbufferUVOriginInherited() var result = m_RenderGraph.CompileNativeRenderGraph(m_RenderGraph.ComputeGraphHash()); var passes = result.contextData.GetNativePasses(); + + // Nothing to test here, since the passes are not merged because of the "back buffer in multiple render targets" API limitation (e.g OpenGL) + if (passes.Count > 1 && passes[0].breakAudit.reason == PassBreakReason.BackbufferInMultipleRenderTargetsNotSupported) + return; + Assert.AreEqual(1, passes.Count); Assert.AreEqual(4, passes[0].attachments.size); Assert.AreEqual(3, passes[0].numGraphPasses); @@ -2432,5 +2458,116 @@ public void TextureUVOrigin_CheckTextureReadBreaksBackbufferUVOriginInherited() m_RenderGraph.Cleanup(); } + + [Test] + public void CanMergeBackBufferAndCustomRenderTargets() + { + if (SystemInfo.supportsBackbufferInMultipleRenderTargets) + return; + + // We don't send the list of graphics commands to execute to avoid mistmatch attachment size errors in the native render pass layer due to the backbuffer usage. + // To reproduce the "Trying to load color backbuffer into a complex RenderPass setup" error, this setting needs to be true. + // Because of the mismatch error, it cannot be enabled on the CI, so instead, we verify the breaking audit (CannotMixBackBuffersAndCustomTextures). + m_RenderGraphTestPipeline.invalidContextForTesting = true; + NativePassCompiler.s_ForceGenerateAuditsForTests = true; + + m_RenderGraphTestPipeline.recordRenderGraphBody = (context, camera, cmd) => + { + var renderTargets = ImportAndCreateRenderTargets(m_RenderGraph); + + // Alloc a custom depth buffer + var extraDepthBufferHandle = RTHandles.Alloc(1024, 768, + GraphicsFormat.D32_SFloat_S8_UInt, dimension: TextureDimension.Tex2D, useMipMap: false, autoGenerateMips: false, name: "Extra Depth Buffer"); + + // Import it and assign it to the extraDepthBuffer handle + var importInfoDepth = new RenderTargetInfo(); + importInfoDepth.width = 1024; + importInfoDepth.height = 768; + importInfoDepth.volumeDepth = 1; + importInfoDepth.msaaSamples = 1; + importInfoDepth.format = GraphicsFormat.D32_SFloat_S8_UInt; + renderTargets.extraDepthBuffer = m_RenderGraph.ImportTexture(extraDepthBufferHandle, importInfoDepth, new ImportResourceParams()); + + using (var builder = m_RenderGraph.AddRasterRenderPass("TestPass0", out var passData)) + { + builder.SetRenderAttachment(renderTargets.backBuffer, 0, AccessFlags.Write); + builder.SetRenderFunc(static (UVOriginPassData data, RasterGraphContext context) =>{ }); + builder.AllowPassCulling(false); + } + + using (var builder = m_RenderGraph.AddRasterRenderPass("TestPass1", out var passData)) + { + builder.SetRenderAttachmentDepth(renderTargets.extraDepthBuffer, AccessFlags.Read); + builder.SetRenderAttachment(renderTargets.extraTextures[1], 0, AccessFlags.Write); + builder.SetRenderFunc(static (UVOriginPassData data, RasterGraphContext context) =>{ }); + builder.AllowPassCulling(false); + } + + var result = m_RenderGraph.CompileNativeRenderGraph(m_RenderGraph.ComputeGraphHash()); + var passes = result.contextData.GetNativePasses(); + + Assert.AreEqual(2, passes.Count); + Assert.IsTrue(passes[0].breakAudit.reason == PassBreakReason.BackbufferInMultipleRenderTargetsNotSupported); + }; + + m_Camera.Render(); + + m_RenderGraph.Cleanup(); + } + + [Test] + public void CanMergeBackBufferAndCustomRenderTargetsDepth() + { + if (SystemInfo.supportsBackbufferInMultipleRenderTargets) + return; + + // We don't send the list of graphics commands to execute to avoid mistmatch attachment size errors in the native render pass layer due to the backbuffer usage. + // To reproduce the "Trying to load color backbuffer into a complex RenderPass setup" error, this setting needs to be true. + // Because of the mismatch error, it cannot be enabled on the CI, so instead, we verify the breaking audit (CannotMixBackBuffersAndCustomTextures). + m_RenderGraphTestPipeline.invalidContextForTesting = true; + NativePassCompiler.s_ForceGenerateAuditsForTests = true; + + m_RenderGraphTestPipeline.recordRenderGraphBody = (context, camera, cmd) => + { + var renderTargets = ImportAndCreateRenderTargets(m_RenderGraph); + + // Alloc a custom depth buffer + var extraDepthBufferHandle = RTHandles.Alloc(1024, 768, + GraphicsFormat.D32_SFloat_S8_UInt, dimension: TextureDimension.Tex2D, useMipMap: false, autoGenerateMips: false, name: "Extra Depth Buffer"); + + // Import it and assign it to the extraDepthBuffer handle + var importInfoDepth = new RenderTargetInfo(); + importInfoDepth.width = 1024; + importInfoDepth.height = 768; + importInfoDepth.volumeDepth = 1; + importInfoDepth.msaaSamples = 1; + importInfoDepth.format = GraphicsFormat.D32_SFloat_S8_UInt; + renderTargets.extraDepthBuffer = m_RenderGraph.ImportTexture(extraDepthBufferHandle, importInfoDepth, new ImportResourceParams()); + + using (var builder = m_RenderGraph.AddRasterRenderPass("TestPass0", out var passData)) + { + builder.SetRenderAttachmentDepth(renderTargets.depthBuffer, AccessFlags.Write); + builder.SetRenderFunc(static (UVOriginPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); + } + + using (var builder = m_RenderGraph.AddRasterRenderPass("TestPass1", out var passData)) + { + builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Write); + builder.SetRenderFunc(static (UVOriginPassData data, RasterGraphContext context) => { }); + builder.AllowPassCulling(false); + } + + var result = m_RenderGraph.CompileNativeRenderGraph(m_RenderGraph.ComputeGraphHash()); + var passes = result.contextData.GetNativePasses(); + + Assert.AreEqual(2, passes.Count); + Assert.IsTrue(passes[0].breakAudit.reason == PassBreakReason.BackbufferInMultipleRenderTargetsNotSupported); + }; + + m_Camera.Render(); + + m_RenderGraph.Cleanup(); + } } } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CopyColorPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CopyColorPass.cs index c23eb0d6eb6..1c68e76aa63 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CopyColorPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CopyColorPass.cs @@ -186,9 +186,7 @@ internal void RenderToExistingTexture(RenderGraph renderGraph, ContextContainer private void RenderInternal(RenderGraph renderGraph, in TextureHandle destination, in TextureHandle source, bool useProceduralBlit) { - bool isES3 = SystemInfo.graphicsDeviceType == GraphicsDeviceType.OpenGLES3; - - if (m_DownsamplingMethod != Downsampling.None || isES3) + if (m_DownsamplingMethod != Downsampling.None) { AddDownsampleAndCopyColorRenderPass(renderGraph, destination, source, useProceduralBlit, k_DownsampleAndCopyPassName); } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature.cs b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature.cs index b7366aeb782..cb983d4c9d4 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature.cs @@ -131,16 +131,6 @@ public void SetupMembers(Material material, int passIndex, bool fetchActiveColor m_BindDepthStencilAttachment = bindDepthStencilAttachment; } - internal void ReAllocate(RenderTextureDescriptor desc) - { - - } - - private static void ExecuteCopyColorPass(RasterCommandBuffer cmd, RTHandle sourceTexture) - { - Blitter.BlitTexture(cmd, sourceTexture, new Vector4(1, 1, 0, 0), 0.0f, false); - } - private static void ExecuteMainPass(RasterCommandBuffer cmd, RTHandle sourceTexture, Material material, int passIndex) { s_SharedPropertyBlock.Clear(); @@ -258,22 +248,6 @@ private void AddFullscreenRenderPassInputPass(RenderGraph renderGraph, Universal } } - private void AddCopyPassRenderPassFullscreen(RenderGraph renderGraph, in TextureHandle source, in TextureHandle destination) - { - using (var builder = renderGraph.AddRasterRenderPass("Copy Color Full Screen", out var passData, profilingSampler)) - { - passData.inputTexture = source; - builder.UseTexture(passData.inputTexture, AccessFlags.Read); - - builder.SetRenderAttachment(destination, 0, AccessFlags.Write); - - builder.SetRenderFunc(static (CopyPassData data, RasterGraphContext rgContext) => - { - ExecuteCopyColorPass(rgContext.cmd, data.inputTexture); - }); - } - } - private class CopyPassData { internal TextureHandle inputTexture; From 60bdf06f49db6963278c2e53e0dc9726e0960f96 Mon Sep 17 00:00:00 2001 From: Olivier Prat Date: Fri, 9 Jan 2026 11:15:13 +0000 Subject: [PATCH 14/43] UUM-129941 : Fix incorrect APV baking when using sample count Probe Adjustment Volumes --- .../Editor/Lighting/ProbeVolume/ProbeGIBaking.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.cs b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.cs index a749bf754b4..10d597db8fd 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.cs @@ -306,13 +306,13 @@ public BakingBatch(Vector3Int cellCount, ProbeReferenceVolume refVolume) maxBrickCount = cellCount * ProbeReferenceVolume.CellSize(refVolume.GetMaxSubdivision()); inverseScale = ProbeBrickPool.kBrickCellCount / refVolume.MinBrickSize(); offset = refVolume.ProbeOffset(); - + // Initialize NativeHashMaps with reasonable initial capacity // Using a larger capacity to reduce allocations during baking positionToIndex = new NativeHashMap(100000, Allocator.Persistent); uniqueBrickSubdiv = new NativeHashMap(100000, Allocator.Persistent); } - + public void Dispose() { if (positionToIndex.IsCreated) @@ -1348,7 +1348,7 @@ private static void BakeDelegate(ref float progress, out bool done, InputExtract { FixSeams( s_BakeData.positionRemap, - s_BakeData.originalPositions, + s_BakeData.sortedPositions, s_BakeData.lightingJob.irradiance, s_BakeData.lightingJob.validity, s_BakeData.lightingJob.occlusion, @@ -1574,7 +1574,7 @@ internal static void FixSeams( NativeArray skyOcclusion, NativeArray renderingLayerMasks) { - // Seams are caused are caused by probes on the boundary between two subdivision levels + // Seams are caused by probes on the boundary between two subdivision levels // The idea is to find first them and do a kind of dilation to smooth the values on the boundary // the dilation process consists in doing a trilinear sample of the higher subdivision brick and override the lower subdiv with that // We have to mark the probes on the boundary as valid otherwise leak reduction at runtime will interfere with this method @@ -1694,7 +1694,8 @@ Vector3Int GetCellPositionFromVoxel(Vector3Int voxelToLookup, int cellSizeInBric { uint renderingLayerMask = renderingLayerMasks[positionRemap[index]]; bool commonRenderingLayer = (renderingLayerMask & probeRenderingLayerMask) != 0; - if (!commonRenderingLayer) continue; // We do not use this probe contribution if it does not share at least a common rendering layer + if (!commonRenderingLayer) + continue; // We do not use this probe contribution if it does not share at least a common rendering layer } // Do the lerp in compressed format to match result on GPU @@ -1763,7 +1764,7 @@ static void ApplyPostBakeOperations() var chunkSizeInProbes = ProbeBrickPool.GetChunkSizeInProbeCount(); var hasVirtualOffsets = m_BakingSet.settings.virtualOffsetSettings.useVirtualOffset; var hasRenderingLayers = m_BakingSet.useRenderingLayers; - + if (!ValidateBakingCellsSize(bakingCellsArray, chunkSizeInProbes, hasVirtualOffsets, hasRenderingLayers)) return; // Early exit if validation fails @@ -1939,7 +1940,8 @@ bool GetProbes(out NativeList positions) static void GetValidProbeInstanceIds(EntityId[] entityIds, out List validProbeInstanceIds) { validProbeInstanceIds = new List(); - foreach (EntityId probeInstanceId in entityIds)
 { + foreach (EntityId probeInstanceId in entityIds) + { if (AdditionalGIBakeRequestsManager.GetPositionForRequest(probeInstanceId, out Vector3 _)) { validProbeInstanceIds.Add(probeInstanceId); From 6e1b5764fc75621e5b18e4e861d1c55546e0b7b1 Mon Sep 17 00:00:00 2001 From: Arttu Peltonen Date: Fri, 9 Jan 2026 15:54:39 +0000 Subject: [PATCH 15/43] Fix Frame Debugger disconnecting when Render Graph Viewer window is closed --- .../RenderGraphViewer.PlayerConnection.cs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.PlayerConnection.cs b/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.PlayerConnection.cs index 1c608b40cf8..800f7294110 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.PlayerConnection.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.PlayerConnection.cs @@ -24,8 +24,6 @@ public PlayerConnection(IConnectionState connectionState, UnityEngine.Events.Uni EditorConnection.instance.Initialize(); EditorConnection.instance.RegisterConnection(m_OnPlayerConnected); EditorConnection.instance.RegisterDisconnection(m_OnPlayerDisconnected); - - EditorApplication.quitting += OnEditorQuitting; } public void Dispose() @@ -35,15 +33,8 @@ public void Dispose() EditorConnection.instance.UnregisterConnection(m_OnPlayerConnected); EditorConnection.instance.UnregisterDisconnection(m_OnPlayerDisconnected); - // NOTE: There is a bug where editor crashes if we call DisconnectAll during shutdown flow. In this case - // it's fine to skip the disconnect as the player will get notified of it anyway. - if (!m_EditorQuitting) - EditorConnection.instance.DisconnectAll(); - m_ConnectionState.Dispose(); m_ConnectionState = null; - - EditorApplication.quitting -= OnEditorQuitting; } } @@ -51,11 +42,6 @@ public void OnConnectionDropdownIMGUI() { PlayerConnectionGUILayout.ConnectionTargetSelectionDropdown(m_ConnectionState, EditorStyles.toolbarDropDown, 250); } - - void OnEditorQuitting() - { - m_EditorQuitting = true; - } } } } From f1804e209b915824b8e4da09794853c01dbac91c Mon Sep 17 00:00:00 2001 From: Kirill Titov Date: Fri, 9 Jan 2026 18:06:45 +0000 Subject: [PATCH 16/43] Remove Finalizers from RenderGraph --- .../Runtime/RenderGraph/Compiler/CompilerContextData.cs | 4 ---- .../Runtime/RenderGraph/Compiler/NativePassCompiler.cs | 4 ---- 2 files changed, 8 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/CompilerContextData.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/CompilerContextData.cs index a40752a6416..8c7caaef8d3 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/CompilerContextData.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/CompilerContextData.cs @@ -353,12 +353,8 @@ internal List GetNativePasses() } #endregion - // IDisposable implementation - bool m_AreNativeListsAllocated = false; - ~CompilerContextData() => Cleanup(); - public void Dispose() { Cleanup(); diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.cs index 14a4754fb08..f7aed503c56 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.cs @@ -59,10 +59,6 @@ public NativePassCompiler(RenderGraphCompilationCache cache) m_TempMRTArrays[i] = new RenderTargetIdentifier[i + 1]; } - // IDisposable implementation - - ~NativePassCompiler() => Cleanup(); - public void Dispose() { Cleanup(); From a5f219ee6992c2bce4ec70f2ea3d4cb6a7f31153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Slysz?= Date: Sat, 10 Jan 2026 00:36:05 +0000 Subject: [PATCH 17/43] [URP] Fix renderingLayerTexture computation event decision --- .../Runtime/Passes/DepthNormalOnlyPass.cs | 6 +- .../Runtime/Passes/GBufferPass.cs | 33 ++-- .../Runtime/RenderingLayerUtils.cs | 10 +- .../Runtime/ScriptableRendererFeature.cs | 2 +- .../Runtime/UniversalRendererRenderGraph.cs | 2 +- .../Shaders/BakedLit.shader | 54 ++++++ .../Shaders/BakedLitForwardPass.hlsl | 4 + .../Shaders/BakedLitGBufferPass.hlsl | 176 ++++++++++++++++++ .../Shaders/BakedLitGBufferPass.hlsl.meta | 7 + .../Editor/ShaderBuildPreprocessorTests.cs | 2 +- 10 files changed, 272 insertions(+), 24 deletions(-) create mode 100644 Packages/com.unity.render-pipelines.universal/Shaders/BakedLitGBufferPass.hlsl create mode 100644 Packages/com.unity.render-pipelines.universal/Shaders/BakedLitGBufferPass.hlsl.meta diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/DepthNormalOnlyPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/DepthNormalOnlyPass.cs index cefc96f514e..ed1a959a5d8 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/DepthNormalOnlyPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/DepthNormalOnlyPass.cs @@ -176,11 +176,13 @@ internal void Render(RenderGraph renderGraph, ContextContainer frameData, in Tex builder.SetGlobalTextureAfterPass(depthTexture, s_CameraDepthTextureID); // Required here because of RenderingLayerUtils.SetupProperties - builder.AllowGlobalStateModification(true); + if (passData.enableRenderingLayers) + builder.AllowGlobalStateModification(true); builder.SetRenderFunc(static (PassData data, RasterGraphContext context) => { - RenderingLayerUtils.SetupProperties(context.cmd, data.maskSize); + if (data.enableRenderingLayers) + RenderingLayerUtils.SetupProperties(context.cmd, data.maskSize); ExecutePass(context.cmd, data, data.rendererList); }); } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/GBufferPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/GBufferPass.cs index 61f7273d2dd..dddb2010351 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/GBufferPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/GBufferPass.cs @@ -14,6 +14,7 @@ internal class GBufferPass : ScriptableRenderPass private static readonly ShaderTagId s_ShaderTagSimpleLit = new ShaderTagId("SimpleLit"); private static readonly ShaderTagId s_ShaderTagUnlit = new ShaderTagId("Unlit"); private static readonly ShaderTagId s_ShaderTagComplexLit = new ShaderTagId("ComplexLit"); + private static readonly ShaderTagId s_ShaderTagBakedLit = new ShaderTagId("BakedLit"); private static readonly ShaderTagId s_ShaderTagUniversalGBuffer = new ShaderTagId("UniversalGBuffer"); private static readonly ShaderTagId s_ShaderTagUniversalMaterialType = new ShaderTagId("UniversalMaterialType"); @@ -38,25 +39,25 @@ public GBufferPass(RenderPassEvent evt, RenderQueueRange renderQueueRange, Layer m_RenderStateBlock.stencilReference = stencilReference; m_RenderStateBlock.mask = RenderStateMask.Stencil; - if (s_ShaderTagValues == null) + s_ShaderTagValues ??= new ShaderTagId[] { - s_ShaderTagValues = new ShaderTagId[5]; - s_ShaderTagValues[0] = s_ShaderTagLit; - s_ShaderTagValues[1] = s_ShaderTagSimpleLit; - s_ShaderTagValues[2] = s_ShaderTagUnlit; - s_ShaderTagValues[3] = s_ShaderTagComplexLit; - s_ShaderTagValues[4] = new ShaderTagId(); // Special catch all case for materials where UniversalMaterialType is not defined or the tag value doesn't match anything we know. - } + s_ShaderTagLit, + s_ShaderTagSimpleLit, + s_ShaderTagUnlit, + s_ShaderTagComplexLit, + s_ShaderTagBakedLit, + new ShaderTagId() // Special catch all case for materials where UniversalMaterialType is not defined or the tag value doesn't match anything we know. + }; - if (s_RenderStateBlocks == null) + s_RenderStateBlocks ??= new RenderStateBlock[] { - s_RenderStateBlocks = new RenderStateBlock[5]; - s_RenderStateBlocks[0] = DeferredLights.OverwriteStencil(m_RenderStateBlock, (int)StencilUsage.MaterialMask, (int)StencilUsage.MaterialLit); - s_RenderStateBlocks[1] = DeferredLights.OverwriteStencil(m_RenderStateBlock, (int)StencilUsage.MaterialMask, (int)StencilUsage.MaterialSimpleLit); - s_RenderStateBlocks[2] = DeferredLights.OverwriteStencil(m_RenderStateBlock, (int)StencilUsage.MaterialMask, (int)StencilUsage.MaterialUnlit); - s_RenderStateBlocks[3] = DeferredLights.OverwriteStencil(m_RenderStateBlock, (int)StencilUsage.MaterialMask, (int)StencilUsage.MaterialUnlit); // Fill GBuffer, but skip lighting pass for ComplexLit - s_RenderStateBlocks[4] = s_RenderStateBlocks[0]; - } + DeferredLights.OverwriteStencil(m_RenderStateBlock, (int)StencilUsage.MaterialMask, (int)StencilUsage.MaterialLit), + DeferredLights.OverwriteStencil(m_RenderStateBlock, (int)StencilUsage.MaterialMask, (int)StencilUsage.MaterialSimpleLit), + DeferredLights.OverwriteStencil(m_RenderStateBlock, (int)StencilUsage.MaterialMask, (int)StencilUsage.MaterialUnlit), + DeferredLights.OverwriteStencil(m_RenderStateBlock, (int)StencilUsage.MaterialMask, (int)StencilUsage.MaterialUnlit), // Fill GBuffer, but skip lighting pass for ComplexLit + DeferredLights.OverwriteStencil(m_RenderStateBlock, (int)StencilUsage.MaterialMask, (int)StencilUsage.MaterialUnlit), // Fill GBuffer, but skip lighting pass for BakedLit + DeferredLights.OverwriteStencil(m_RenderStateBlock, (int)StencilUsage.MaterialMask, (int)StencilUsage.MaterialLit) + }; } static void ExecutePass(RasterCommandBuffer cmd, PassData data, RendererList rendererList, RendererList errorRendererList) diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/RenderingLayerUtils.cs b/Packages/com.unity.render-pipelines.universal/Runtime/RenderingLayerUtils.cs index ba3aed0060e..75fd919d79f 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/RenderingLayerUtils.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/RenderingLayerUtils.cs @@ -61,9 +61,13 @@ internal static bool RequireRenderingLayers(List rend { if (rendererFeature.isActive) { - result |= rendererFeature.RequireRenderingLayers(isDeferred, accurateGbufferNormals, out Event rendererEvent, out MaskSize rendererMaskSize); - combinedEvent = Combine(combinedEvent, rendererEvent); - combinedMaskSize = Combine(combinedMaskSize, rendererMaskSize); + bool required = rendererFeature.RequireRenderingLayers(isDeferred, accurateGbufferNormals, out Event rendererEvent, out MaskSize rendererMaskSize); + result |= required; + if (required) + { + combinedEvent = Combine(combinedEvent, rendererEvent); + combinedMaskSize = Combine(combinedMaskSize, rendererMaskSize); + } } } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRendererFeature.cs b/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRendererFeature.cs index d157518219e..4897d1dbdfb 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRendererFeature.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRendererFeature.cs @@ -90,7 +90,7 @@ void OnValidate() /// internal virtual bool RequireRenderingLayers(bool isDeferred, bool needsGBufferAccurateNormals, out RenderingLayerUtils.Event atEvent, out RenderingLayerUtils.MaskSize maskSize) { - atEvent = RenderingLayerUtils.Event.DepthNormalPrePass; + atEvent = RenderingLayerUtils.Event.Opaque; maskSize = RenderingLayerUtils.MaskSize.Bits8; return false; } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererRenderGraph.cs b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererRenderGraph.cs index c35cee77d54..2bd44342e0b 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererRenderGraph.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererRenderGraph.cs @@ -1925,7 +1925,7 @@ void DepthNormalPrepassRender(RenderGraph renderGraph, RenderPassInputSummary re m_DepthNormalPrepass.Render(renderGraph, frameData, resourceData.cameraNormalsTexture, in depthTarget, resourceData.renderingLayersTexture, batchLayerMask, setGlobalDepth, setGlobalTextures, partialPass); - if (m_RequiresRenderingLayer) + if (m_RenderingLayerProvidesByDepthNormalPass) SetRenderingLayersGlobalTextures(renderGraph); } } diff --git a/Packages/com.unity.render-pipelines.universal/Shaders/BakedLit.shader b/Packages/com.unity.render-pipelines.universal/Shaders/BakedLit.shader index 913a0dd24b6..8bdf123f0db 100644 --- a/Packages/com.unity.render-pipelines.universal/Shaders/BakedLit.shader +++ b/Packages/com.unity.render-pipelines.universal/Shaders/BakedLit.shader @@ -104,6 +104,60 @@ Shader "Universal Render Pipeline/Baked Lit" #include "Packages/com.unity.render-pipelines.universal/Shaders/BakedLitForwardPass.hlsl" ENDHLSL } + + // Fill GBuffer data to prevent "holes", just in case someone wants to reuse GBuffer for non-lighting effects. + // Deferred lighting is stenciled out. + Pass + { + Name "GBuffer" + Tags + { + "LightMode" = "UniversalGBuffer" + } + + HLSLPROGRAM + #pragma target 4.5 + + // Deferred Rendering Path does not support the OpenGL-based graphics API: + // Desktop OpenGL, OpenGL ES 3.0, WebGL 2.0. + #pragma exclude_renderers gles3 glcore + + // ------------------------------------- + // Shader Stages + #pragma vertex BakedLitGBufferPassVertex + #pragma fragment BakedLitGBufferPassFragment + + // ------------------------------------- + // Material Keywords + #pragma shader_feature_local _ _NORMALMAP + #pragma shader_feature_local_fragment _ALPHATEST_ON + #pragma shader_feature_local_fragment _ALPHAMODULATE_ON + + // ------------------------------------- + // Universal Pipeline keywords + #pragma multi_compile_fragment _ _RENDER_PASS_ENABLED + + // ------------------------------------- + // Unity defined keywords + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ LOD_FADE_CROSSFADE + #pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT + #pragma multi_compile_fragment _ SHADOWS_SHADOWMASK + #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl" + + //-------------------------------------- + // GPU Instancing + #pragma multi_compile_instancing + #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl" + + // ------------------------------------- + // Includes + // Lighting include is needed because of GI + #include "Packages/com.unity.render-pipelines.universal/Shaders/BakedLitInput.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Shaders/BakedLitGBufferPass.hlsl" + ENDHLSL + } Pass { diff --git a/Packages/com.unity.render-pipelines.universal/Shaders/BakedLitForwardPass.hlsl b/Packages/com.unity.render-pipelines.universal/Shaders/BakedLitForwardPass.hlsl index a8926400003..3e40f5c0132 100644 --- a/Packages/com.unity.render-pipelines.universal/Shaders/BakedLitForwardPass.hlsl +++ b/Packages/com.unity.render-pipelines.universal/Shaders/BakedLitForwardPass.hlsl @@ -1,3 +1,5 @@ +#ifndef UNIVERSAL_BAKEDLIT_FORWARD_PASS_INCLUDED +#define UNIVERSAL_BAKEDLIT_FORWARD_PASS_INCLUDED #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #if defined(LOD_FADE_CROSSFADE) @@ -179,3 +181,5 @@ void BakedLitForwardPassFragment( outRenderingLayers = EncodeMeshRenderingLayer(); #endif } + +#endif \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Shaders/BakedLitGBufferPass.hlsl b/Packages/com.unity.render-pipelines.universal/Shaders/BakedLitGBufferPass.hlsl new file mode 100644 index 00000000000..96838de676f --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Shaders/BakedLitGBufferPass.hlsl @@ -0,0 +1,176 @@ +#ifndef UNIVERSAL_BAKEDLIT_GBUFFER_PASS_INCLUDED +#define UNIVERSAL_BAKEDLIT_GBUFFER_PASS_INCLUDED + +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/GBufferOutput.hlsl" +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" +#if defined(LOD_FADE_CROSSFADE) + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" +#endif + +struct Attributes +{ + float4 positionOS : POSITION; + float2 uv : TEXCOORD0; + float2 staticLightmapUV : TEXCOORD1; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + + UNITY_VERTEX_INPUT_INSTANCE_ID +}; + +struct Varyings +{ + float4 positionCS : SV_POSITION; + float3 uv0AndFogCoord : TEXCOORD0; // xy: uv0, z: fogCoord + DECLARE_LIGHTMAP_OR_SH(staticLightmapUV, vertexSH, 1); + half3 normalWS : TEXCOORD2; + +#if defined(_NORMALMAP) + half4 tangentWS : TEXCOORD3; +#endif + +#if defined(DEBUG_DISPLAY) || (defined(PROBE_VOLUMES_L1) || defined(PROBE_VOLUMES_L2)) + float3 positionWS : TEXCOORD4; + float3 viewDirWS : TEXCOORD5; +#endif + +#ifdef USE_APV_PROBE_OCCLUSION + float4 probeOcclusion : TEXCOORD6; +#endif + + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO +}; + +void InitializeInputData(Varyings input, half3 normalTS, out InputData inputData) +{ + inputData = (InputData) 0; + + inputData.positionCS = input.positionCS; + inputData.positionWS = float3(0, 0, 0); + inputData.viewDirectionWS = half3(0, 0, 1); + +#if defined(_NORMALMAP) + float sgn = input.tangentWS.w; // should be either +1 or -1 + float3 bitangent = sgn * cross(input.normalWS.xyz, input.tangentWS.xyz); + + inputData.tangentToWorld = half3x3(input.tangentWS.xyz, bitangent.xyz, input.normalWS.xyz); + inputData.normalWS = TransformTangentToWorld(normalTS, inputData.tangentToWorld); +#else + inputData.normalWS = input.normalWS; +#endif + + inputData.shadowCoord = float4(0, 0, 0, 0); + inputData.fogCoord = input.uv0AndFogCoord.z; + inputData.vertexLighting = half3(0, 0, 0); + inputData.normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS); + inputData.shadowMask = half4(1, 1, 1, 1); + +#if defined(DEBUG_DISPLAY) +#if defined(LIGHTMAP_ON) + inputData.staticLightmapUV = input.staticLightmapUV; +#else + inputData.vertexSH = input.vertexSH; +#endif +#if defined(USE_APV_PROBE_OCCLUSION) + inputData.probeOcclusion = input.probeOcclusion; +#endif +#endif +} + +void InitializeBakedGIData(Varyings input, inout InputData inputData) +{ +#if !defined(LIGHTMAP_ON) && (defined(PROBE_VOLUMES_L1) || defined(PROBE_VOLUMES_L2)) + inputData.bakedGI = SAMPLE_GI(input.vertexSH, + GetAbsolutePositionWS(input.positionWS), + inputData.normalWS, + input.viewDirWS, + input.positionCS.xy, + input.probeOcclusion, + inputData.shadowMask); +#else + inputData.bakedGI = SAMPLE_GI(input.staticLightmapUV, input.vertexSH, inputData.normalWS); +#endif +} + +Varyings BakedLitGBufferPassVertex(Attributes input) +{ + Varyings output; + + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz); + output.positionCS = vertexInput.positionCS; + output.uv0AndFogCoord.xy = TRANSFORM_TEX(input.uv, _BaseMap); +#if defined(_FOG_FRAGMENT) + output.uv0AndFogCoord.z = vertexInput.positionVS.z; +#else + output.uv0AndFogCoord.z = ComputeFogFactor(vertexInput.positionCS.z); +#endif + + // normalWS and tangentWS already normalize. + // this is required to avoid skewing the direction during interpolation + // also required for per-vertex SH evaluation + VertexNormalInputs normalInput = GetVertexNormalInputs(input.normalOS, input.tangentOS); + output.normalWS = normalInput.normalWS; +#if defined(_NORMALMAP) + real sign = input.tangentOS.w * GetOddNegativeScale(); + output.tangentWS = half4(normalInput.tangentWS.xyz, sign); +#endif + OUTPUT_LIGHTMAP_UV(input.staticLightmapUV, unity_LightmapST, output.staticLightmapUV); + OUTPUT_SH4(vertexInput.positionWS, output.normalWS.xyz, GetWorldSpaceNormalizeViewDir(vertexInput.positionWS), output.vertexSH, output.probeOcclusion); + +#if defined(DEBUG_DISPLAY) || (defined(PROBE_VOLUMES_L1) || defined(PROBE_VOLUMES_L2)) + output.positionWS = vertexInput.positionWS; + output.viewDirWS = GetWorldSpaceViewDir(vertexInput.positionWS); +#endif + + return output; +} + +GBufferFragOutput BakedLitGBufferPassFragment(Varyings input) +{ + UNITY_SETUP_INSTANCE_ID(input); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + +#if defined(LOD_FADE_CROSSFADE) && USE_UNITY_CROSSFADE + LODFadeCrossFade(input.positionCS); +#endif + + half2 uv = input.uv0AndFogCoord.xy; +#if defined(_NORMALMAP) + half3 normalTS = SampleNormal(uv, TEXTURE2D_ARGS(_BumpMap, sampler_BumpMap)).xyz; +#else + half3 normalTS = half3(0, 0, 1); +#endif + half4 texColor = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv); + half alpha = AlphaDiscard(texColor.a * _BaseColor.a, _Cutoff); + half3 color = AlphaModulate(texColor.rgb * _BaseColor.rgb, alpha); + + InputData inputData; + InitializeInputData(input, normalTS, inputData); + +#if defined(_DBUFFER) + ApplyDecalToBaseColorAndNormal(input.positionCS, color, inputData.normalWS); +#endif + + InitializeBakedGIData(input, inputData); + + SurfaceData surfaceData = (SurfaceData) 0; + surfaceData.albedo = color; + surfaceData.alpha = alpha; + +#if defined(_SCREEN_SPACE_OCCLUSION) // GBuffer never has transparents + float2 normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS); + AmbientOcclusionFactor aoFactor = GetScreenSpaceAmbientOcclusion(normalizedScreenSpaceUV); + surfaceData.occlusion = aoFactor.directAmbientOcclusion; +#else + surfaceData.occlusion = 1; +#endif + + return PackGBuffersSurfaceData(surfaceData, inputData, float3(0, 0, 0)); +} + +#endif \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Shaders/BakedLitGBufferPass.hlsl.meta b/Packages/com.unity.render-pipelines.universal/Shaders/BakedLitGBufferPass.hlsl.meta new file mode 100644 index 00000000000..cec50b83813 --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Shaders/BakedLitGBufferPass.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3624eb79d3c1a4742a2737c755e4ee51 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.universal/Tests/Editor/ShaderBuildPreprocessorTests.cs b/Packages/com.unity.render-pipelines.universal/Tests/Editor/ShaderBuildPreprocessorTests.cs index f0bb5b99133..002e78c441b 100644 --- a/Packages/com.unity.render-pipelines.universal/Tests/Editor/ShaderBuildPreprocessorTests.cs +++ b/Packages/com.unity.render-pipelines.universal/Tests/Editor/ShaderBuildPreprocessorTests.cs @@ -836,7 +836,7 @@ public void TestGetSupportedShaderFeaturesFromRendererFeatures_RenderingLayers( actual = m_TestHelper.GetSupportedShaderFeaturesFromRendererFeatures(rendererRequirements); expected = ShaderFeatures.ScreenSpaceOcclusion | ShaderFeatures.DecalScreenSpace | ShaderFeatures.DecalNormalBlendLow | ShaderFeatures.DecalLayers | - ShaderFeatures.DepthNormalPassRenderingLayers; + ShaderFeatures.OpaqueWriteRenderingLayers; m_TestHelper.AssertShaderFeaturesAndReset(expected, actual); m_TestHelper.rendererFeatures.Remove(ssaoFeature); From 3e6595157e9be9b6379af66fa8be21b5ecf399a3 Mon Sep 17 00:00:00 2001 From: April Roszkowski Date: Mon, 12 Jan 2026 18:33:18 +0000 Subject: [PATCH 18/43] [UUM-131564] Fix `NullReferenceException` when using custom preview mesh in Shader Graph --- .../Drawing/Inspector/MasterPreviewView.cs | 15 +-------------- .../Editor/InternalBridge.meta | 8 ++++++++ .../Editor/InternalBridge/AssemblyInfo.cs | 3 +++ .../Editor/InternalBridge/AssemblyInfo.cs.meta | 2 ++ .../Editor/InternalBridge/ObjectSelector.cs | 18 ++++++++++++++++++ .../InternalBridge/ObjectSelector.cs.meta | 2 ++ ...alAPIEditorBridge.ShaderGraph.Editor.asmdef | 16 ++++++++++++++++ ...EditorBridge.ShaderGraph.Editor.asmdef.meta | 7 +++++++ .../Editor/Unity.ShaderGraph.Editor.asmdef | 3 ++- 9 files changed, 59 insertions(+), 15 deletions(-) create mode 100644 Packages/com.unity.shadergraph/Editor/InternalBridge.meta create mode 100644 Packages/com.unity.shadergraph/Editor/InternalBridge/AssemblyInfo.cs create mode 100644 Packages/com.unity.shadergraph/Editor/InternalBridge/AssemblyInfo.cs.meta create mode 100644 Packages/com.unity.shadergraph/Editor/InternalBridge/ObjectSelector.cs create mode 100644 Packages/com.unity.shadergraph/Editor/InternalBridge/ObjectSelector.cs.meta create mode 100644 Packages/com.unity.shadergraph/Editor/InternalBridge/Unity.InternalAPIEditorBridge.ShaderGraph.Editor.asmdef create mode 100644 Packages/com.unity.shadergraph/Editor/InternalBridge/Unity.InternalAPIEditorBridge.ShaderGraph.Editor.asmdef.meta diff --git a/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/MasterPreviewView.cs b/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/MasterPreviewView.cs index 056a7a9c126..ea76fa13c76 100644 --- a/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/MasterPreviewView.cs +++ b/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/MasterPreviewView.cs @@ -45,11 +45,6 @@ public VisualElement preview } List m_DoNotShowPrimitives = new List(new string[] { PrimitiveType.Plane.ToString() }); -#if UNITY_6000_5_OR_NEWER - static Type s_ObjectSelector = CurrentAssemblies.GetLoadedAssemblies().SelectMany(x => x.GetTypesOrNothing()).FirstOrDefault(t => t.FullName == "UnityEditor.ObjectSelector"); -#else - static Type s_ObjectSelector = AppDomain.CurrentDomain.GetAssemblies().SelectMany(x => x.GetTypesOrNothing()).FirstOrDefault(t => t.FullName == "UnityEditor.ObjectSelector"); -#endif public string assetName { @@ -161,12 +156,6 @@ void ChangeMesh(Mesh mesh) m_Graph.previewData.serializedMesh.mesh = changedMesh; } - private static EditorWindow Get() - { - PropertyInfo P = s_ObjectSelector.GetProperty("get", BindingFlags.Public | BindingFlags.Static); - return P.GetValue(null, null) as EditorWindow; - } - void OnMeshChanged(Object obj) { var mesh = obj as Mesh; @@ -185,9 +174,7 @@ void ChangeMeshSprite() void ChangeMeshCustom() { - var ShowMethod = s_ObjectSelector.GetMethod("Show", BindingFlags.Instance | BindingFlags.NonPublic, null, new[] { typeof(UnityEngine.Object), typeof(Type), typeof(UnityEngine.Object), typeof(bool), typeof(List), typeof(Action), typeof(Action), typeof(bool) }, new ParameterModifier[8]); - m_PreviousMesh = m_Graph.previewData.serializedMesh.mesh; - ShowMethod.Invoke(Get(), new object[] { null, typeof(Mesh), null, false, null, (Action)OnMeshChanged, (Action)OnMeshChanged, false }); + InternalBridge.ObjectSelector.Show(null, typeof(Mesh), null, false, null, (Action)OnMeshChanged, (Action)OnMeshChanged, false); } void OnGeometryChanged(GeometryChangedEvent evt) diff --git a/Packages/com.unity.shadergraph/Editor/InternalBridge.meta b/Packages/com.unity.shadergraph/Editor/InternalBridge.meta new file mode 100644 index 00000000000..2796bd32ce0 --- /dev/null +++ b/Packages/com.unity.shadergraph/Editor/InternalBridge.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 50b9bb6f7fe7e51458e183e41bffa310 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.shadergraph/Editor/InternalBridge/AssemblyInfo.cs b/Packages/com.unity.shadergraph/Editor/InternalBridge/AssemblyInfo.cs new file mode 100644 index 00000000000..a4920ad6a35 --- /dev/null +++ b/Packages/com.unity.shadergraph/Editor/InternalBridge/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Unity.ShaderGraph.Editor")] diff --git a/Packages/com.unity.shadergraph/Editor/InternalBridge/AssemblyInfo.cs.meta b/Packages/com.unity.shadergraph/Editor/InternalBridge/AssemblyInfo.cs.meta new file mode 100644 index 00000000000..bc8edc2440e --- /dev/null +++ b/Packages/com.unity.shadergraph/Editor/InternalBridge/AssemblyInfo.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: c32b02309f04b344ca1c4fad2f488866 \ No newline at end of file diff --git a/Packages/com.unity.shadergraph/Editor/InternalBridge/ObjectSelector.cs b/Packages/com.unity.shadergraph/Editor/InternalBridge/ObjectSelector.cs new file mode 100644 index 00000000000..93b056e66b6 --- /dev/null +++ b/Packages/com.unity.shadergraph/Editor/InternalBridge/ObjectSelector.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using System; +using UnityEngine; + +namespace UnityEditor.ShaderGraph.InternalBridge +{ + internal static class ObjectSelector + { + public static void Show(UnityEngine.Object obj, Type requiredType, UnityEngine.Object objectBeingEdited, + bool allowSceneObjects, List allowedEntityIds = null, + Action onObjectSelectorClosed = null, + Action onObjectSelectedUpdated = null, bool showNoneItem = true) + { + UnityEditor.ObjectSelector.get.Show(obj, requiredType, objectBeingEdited, allowSceneObjects, + allowedEntityIds, onObjectSelectorClosed, onObjectSelectedUpdated, showNoneItem); + } + } +} diff --git a/Packages/com.unity.shadergraph/Editor/InternalBridge/ObjectSelector.cs.meta b/Packages/com.unity.shadergraph/Editor/InternalBridge/ObjectSelector.cs.meta new file mode 100644 index 00000000000..46ab78589b9 --- /dev/null +++ b/Packages/com.unity.shadergraph/Editor/InternalBridge/ObjectSelector.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: a6e816750db52e34e8e463c3377a974e \ No newline at end of file diff --git a/Packages/com.unity.shadergraph/Editor/InternalBridge/Unity.InternalAPIEditorBridge.ShaderGraph.Editor.asmdef b/Packages/com.unity.shadergraph/Editor/InternalBridge/Unity.InternalAPIEditorBridge.ShaderGraph.Editor.asmdef new file mode 100644 index 00000000000..c0bf03c82c3 --- /dev/null +++ b/Packages/com.unity.shadergraph/Editor/InternalBridge/Unity.InternalAPIEditorBridge.ShaderGraph.Editor.asmdef @@ -0,0 +1,16 @@ +{ + "name": "Unity.InternalAPIEditorBridge.ShaderGraph.Editor", + "rootNamespace": "", + "references": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} diff --git a/Packages/com.unity.shadergraph/Editor/InternalBridge/Unity.InternalAPIEditorBridge.ShaderGraph.Editor.asmdef.meta b/Packages/com.unity.shadergraph/Editor/InternalBridge/Unity.InternalAPIEditorBridge.ShaderGraph.Editor.asmdef.meta new file mode 100644 index 00000000000..b7144fe72c1 --- /dev/null +++ b/Packages/com.unity.shadergraph/Editor/InternalBridge/Unity.InternalAPIEditorBridge.ShaderGraph.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1a9e721432c3e5048950da7f3cf524e7 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.shadergraph/Editor/Unity.ShaderGraph.Editor.asmdef b/Packages/com.unity.shadergraph/Editor/Unity.ShaderGraph.Editor.asmdef index ff92c7fbe19..56222167c93 100644 --- a/Packages/com.unity.shadergraph/Editor/Unity.ShaderGraph.Editor.asmdef +++ b/Packages/com.unity.shadergraph/Editor/Unity.ShaderGraph.Editor.asmdef @@ -5,7 +5,8 @@ "GUID:ade7125e800904674ba0c115208f7ed5", "GUID:4988cf9794f41d64c884876ab6574b89", "GUID:df380645f10b7bc4b97d4f5eb6303d95", - "GUID:3eae0364be2026648bf74846acb8a731" + "GUID:3eae0364be2026648bf74846acb8a731", + "GUID:1a9e721432c3e5048950da7f3cf524e7" ], "includePlatforms": [ "Editor" From 79ebeff7e641ef92f14cf108da5c00af6f916c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Duverne?= Date: Mon, 12 Jan 2026 18:53:16 +0000 Subject: [PATCH 19/43] Graph Settings tab ref page update in Shader Graph docs --- .../Documentation~/Graph-Settings-Tab.md | 44 +++++++++++++----- .../images/GraphSettings_Menu.png | Bin 18408 -> 0 bytes 2 files changed, 32 insertions(+), 12 deletions(-) delete mode 100644 Packages/com.unity.shadergraph/Documentation~/images/GraphSettings_Menu.png diff --git a/Packages/com.unity.shadergraph/Documentation~/Graph-Settings-Tab.md b/Packages/com.unity.shadergraph/Documentation~/Graph-Settings-Tab.md index 949b6a8f959..86443d00ade 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Graph-Settings-Tab.md +++ b/Packages/com.unity.shadergraph/Documentation~/Graph-Settings-Tab.md @@ -1,20 +1,40 @@ -# Graph Settings Tab +# Graph Settings tab reference -## Description +Use the **Graph Settings** tab in the [Graph Inspector](Internal-Inspector.md) window to change settings that affect the current shader graph as a whole. -The **Graph Settings** tab on the [Graph Inspector](Internal-Inspector.md) makes it possible to change settings that affect the Shader Graph as a whole. +## General properties -![](images/GraphSettings_Menu.png) +| Property | Description | +| :--- | :--- | +| **Precision** | Select a default [Precision Mode](Precision-Modes.md) for the entire graph. You can override the precision mode at the node level in your graph. | +| **Preview** | Select your preferred preview mode for the nodes that support preview. The options are:
  • **Inherit**: The Unity Editor automatically selects the preview mode to use.
  • **Preview 2D**: Renders the output of the sub graph as a flat two-dimensional preview.
  • **Preview 3D**: Renders the output of the sub graph on a three-dimensional object such as a sphere.
This property is available only in [sub graphs](Sub-graph.md). | -### Graph Settings options +## Target Settings -| Menu Item | Description | -|:----------|:------------| -| **Precision** | Select **Single** or **Half** from the [Precision](Precision-Modes.md) dropdown menu as the graph's default Precision Mode for the entire graph. | -| **Preview Mode** | Select your preferred preview mode for a node that has a preview from the following options:
  • **Inherit**: The Unity Editor automatically selects the preview mode to use.
  • **Preview 2D**: Renders the output of the Sub Graph as a flat two-dimensional preview.
  • **Preview 3D**: Renders the output of the Sub Graph on a three-dimensional object such as a sphere.
This property is available only when you selected a [Sub Graph](Sub-graph.md). | -| **Active Targets** | A list that contains selected targets. You can add or remove **Active Targets** by selecting the **Add (+)** and **Remove (−)** buttons, respectively.
Shader Graph supports three targets:
  • **Built-in**: Shaders for Unity’s [Built-In Render Pipeline](xref:um-render-pipelines).
  • **Custom Render Texture**: Shaders for updating [Custom Render Textures](Custom-Render-Texture.md).
  • **Universal**: Shaders for the [Universal Render Pipeline](xref:um-shaders-in-universalrp-reference).
The available properties displayed depend on the targets you have added to the list. Refer to the [Shader Material Inspector window properties](xref:um-shaders-in-universalrp-reference) for the respective **Materials** you select for the **Built-in** and **Universal** targets.| +Add or remove graph targets to the current shader graph and set target properties according to the selected material type. + +### Active Targets + +A list that contains the [graph targets](Graph-Target.md) selected for the current shader graph. Select the **Add (+)** and **Remove (−)** buttons to add or remove **Active Targets**. + +Shader Graph supports the following target types: +* **Custom Render Texture**: Shaders for updating [Custom Render Textures](Custom-Render-Texture.md). +* **Built-in**: Shaders for Unity’s [Built-In Render Pipeline](xref:built-in-render-pipeline). +* **Universal**: Shaders for the [Universal Render Pipeline (URP)](xref:um-universal-render-pipeline), available only if your project uses URP. +* **HDRP**: Shaders for the [High Definition Render Pipeline (HDRP)](xref:high-definition-render-pipeline), available only if your project uses HDRP. + +### Target properties + +Each graph target added in the list of **Active Targets** has its own set of properties. + +| Property | Description | +| :--- | :--- | +| **Material** | Selects a material type for the target. The available options depend on the current target type. | +| Other properties (contextual) | A set of material and shader related properties that correspond to the current target type and the **Material** you select for the target.
  • For Universal Render Pipeline (URP) target properties, refer to [Shader graph material Inspector window reference for URP](xref:um-shaders-in-universalrp-reference).
  • For High Definition Render Pipeline (HDRP) target properties, refer to HDRP's [Shader Graph materials reference](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html?subfolder=/manual/shader-graph-materials-reference.html).
| +| **Custom Editor GUI** | Renders a custom editor GUI in the Inspector window of the material. Enter the name of the GUI class in the field. For more information, refer to [Control material properties in the Inspector window](xref:um-writing-shader-display-types) and [Custom Editor block in ShaderLab reference](xref:um-sl-custom-editor). | +| **Support VFX Graph** | Enables this shader graph to support the [Visual Effect Graph](https://docs.unity3d.com/Packages/com.unity.visualeffectgraph@latest) to render particles.
**Note**: This option is only available for certain material types. | ## Additional resources + - [Precision Modes](Precision-Modes.md) -- [Example Custom Render Texture with Shader Graph](Custom-Render-Texture-Example.md) -- [Custom Editor block in ShaderLab reference](xref:um-sl-custom-editor) \ No newline at end of file +- [Graph targets](Graph-Target.md) diff --git a/Packages/com.unity.shadergraph/Documentation~/images/GraphSettings_Menu.png b/Packages/com.unity.shadergraph/Documentation~/images/GraphSettings_Menu.png deleted file mode 100644 index 33717fc6f610277e93bb0b3ea04074ca9df1b56e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18408 zcmeIaXIN9wx-M!56r>AC3891Z-XjpIv>*yflU}3H4xxVTx;L8&f5E&=RWuM`N0zibADrvImh_Q`@Y|d(AQNbyLtEKrAwE{G&P_G zmo8m~T)K4SGVu-I8;D{p7WlaAX`rrrsd#|tH}JB97$0d_&5V!uu-XeZ)>0HMN9DXIlPHVo)x`cl1zRN@ViO>4nVfZpp#?v)*NWxwSMe;T81>v{S#0shRAced;B;W$l+tzzMduD5O z`2@rqkH0%vOsHhlJl&ja3Tl@XH8-BK%qkdwgohA&HTZ$G# z0fskoi*PDFNXVJbL7&*5jhy#pUv|(LetjH$_DY>&cjTd-EuGm*Sfx;h3b{hk?8~1z zLrtO{12U^NM&`b@m3qXmoa%13o+RGMYz6=FU%$-hPKPAD){VK-`!l5MxpM+=uU*0t zTvO+&#?7$5%81sudwCQZs^&F(c{Z_Gmmc0$+y>Um7i=j z2$_`IXj-;0^dPN;Uz*px_%ID0La9#v{+wfuU1f4>!rOTh{5R{kGh|;mp%oFU7KL*}nl5uqv)%1s?uTR)%OVm2@2S5UdQzcd0S0= z^RHoyoT}a**!uIe#0y&{Fc|M?*5KuWKC{mW9Lu6!)jKbE^wkt}#iYziwc5J#c1_UA zJ;&8sOTdH&R{ArH{0A~~73^c_n*MRwQgFi2dOMv(AABduVq}V9G2K4r zlH~y%X8)%B0i*+|CgsN`=W9c`S?kiV`-5pBxnqOR!wCGxq~YJ3TW9_hKB;hW=}K9n zP^w_^FACL2uI?IyE~(2x?^ZI@%z9-!Uws?h->>sdyjvAYY>gc&62z4&R`0Z5f;td) zSgbBa32oNg_KfRlcN4S1?bfJ|WggbLFU^Rmz}SS?3^>-*llBJ&S5zqD$teXXbM{wN zzfklbT_`-HU#g{f&$x&CXC6Mi70>1p50a9mzY&HLp^r>=Xt|YeD|=xsQBU#r%CKwQ z@*OD)x}L36G{M$|p}1kQ{_>Ee&jgx7rDp zp$lsV?_G`u{-?nMsRrYA$1kto`ESO2pq0WEVmeM{pI2EENg~c6Gn-Pi&Zey)J85w9k6=7;Syo;wGKxi#Lp3 z6-+&Y2i-}*RhM_+UV>%gP=ujl2BG#vgn8{eLrb>Tl;dXXT8e@CQ zjn5?|Zm$VPv+s*M7eeW7BgC!gj`h3A-+0Qe;MY_}GC{Bc7n3bQt)=pagQpKP66%UT z+BQiWhr`Y9T~iZx9=3Hw+Kx#%mXmo;x+o?Kk*!d=&J?Xqn0vaAOW=D0@vH56>J*I^ zgHv$rh9R=|>qMH(Y|)_fp+WbfE8DC0WbT}1QmZ%xF=lg5vpzeQX)~t=8+;|Np(4{d?fMggI~Yi5ZM7 zHfts$tMNq%54cgP>`*(2sJo=4O;8rbVzrgdL!Mv}iXTG4IkdFb6{we$a9@SXZs{h4 zPxy271Y?XWt>`j&$S=+cukJ=F%Z_YsPs6u^K{n(N!V7e@TDqKf@mDk@ws&d58rgqG z$b9|JYv<|e{?SqCKl!;RY#8CF6Ee_re!8Wes`=o&<(5$Gs`Y8B()!zbixS~9Bj^FZ~i_4U9ow&_TvK_E73FSJ-5M^(teD4Z@{$7@uf;BT|<;# z=xHTSy({tc2thOfw}u;12W{|GJehkzY3{7bS`P$_cG|a}H@o`M#VS(G{klh4VvFYZ zM#y|Os>V@)-~h0IS^da2DZsaRRr~JR89h^|b|tRLDyjcdu!eK*WM1XF{uD6w_nN*E z@^z~{mV2I>09(>yIoYT_($$dlWPv=$7%R7uW?lZgxUPeCW+iyN7r9YfyLi(mE+Z=S zm5W?3&&GUn@Z@3B;kT!Z@g30&VotrjCm*6YMn@2_ajLa_O}r1g>*bqvIvCBsY^XH+ z?y5Zm->v7=`99}vgFN}4O@oevMdiKIz0Z(-KY#z(9mg7%yPRIl%Sxej`oxC8CmU`- zSd;)N&&2K9Xw^>k6BrlY6ihyQ^%*R^D5}zD>*(zV2dY3WNRREXIz}gN9Yp7|*$4^X zDvYtx4q$O+h}dD6|MvNqdHTmdD#fFnBhe*KYC%tUKzCVj*1Zy$t;-vkxy-GW`sB$ChQpLYq@baNGq@k3DAT z7vD#ptI;xoN)8seKhO1|;j?Y8o?Vr>*_B9(s(HydvAcA<+X)=Z&ymP_k`~sJQQCiTkiBM z$3qT~(4%c?myp5WD8ye8^X|v)REFIYdBM8}VYsD$BSKlR+b?CBwxKk7@J`qdKi4rybG;1+Ogcr_Kc@1@| z9G%t^!&P*4^a`QZv;Bv5=S5V6t2w8v<~9;QQrX(3-(SQEU7tV)p`%CxE$N{ujq1c1 z2wDewGZb%-8A{dlQ`jOdp+ z35=F>W=YCVIt>4P`#=EyijFxRL?^MR^p*<}_J&l3;F5N-7|Tz0MTH5C1XB#ZM=sm} zK|zqW*P0e0SWhLxi~_cOP2C_WUIoWY{f_V&5&z*XE=$VI9Q_JQ*)VS59bPmCTVjH|aMUX57@`BPIDTj0{#{A@AW;Un zB1o&Py&lT3Cvx7V8Y#ZE)Y=;trI->?97oZ6qtou__pP{FNedt(b|c)9sl3|dbXje= zQ~%Bz3Z)(T1uDlKd7tdQ@F$g>ZL%;VI>#@B&V&*=()VR5h6K|}cQgKW?*|UVQ_30v z&xft4pjLBp@)XKzyME5pi8|VF`Ji79Q3lUd1p88PX}e3i-?vk3n`-&XZG1-y9&Jig zxSZOaGg+-#byFmuRrc4tcT=xv`#Z^!WpN`GAh6ukkUA?=|+DDWXm9jrUmxvp)s08Ij*RFd< zoO$HpmPE=e8CT8_&Mp(Z`k4;PllD2UR@-G>d^kS&qQ3sNH#jP7RsC8Q-aXz^P?GMB z)>{W85AhfGSkt2>f^q68KW|FfluBaF0jE8m2p((9Pi-KGiJlI1zZO@W5ex&%iLO)!b zeG!}Jz3{KZ5Xl+W32~`-PBtNwIx2GFxF4`AtHl4VfDMt1h-HNItx`RqQdl|N`}E|W zIYP$5l_jDUf_ZF?hj0yzNeQhLohdi#&80aq>%d3B`LT5m8Yb_YD0zMT`_MShH>n%u zp}v3pn+BYg%d0s8_cvb05%{#%-%>Aw53(b0KavPmZlx5;hLrzvdIL?EK+{J4Y4)e{ z*UM1FQFk}DtF(|%nIM3#q-d@r5uhFv3T=XXFlHZe>n#^C4LF+&2l~%L27EjhqOb3} z_1RERe#eFyd)3okgTY6nLRoQhNxTnDKhcX?b{@CS=SLGXoVBhC52x(bl#~qG%0v`R z^W{Yp7=5jZe+50H?m^ys$>II6DQZsliqRCl?|1`zQ3_#UFSBf&Dgtob+>@ym@ZVbA zVc4kVhrIYFE2gaXM16nyXw#@=%Vkrfhkkh%nrF5Dw0SGH@IB|U4dn4xS}O^o)>jjB zFrME%yl4%BhbBnRMfq-hrZGR-QLZFV6@+3G$Xb7tWQm_uCI*bTk%MXPVB>4zZ42fD zj~2pTcf8E<3$?eTl0a~CmLnagZ_RW;~AX#~GDFcL@R zI+2EWBu2w1R{Kdw{@B-i$)X;uT%&xH)*7-vcvZC zC0gK)t3HphqhqwAoO@6^~f`&rc7t2oy6JZcV?d50};BkAb>= zV*epsh|uG6V=GqeH!zBOHv-FC_&6aUYS+|U#;)JGGm^J-izM<-)fLJQMOf-h?#G^^ z7U6+AmNolt#8)2sOwZ9Bsk%X{x)Uu}xFCv*edOh2s$bTuuTkChpM#&c9ENU!RA^dL z)p!)Atgy--F{#|K`r@klPw^DTD$jD#N)a=Ji>a*lhV|WOUCVH-*Ti8xa2Rz?S*@3M z4P(XdWh_5I+Tp@^r-a=>Gf?so2fA4$=6M1AyCWZM6KAtEEj;b$bK4^=@$sKOmyYSx zs9{s`SsUCXD+TD=%KL}y__98o+ubD%z!eTte{X?D%uOP@wd(5aQ8Pc{BEQ&b{@?7a-C>2t{VOgHWgDk#V z1nh*K>|f5M#&F@u6lM(H8t3TQV#aUE*ERYT?Sa|O?Nmuo4So_vjI*h07pKr+LKQp%_2m!8vh>v41=DA~)|k@5zH6u%lK{HOT;TXhn4`D~YCOfY1P z35fpZvNrp2%12cJ&KX`U=Nrm}5zq7UL`TSeu^*{iooWAbicZeoIwAw2Up)Cl`O5h;ZlbAG@+>@! z^e2bu{y4Sr%arQg!SKC@Hl1YCMZaz+X9989#aN@|a%9im-d-&xFQqxu=K9ElakX>$ zgTT@0=?t^L{n4t^cv8#FnL5{?luo2qd3D^k>l1Ei;+8YD?t-cG`|^b`eFHXorG*3i z>vCgugAvw~OFK)Q4U1AXH3w*lKMHz1myNTioZ@+8f+=Fe)^SUnpYoE~6cl8BYA}zE zkFOr*AB06~SgJbl<*C&385qV(1oQXXj6Y*ESgIg{z&SK|ho;|2JU4}$sB>tX*;if2f`(Ox>dN z)Ez-?4;m52>+xd39ct5_a1ARFLk+ozQ0yi-?}#g(Y$}8yiO5+BHQz7=?mZMrwhd7` zB@27U-x>BvkW%Q1}Shk1` zvA@#w;Sb3lEbT=)M1ElUf@NUwc;g96{5VM$S~U1$@VJQVNjeRpdW}1>9Lz06U--;G zTVI4eC1E(*Au5pd_u~WR>UPX31d_r#Ww7N-l}rVm#8LDWgjign$VFrJAs>C_9W5`1XC!Jn*) z>^PgL*B?q&PD31`EmJ{5G`pry0n%5$S5bqBAS)~LSeftXV)k~2zx+!w=)`!1{AF(_15SjL!^&oO4v9EAWo>;_t!g); zv2f!`AYm_T=|{M;3**%xR@&n?86c?N*xY(kYc-IFEumI5LppV6nxrSfGWaqZHq?n> z+UmZkCB5E-k{fwov6zpc3bqW~eeYf%z8-X@ip=m}YoE(dKTFiQow z)6)=a<;}@NUOke$SqlJmbxF5wuXZFl^Q2K0*X6{hC#g2OMqYvSb#1ALk6Q$N`qy}v8*msp$QGE&_ z`(>vW+pOq7txTFng;Nn6+2HiZHAtVUv249DJ{TIyRP8doGW8`yO{NQggF7|D5b@=) zdth3=f=NX`KR;6?wsN*<#V;?zLgFY@o|s6fX~T(Q0|fzif>zurr#D5wGcfbkqj46$ zHSl3$90ma0%86KfzB5yUJ>W?hHm8ldBsuH`0cZHtEaESGHP6QdN%Rp+T0)Sv?=MoV z?sr8jPE&L1z6>-ajG(FzHxY5pxBEa;$GEF(Tv3Gp0Iq997Sp+&=;X|$e7_bz|CC&0 zID~NQ9~%`u72iny?bBDM|Gbq=dLVdpfjspI9ez{}bS^`sgnOC=pn$HE=3>*j#5)jR zys#)lB)ZgdRhLd@NPT2)KA8OWLtl%Mx-Dqe_73zt>o zH>W&c?5QZQV?1F%dWp0K#FnoP3alI(5RM1)3?=Ff=|ray5PK7l(Ef;R`lqYiZUFM) zdgRpmU7iK^)m!lc;dNK4r4Y*IY;cQOnGmEUfWC12Jlr(ot@l^X^Hrmu6l5FLow2V1 zy?zESu6XT)w_MIsuIv2u>(^7pR_926v6)I+OvgdBu7);zMt?!DR6wk9AQ9C1aMNxu zTVYy3&FAEB%ll%iGfx}Y*D^{`2er)=e)~>`#>7K82E9UCi_2ErcQGQAw<*Ui5aDZ! zbM2~;m6WROn9d*Zby6XVH5GcUkA+Qb88gWH*tsAmh1jTVudQDj+3MNA<;U$ay!Bk_ z2>Z52n}s}Q!Y9mk5KBFXlf@z#rHZSIDHem0p2A~V$jDsMn*9ArXi*f8TitSs^Tt$_pe3Ko6~~&>MAz)f9h*nl;*JJhoy^{~+CAf@o;of; zBUiwjv?uR>$e!ex0hyHP%TNNvEyua>B9m2U+lw^qjxqb;59UH2nO#65yTmaM|mpD&IRm=g0eiM4iVp_Ijw%Bc@=U&UXc&avP(@x{KZKR z21R#$t7m0aGapW8d*3kLq}r5X~*spb4&Z>wK+v5DWEngR8-vG$P6l#DmY$ z4<^ncHXU+_hXLHkI1vP6=Ut1qA%jK%&Xg3C90yYAjuL9BwP4&Auu?H$*MnD-m{IGe@IgPr~)-_*vuB)FWgZo<8 zD6pcI0Y}OniQ-sdbZcBdNv`bD*H7t-aiy@~MUrf95860Uw7athgYQjG1U#!HU!kcJ zX(?qOsW|gp%~~BueEO~Lp21rxuohf7DN(Cy@L5`f%{n*F#-%c_PD35+TI-_z``2q> zC+efh2rHmG0hTV`zc|?c358FvOufL~XV+ID=e~OwfEZ=|XTURAK5PY@3CkT!SaaS7 zL)E`aNE02lWnz9l#$V=s6H1~IO0mJo72?WvkQw+whkY@)x>t{Qh@tk#x@C>aC$?<$ z*G*u)W^Xa$O#lAb@(iP1FNxSsCIKpGk=M;#TSYa$Jlc+XLICcS{`G$xtt^JKh7X3M zcIx+CzQg=E`SbxmCSNA4B2>H1-kq&xh>ZQ&a|X<_?b5q=3j_)8m=PB+-?mE}=oMfE zu2KEh=M8qq$_hcIwyCM<9mT2DX=}{IXy2b<=sW;E$FAht!Mk9fzzMth_o6-|fii)B z7Hd5B0t|4&H-txU_t=3+SY4VmmqZQi?Zp5-V2Jaj=On^z_@`7PusG<3ifq~6Y3j}K z0LT41@%^uxZljMo>5ysy1Jw1!uakptF5uVySHM$_3Ya%a%dKX5mRp?uF`8udo`FTt{I*W-yg-G$MjsiC9$bEq!ry%ntPbg6 z2L}gsUmq9sxHjQe)-P!1jp}n?!$~&)xod^{QirX5wy#|^kayH<(i)k*TiCWnDm=!D z{npNsm6)!u*K+~oEx>^XS)QmX+YNZC!0l$DS;aWIP!nfR3Hq#_5pLnXQMGCMmy`dL z;o9>_FDDytlD#ApnoUQGQIojk-UGW_`aDc+Y zZ!;J4V<}xO0QUZh&|%+|bo zc&Mi^T1AaNJ*YvyilBL7m+v|~WIyd0tEaG^MfiVLdgN=yiiZ-|6+3_%mBNYC@ z*xYxSwnk^7Q-6Q6Vap2{afMqqbB)EqvtL3N@N*Ll-X+hG8#!yS)#@z1900?Lbz0RM zsfC~V(UEz;RabdJc(`4XLD3+{uWlr|3?BRe1Ne{ek_~_lN8Wack;e~poFUd&0{4ah z*Ec3$QcbE6-!K0xyA~nNaKP3Ba2Em%^KWm>WZ7;SQ*(+IrVv8%S%A_w#2~6!C;Gxw zW{~i+3$xvG0y26g$iMD%e+@yn`-UengT8NxvdVqevOSVk0xy0K5?0=~kgiRJl6HM9tk)?i z38LQ&c8FtSC(Qt45Sle-04TaK;JLffKM80uuzBGW!2T~#cf{BW_hkxODsP%Ce0ZI~ zsqxd*mBvzKsg!wWvY!qN-RH>yI7$@t|5o;qpakrFZ~?HH6EGJHA)K%Tin`hIZ-`zi z`8Xc!3{&vg3R8ZakfU)M6+WTLS#WjBa{Zgj4FG5e#~20ju|quO;E{98!4Yi(|nDGn(BlO0ZNpK9NR0XU#=(w>2(+$)J+0lPXz z?Ck4NWnLRkQw{jWjM^?pJ5jmL;{Xkx`;SwMbJkdt@vzv}R3tV>JJSn*sA1sjbSuan zp!+?00Y>l(yQ$vG6s>OLh&~MnH{Bho-XH`qFosDjW&3ZsSBbA{QpqR+b$V4{PbFBw zz$m^7e~c{|gdhLRsrO=Qydd1ZX#h%#LRz*0Z_;idGG+Wu=<#x@g&n#4_Iko-MRv&x+}C;KHq8)wJypwPGLB9lp)98SGwrF0Al&qmP8Iz9fV2OI~$ zY8+u})_3ylj3W%cXTZZW*KAt!~gnT_qBvo+E_L&dz=cW=Bbm0mXdcK!&7CkFNYq8=QdQ zhVUj?42f`{#p4J)L~khCJG2AjKM7O|8tTI3e*q*GV=?Z7)g&;gM1HZ|w7`?{yc~it zQbw6&w}Nhkl#;iX^fN;WYbhI^mRSY&;A(eCroK!3Jh2axNoRf@q4s%4KQT%?B@j;; z;VzY$A9qE`@a68Z`iR=3#+YR~9U_CSZxSq^^R?B$sYi;M-=XUOA2w|DdP z;o9GW0I<1O2Ytw>SpOKVT$!j3?^m9+hjY`ffNn-Q2fG;&k5-_huGNFqPt?{aT+ispDn8`$BKX7yb&Ch0|-q|m_nFU z6FCPYp2<|c;MZd_!*4o>J77PAnITGco2BE|wB4E$K7J*eqo7PNUJ$?ufh=xiFlQ?v zd`gsC=P~V>)bJGl&zp5eg+(m;d`0mkTfjp1VzAJaS*CepOD$2r3V9TL?-La+1JDoL zyJX#)DcybZbiLp3F?&UYfRysLy@x>bDqcQ&SirYH-7{EFvt!$x`e`maF~h zN$x~Y#!)0su>=uzo;n>jMmi&Y3@=s8{QUXw>z}X~( zPErpJZ7 z&hq}VvPkEVc~v>W>!J`ekbnqQh~<#C-FfW2bSwD`5Sh(&ZvomGkI>`Eplkx6lL>G< zdXUqRK-Wp~leJIK0yDF3F>Z>A^a1oopYmd)kl^c5iiI)cWp@70+Y324mGrzaIo}X?`4B{TVw%_R?iv^3N;Q zF90kqb`k4M8HZ>ejW{%%9b?THy+dnUXQ$juddv*A<+;#TiEh_+A@K^-S@GP!uHL4X zF&NLiAdHaD(%nE|qwsGQFf$y$^Ti$^X42eF0J30qdn^@Xktu(MwK#vuxai^e*2#MP zp5$t{VZ<-v)WGsnKywDDIhjkQSI_IK{TNxP!^rJ3-PMX>7Pt(`@%K42EqAlCS!$x4 zjalTpoDJdCeFue7?u%_tf%_U6+bsHMp;oC?{=ExUDC*Bc4oK5F{c+Rj!Sp2L9Iq!O zy0ctk*MIjgE$0PgD8u8I+)1Dlo4}QVy4>ed`gfB-ix?55t0zlL02Za}(7AR8k=)vQ>NrSuM90pVH47XRe zO4th?#1o9|jJriWU-F;e*sq+dR}9VsfKWCg+d%O%dHS@udjD&K$ZW7S!>sU#Z9!Nd zKyk027#>qg3vaa8Cn~P6PX^UAzjC(VP&L$o_kX8mXWMntB9+LJ4&&k8$8^$x-c~sD zrh#nXk;x5!_qp=^5J@1IW)DJ5@q5$v1d^Rsjw%D+Kra z`euvhUS&?j5o>p8JtGySBYkd+RJHQ~KsO@p(BH&IEC8h9f2TXBEDQWhUcvSy!8hI% z)I6eld zCjJXw20iJ8a|C!s_I5~c;+=wvRnzFOkHLe~zxJrvtxd=((}3}hasc63W1vkwYbxmX zij>>0%vm5i8G40XFtVja(c&<`SMsS|8{|Pp!4DLjo|r@N`5}b-I`{4QW;k_HUIL1k z5*hJJW7H+^zN@%_PAKj4(Tn3plg5X6iMk$7(lmE5`(5jJh z?hS-RGMP+5Qc{3@9tGQS4G31QEvktt0LwrE6#@YlfPU~CDIK9!r1w(l13^Pc_0O^Q zTwsj_AKxcO3Ra8y$FLY7*q_EYVyVJhrKtkrWXa(D$=Hoa^5iR%B^%QPRql%X(`UN{ z?H{#mF;Y$=JW?U|JsKCFre3&x3~&KgAu3`Ns#8lq(bhoDf@Clk3)!*Yh>a5d?GFfF zk5zL6c)m>7^`iVqmOGim6Rfq`-9E2TYy>zyeG4n7f|<@}J;kZ^)!PsaejUD1*m>;S zd9WUCtHx}JGqC9t)qD_D&_3Dp^>%ZVMQvAj(}ZMld``1|;u_gyoaOtXY(h&DkiNJ= zUj*F4EnJ$?6wz%cT2%p^sQTP+Y;i;u3DrmG!!Iz{@(=Hu=5D8y|GK6st|7;cL=%>U zipPk0yM#)#7<&uV>-~F=`c{+A{BU251d2`8dj7c3Tzd!LNoYxU-cirJl9A&t{?7uT z)=+s^N#CmSfJ14+MI1wzTEm)WhfM4wVlz z`>xr>vj|HaA%h6H)tN>gV-yW0b|))e2~ZVsqy0t~>qCnRe|3~5Q6<7{C2rD*e75X` zngt}XDJl|^(%p>*Iex2go;1K-=#_QgNgaD%E5W8=^~ARq*eve795ChZ6lWSd;H*#8 zhxheUF6>bAp=bF%yNk75Q{9)qu0CL7*s0CeVm$4N8mx19ehPR_2#c7I4#@L0Kl|U| zNt&GN0e{n~sc0PVkWDP?Hk{;vtDW%3$C8?wngvUtAr^0V-POJ({3Sq1Ll^hw1*r%R zB!d4`(KSUF(kfEuP`3tG#=m)_YMq^yPr4)ANB|P`E!X>L1p0d1!+Y?+``4-gSi2?= zmMnRUk1kitfk8Xs(&1zFJP$xB*3e#uFvWon=2f+>SHDQH9rSdOBmN++)Zr(B&Wh>soG_tDfEy9f%tl5j@^FY>BIo>}S+1-a;AZ~SlSV;y+3ajjUNHN3^v)6cZ@ z;#hlyvClCX;6DFddi>BJ^D_>jzDJ$`7dBZPPJI()zQO`ik!io+W={4!;aTWK4H`>y(hg97+lN@j2Kx^zmc+ns|} zc}w8_& zlqohS|MN7*_7{2}!s%^Stn8os^)%~PN8+($LOn9J8)*vXpks}Aouj~+(#WcoiyaLP zcx&^r?)cBwiVMU%=#Kge{-0Z*aL*NsWWt8(K7OpGi8k4k(wTZXHD8c95p>R~dn4u1 z*T;21zstNVBp+7{$U$cdndiv8>8^S0<9l#9 znr!4K9j~kuOaO>)Uk2C9FynzQwc&(&N=Hxw7};vTMN2PlF#kVDv?;|GJB0I>-$!!9H_MFbQ6 zkwUpun&vfi3m*FN+E_rjS1l0FRCll@_i`<6I(%Ow`l1e;U21&FqG;3iKH6?#lR8_E zeHCy@cSjO)B9Q1YF8nJHpfYRKM~R;)TUg{UN)FTA3|s4&OK}(~=b!ewk)Ez;Huw(< zuCba!-10eU1O0B)%bh@0@$P`$Y7wYRPJmkf`0SpX)|LqWbgfxO=5XH|-#vV@7U|?0qJKR~M*Upvrj!+Z%alhp0XGn1 z3u7j94Tf}*mB{bB0d9Gv8GJ@y`6_MoL!vhh!d#46BnFIcWWJ%OQn}E6z@;EIr6o@m z!>;cuKQ1(eC3>z05IV~|sYhEi@@?L!Z z16@PHlMJAi*NDl|Df=a^V9Rx!El~CUUiAEDqY4L+w_9?DIWQL+lgUP3Pnxqm#Z04d>=DoTBqZF3!SEqb4J=#Lj_msRw1Ko2;JVBeOfnaIQeGOm4L z=~6coB=G!>$H9ew*w&0Ih89(Y`Lu8FGtqI%U`k5m>vY6GtJ|Sf!o9aHRwq=Wfb3xx zd^r2a$ZWJ^0~ICs$LRjryXVF3uOyxEVT`W%oD{02n5!IDZ>1;kO4?u<2;3b2A~t)z z`IM3OYuC3)HfR`sS{HQfkhtuN_uA?8Yu3 zBlVCVSuUAao7CAv$iG6jnfUTRBf3c^LvqyPkO7+gzZg`tvsu|TR?|NdWo0plIRr!{ zws~E+i8AZwSYtU(L56ovrwRDoiVMsIuqG{t)JY+bhPlMk2NEYP2nF_mJkFdgDw%sx zGyk|k)&#bxie+Hk)?1dMZ%e7Ck=qdWxb4%kot)l?U%F7h8cebCa`X(Euk9`qk=8s( zeMQeAhLMbz+{r)ckUXPkaFBz!azHLKC(r4BkGX|vm@qR3xf+(TNI|Sl71!@=5sfn; zKh&O!(d7b1ngd5BC+1KD1Nkp2J_2*GN#X!C9jmyFn)o>JKZC;mhLY2uf)n+)NvrN} zC&rLo0CYrjL~MT_cpReF<}!ni62~@{%xHSg~6}lNTTYg_x6S4pC{zr_xre+`_*7e)|<3pRr#ir?5 z@Z;ZtZY(5PU(%Jz*v>T*o_wsS8Q+heNs`JT9zIYh@TbZwzfFy@F}3pr+PkU(F|?fJ zfpMU?!a*7tWwyO|zH^|B$%}Wt1gIUSnn<%jllk2%&MqGa(yoO^21j?}7)ys%6Aqs) zcOzGymef*rszvvv3Js?4KUw5Tb(uvSb_ALE#t;hSd`s{zD0`5GPI&^sfFe%%WP0xG zu}SseC+F?Sx5gGX4b9=Ed4JJ%Nsr43vXR7*$irJm zBK}>%k+QM}{1diuJfN0%d36_n)a~3FcRF5s{fZ)El#~YJL!O>$S`gT z+D+9>9KFZKzZUBLoA5ItBewJ7)MzYEyE-uH(AMi(av(!$I*R7)W?nw6HpRH)jbOUe z^*%}Y5~=m&#)z@5`#P}@3%F`~YRmZhq1Be9#_`BN09`P5|6KFS@9Seenz&?6_kKB+ zl6%*)2;>|m%Q7_IR;p(l-z9@IT_8vE!Rx1obKZk^0M_WaK#|AQ@xwxBg6PT5oHI;V zchD);qC%+YsHG|gXic01;Dp4$gGqZqtTeV%AcwAcIVwp=5v5Zc1%M@k%tV%VHt6sd zxU%;P9sSQ8khy|pI=-9+`n~pQAVsVtj=SWEAH$*`_rTgGO|bJgIM z)9r2an??ua97!~KL1l-!P{N1WDD>oD;3w}H*eJ1Deny3F`)w}QHYapOH}15 zdWgAIwuv$#1PB{O4d0KR8MirXH#?}o1B`bgsoFz^A_<5W6gR2F@!*)o#Rm)SjDdox zC6CtYE_oLgZ6YY|crRw262JP@=RZwcNYaLdx98%rfWc8S!C7#5*=iZR6KTAfcwt4;MlcRd^7$j*ObMJ zSXA5grc8;>WqQ4dVUigp6-{g2Wk#*G^HYXC|A8Xr+JC%RxhbZ-B4>;WNc?Y<2fE|2oy=hYZ5hquin`$ zcZy$Lv^4hu*h1G|lX;IhcooIu?KYDRcprYM1s8X_^}mxS&N+PTCw?PmV+2D4ozO;J zMp|R(&A1_KH&HTz(vjplA1ZE5?{3L%5xZ4#wQRN1 zH=Xc3wzm{X+!HAj+Uc@aNAvA**{YTB491t1*83?Sam>(L#!to7{_=0#wKh)#i%d_( zfUr^DR$5gna4KVcHSVo%HB#VELp^xojq~Giba~AjeEM5#qif%JI^l@TK7Bm?Fm!M) z=bT`Fcs7;@I(Y{F5!N?*Wik98s#AW`5Xprt>O1U<858Hf)pNI7mT5Wp-hy4$8}EiL zv2}l7!U4`ibz5E?S{A21AN08N(U_l!Rx#)>yb+dm&gk$-J2KPqak~-#*`s zYc?*k3T=3xwRb;+@}xV=fy@Fvs~t~>y#My$XWf{C_WM@a$rG8NUPLUD)PZ^;6U)Kc13*oX_3+~JLGk6tCw1=2JhMh;1h1fX-m zi>1DE<_c6b z0D~&nd;R=G^C`=j{pfL|lP)Qz>Z&k(k^@)?gK?fiRyzzwF^{g(( z_E>Jm?a}^#r7+FM2CC&Hley!^h90V=e{ukdP zd3;nQOb8*0$-Ej@PfUONG}4jTaFd{J9fX^fiA{72|2H;dyyJ9dE=*M-MAA_h8EJRMuxi|K7Yp7)Bfm^p&6az zkrmW{k1FG+e|X_9f2roxu)1DKNh?L1HdtXxZ3OENN6AvD;)4BFUq9RZ<4nU$_xJt+ z;sv1aLKMbb^-y-6Ndpk{{*utep0D`(BcocgH}k!3#~In@uGPL4-o1Dn|2UlV8g$m& zLfUuxVM60Oazybch<03#DE7e!9aczI@Wf?56KWq%xc1Tz(4buI)_V=`r7GvYxBxkJ z_nRMa3`3^urGnFK2b={!Ui@Fp^#87jVAE_m+b>bCkc`5${=ej^``(ax!(ipP=N%Yx ztn?!B;a}$FBGKF4P5u|j8U|GE=RwSWju|$Jvy`k1slFUzIQfC*rR)bUwH6J}geC@_ z^9;skhH?1LOK>ofb?%Hig_(LKwEoJVE#b-E?{Kx3U8I&K<4iR-lG!mDwf;qI#tQBCcPClFYGVd zi}u?WLqy*Zcsf!Nw6oY=g}K7P#>##Rzu$GJZc^x_W=?kdKrfKIT%rOAwDo(N4$oFZ zYZwdVY0z+()-HrG&Xggnbl_*6j>}BDPI2;wGoGh;Hwz!2jJ|TS;U)f#0Y*P|^0~zO zSuK|7HwVzx!NN^$peurD0EjwNl^D+HMd^9q$w8f=q4P8#PO4VTCywM1PZFbvuv+Sf zx#;pYr7~;_&y34CH+`qj*?5b`vt z1c0_vGmKYe>OAdT6cQ4tUQL$2;knT2VJu6L5!BqWVCweC`VnT5WupE}>s$#9AF?!A z;q|I`!d(@B)Ju-DsF08+1w7=Jqz;O7O*oV)(E>&m`{EpG_L%ba9YNEzu*qs?)|&%4 zmVlMTcb)MHpKG(hosVK&AGaw7cXOkjg=2Oh;7r#cCtI zt2zc&QeIC7n%JT&g`T9W0=(W-KpD;GJbg653ia%li2R+wkJ*2%nX9ZEw2a3gw!Xi) zTIH(})&WgDll}Qg2TQlC1y8V$(kH0nIN~5)opBd%n-4LZ5O1tc?3Knr)6);c$ehOHFRLnV2d|pXq(NLjH{&Q{8yCO;2Y76cbS5LmU^wD=P$DNMBI)5 zokoM_)I}rX_CLn(A){oqpkhj05cCdpVWCbF!bk-o(yX`d0%F?AgZ9e_Ihb)WfJ(bT z2i|?uv=?yHt!55_JzSUaTK`FRAGqZo!mPIgtO6BPd}H^`RpyPMh_VcBWgPYfA2%SY z`%fm875@ly5f9=B1xP^L1a#nS`p=!1@1dxc!w+@wK+K>NWI+)D+^cfHf3Xe!%iA;l zeZvE9|M-^(>VK3w{huXj|9BtA|F!sk@8f@aNz4C_MIp|QZY77vGm2P2UveuG!#JCE zv$kw5UPW`mN01NA9xL5KIUNsl`jMcT!j_2&`_zoZs#U-tJYv!2B#Tyy!KV1jjOo`x xDNtI%f#C!z*I;FUZiCkRM^+T)W_M16{PduYEc;Oq@OGX{nyR|cV&!LV{~tD%aC-m% From 3d94c125bcc98d73cecd885243327d0bb8eeb96c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Duverne?= Date: Mon, 12 Jan 2026 23:49:12 +0000 Subject: [PATCH 20/43] Refactor the Shader Graph doc section about Custom Lighting sample --- ...Graph-Sample-Custom-Lighting-Components.md | 161 +++++++----------- ...raph-Sample-Custom-Lighting-Get-Started.md | 39 +++++ ...aph-Sample-Custom-Lighting-Introduction.md | 41 +++++ ...-Sample-Custom-Lighting-Lighting-Models.md | 51 ++++-- ...-Graph-Sample-Custom-Lighting-Templates.md | 29 ++++ .../Shader-Graph-Sample-Custom-Lighting.md | 62 +------ .../Documentation~/TableOfContents.md | 7 +- 7 files changed, 220 insertions(+), 170 deletions(-) create mode 100644 Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Get-Started.md create mode 100644 Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Introduction.md create mode 100644 Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Templates.md diff --git a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Components.md b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Components.md index 0e299ba5875..65bda775d74 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Components.md +++ b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Components.md @@ -1,129 +1,86 @@ -# Component Subgraphs +# Component sub graph reference -## Components +Explore the Component sub graphs used as building blocks for the [Lighting Model sub graphs](Shader-Graph-Sample-Custom-Lighting-Lighting-Models.md) included in the Custom Lighting sample. -### Apply Decals -This node brings in data from projected decals in the scene. If the Decal component has not been added to the renderer, this node does nothing and does not add cost to the shader. +These sub graphs are available in the [**Create Node** menu](Create-Node-Menu.md) under the **Lighting** > **Components** section. -### Fog -This node adds fog to the object using the Fog parameters in the Environment tab of the Lighting window. It should only be used with the Unlit material type since the other material types automatically add fog. If you use this with anything but the Unlit Master Stack, you end up with double fog. +## General -### Half Angle -This node computes the half angle, which is a vector that is half way between the View Direction vector and the Light Direction vector. It is often used to calculate specular highlights. - -### MainLight -The MainLight node brings in the Direction, Color, and Shadow Attenuation of the main light source in the scene. - -### SmoothnessToSpecPower -For lighting models that use specular power as an input (such as Blinn and Phong), this node converts a smoothness value into a specular power value. +| **Sub graph** | **Description** | +| :--- | :--- | +| **Apply Decals** | Brings in data from projected decals in the scene. If the Decal component has not been added to the renderer, this node does nothing and does not add cost to the shader. | +| **Fog** | Adds fog to the object using the Fog parameters in the Environment tab of the Lighting window. It should only be used with the Unlit material type since the other material types automatically add fog. If you use this with anything but the Unlit Master Stack, you end up with double fog. | +| **Half Angle** | Computes the half angle, which is a vector that is halfway between the View Direction vector and the Light Direction vector. It is often used to calculate specular highlights. | +| **MainLight** | Brings in the Direction, Color, and Shadow Attenuation of the main light source in the scene. | +| **SmoothnessToSpecPower** | Converts a smoothness value into a specular power value, for lighting models that use specular power as an input (such as Blinn and Phong). | ## Additional Lights -The additional lights subgraphs compute the lighting contributions of the additional light sources in the scene. As this lighting data computation requires a `For` loop, these calculations must be done in code in the Custom Function node inside each subgraph. - -### AdditionalLightsBasic -The AdditionalLightsBasic subgraph computes very simple lighting for the additional light sources. Basically just diffuse light with no specular. - -### AdditionalLightsColorize -In addition to outputting the Diffuse, Specular, and Color components like other AdditionalLights nodes, this version also outputs the light attenuation separately so that it can be used outside the subgraph to calculate what areas should be colorized and what areas should be black and white. -### AdditionalLightsHalfLambert -This subgraph node computes the lighting for the additional lights in the scene using the Half Lambert formula which wraps the lighting gradient all the way around to the side of the model opposite the light source. Frequently, stylized lighting models use this type of lighting instead of standard Lambert diffuse. +The Additional Lights sub graphs compute the lighting contributions of the additional light sources in the scene. As this lighting data computation requires a `For` loop, these calculations must be done in code in the Custom Function node inside each sub graph. -### AdditionalLightsSimple -This subgraph node computes lighting using the Blinn formula for specular highlights. This makes the specular highlights cheaper to compute. Blinn specular is generally considered to be less realistic than the default specular that the Universal Render Pipeline uses. - -### AdditionalLightsURP -This subgraph node computes the additional lighting using the same formula used by the Universal Render Pipeline by default. It provides the same type of lighting that you would get when using the standard Lit Master Stack. +| **Sub graph** | **Description** | +| :--- | :--- | +| **AdditionalLightsBasic** | Computes very simple lighting for the additional light sources. It only includes diffuse light with no specular reflection. | +| **AdditionalLightsColorize** | Outputs the Diffuse, Specular, and Color components, and also outputs the light attenuation separately to allow to use it outside the sub graph to calculate what areas should be colorized and what areas should be black and white. | +| **AdditionalLightsHalfLambert** | Computes the lighting for the additional lights in the scene using the Half Lambert formula which wraps the lighting gradient all the way around to the side of the model opposite the light source. | +| **AdditionalLightsSimple** | Computes lighting using the Blinn formula for specular highlights. This makes the specular highlights cheaper to compute. Blinn specular is generally considered to be less realistic than the default specular that the Universal Render Pipeline uses. | +| **AdditionalLightsURP** | Computes the additional lighting using the same formula used by the Universal Render Pipeline by default. It provides the same type of lighting that you would get when using the standard Lit Master Stack. | ## Ambient -### AmbientBasic -The AmbientBasic node computes a very simple ambient term using only the BakedGI node. It does not create reflections as many of the other ambient subgraphs do. - -### AmbientStylized -The AmbientStylized node computes ambient using the Sky, Equator, and Ground colors that are defined in the Lighting window on the Environment tab. It also adds some ambient lighting for the sky using the normal up direction and a Fresnel term. - -### AmbientURP -The AmbientURP node computes ambient light using the same formula as the standard URP lighting mode. - -### SampleReflectionProbes -The SampleReflectionProbes node gets a color sample from the closest reflection probes and blends them together based on the position being rendered. -### ScreenSpaceAmbientOcclusion -The ScreenSpaceAmbientOcclusion node samples the ambient occlusion that is calculated by the Screen Space Ambient Occlusion component on the Renderer Data asset. If the SSAO component is not active on the Renderer, this node simply returns 1. Typically, this value is multiplied by the ambient value so that ambient is darker in occluded areas, but you can use this data as you see fit in your own custom lighting model. +| **Sub graph** | **Description** | +| :--- | :--- | +| **AmbientBasic** | Computes a very simple ambient lighting using only the BakedGI node. It doesn't create any reflections. | +| **AmbientStylized** | Computes ambient lighting using the Sky, Equator, and Ground colors that are defined in the Lighting window on the Environment tab. It also adds some ambient lighting for the sky using the normal up direction and a Fresnel term. | +| **AmbientURP** | Computes ambient light using the same formula as the standard URP lighting mode. | +| **SampleReflectionProbes** | Gets a color sample from the closest reflection probes and blends them together based on the position being rendered. | +| **ScreenSpaceAmbientOcclusion** | Samples the ambient occlusion that is calculated by the Screen Space Ambient Occlusion component on the Renderer Data asset. If the SSAO component is not active on the Renderer, this node simply returns 1. Typically, this value is multiplied by the ambient value so that ambient is darker in occluded areas, but you can use this data as you see fit in your own custom lighting model. | ## Core Models -### LightBasic -The Lit Basic lighting model does very simple lighting and leaves out most lighting features in order to render as fast as possible. It calculates simple diffuse lighting and a simple form of ambient lighting. It does not support fog, reflections, specular, light cookies, or any other lighting features. But it does render fast and is ideal for low-end mobile devices and XR headsets. -### LightColorize -The Colorize lighting model is an example of the type of custom behavior you can create when you can control the lighting model. The main directional light renders the scene in grayscale with no color. Color is introduced with point lights so you can control where the scene has color based on where you place the point lights in the scene. - -### LightSimple -The Lit Simple lighting model is the same as the URP lighting model, except it uses the Blinn formula for the specular highlights. This makes it slightly cheaper to render than standard URP while looking fairly similar. If you still need all of the lighting features (specular, fog, screen space ambient occlusion, reflections, etc), but you want to make the lighting cheaper, this may be a good choice. - -### LightToon -The Lit Toon lighting model uses a Posterize operation to break the smooth lighting gradient into distinct bands of shading. It simulates the look of cartoons where lighting is rendered with distinct colors of paint rather than smooth gradients. - -### LightURP -The Lit URP lighting model closely matches the lighting that the Universal Render Pipeline does by default. If you want to start with the URP lighting and then alter it, this is the node to use. +| **Sub graph** | **Description** | +| :--- | :--- | +| **LightBasic** | Computes very simple lighting and leaves out most lighting features in order to render as fast as possible. It calculates simple diffuse lighting and a simple form of ambient lighting. It does not support fog, reflections, specular, light cookies, or any other lighting features. But it does render fast and is ideal for low-end mobile devices and XR headsets. | +| **LightColorize** | Example of the type of custom behavior you can create when you can control the lighting model. The main directional light renders the scene in grayscale with no color. Color is introduced with point lights so you can control where the scene has color based on where you place the point lights in the scene. | +| **LightSimple** | Same as the URP lighting model, except it uses the Blinn formula for the specular highlights. This makes it slightly cheaper to render than standard URP while looking fairly similar. If you still need all of the lighting features (specular, fog, screen space ambient occlusion, reflections, etc), but you want to make the lighting cheaper, this may be a good choice. | +| **LightToon** | Uses a Posterize operation to break the smooth lighting gradient into distinct bands of shading. It simulates the look of cartoons where lighting is rendered with distinct colors of paint rather than smooth gradients. | +| **LightURP** | Closely matches the lighting that the Universal Render Pipeline does by default. If you want to start with the URP lighting and then alter it, this is the node to use. | ## Debug -### DebugLighting -When added to your lighting model (as seen in the existing examples), this subgraph provides support for the following debug lighting modes (available from the Rendering Debugger window): -* Shadow Cascades -* Lighting Without Normal Maps -* Lighting With Normal Maps -* Reflections -* Reflection With Smoothness -* Global Illumination - -### DebugMaterials -When added to your lighting model (as seen in the existing examples), this subgraph provides support for the following debug material modes (available from the Rendering Debugger window): -* Albedo -* Specular -* Alpha -* Smoothness -* Ambient Occlusion -* Emission -* Normal World Space -* Normal Tangent Space -* Light Complexity -* Metallic -* Sprite Mask -* Rendering Layer Masks -## Diffuse -### DiffuseCustomGradient -Instead of a dot product calculation to generate the lighting gradient, this subgraph uses an input texture gradient. This allows you to paint the lighting as you see fit. +| **Sub graph** | **Description** | +| :--- | :--- | +| **DebugLighting** | Provides support for the following lighting debug modes (available from the [Rendering Debugger window](xref:urp-rendering-debugger-reference)):
  • Shadow Cascades
  • Lighting Without Normal Maps
  • Lighting With Normal Maps
  • Reflections
  • Reflection With Smoothness
  • Global Illumination
| +| **DebugMaterials** | Provides support for the following material debug modes (available from the [Rendering Debugger window](xref:urp-rendering-debugger-reference)):
  • Albedo
  • Specular
  • Alpha
  • Smoothness
  • Ambient Occlusion
  • Emission
  • Normal World Space
  • Normal Tangent Space
  • Light Complexity
  • Metallic
  • Sprite Mask
  • Rendering Layer Masks
| -### DiffuseHalfLambert -The Half Lambert formula that this node uses creates a lighting gradient that goes from 0 to 1 from the dark side of the model to the bright side. Because the gradient wraps all the way around the model instead of just half way (as realistic lighting does), it has a softer, more stylized look. - -### DiffuseLambert -This subgraph creates standard diffuse lighting using the dot product between the surface normal and the light vector. If the two vectors are pointing in the same direction, the surface has a diffuse value of 1. If the two vectors are perpendicular, the surface has a value of 0. The dark side of the model (facing away from the light) is clamped so that the result is also 0. +## Diffuse -### DiffuseOrenNayar -This subgraph uses the Oren Nayar lighting formula which simulates the lighting response of a rough surface like clay or plaster. The math used by this formula is quite expensive when you compare it with the subtle results that it provides, so you may find it sufficient to just use DiffuseLambert instead. +| **Sub graph** | **Description** | +| :--- | :--- | +| **DiffuseCustomGradient** | Uses an input texture gradient instead of a dot product calculation to generate the lighting gradient. This allows you to paint the lighting as you see fit. | +| **DiffuseHalfLambert** | Uses a Half Lambert formula that creates a lighting gradient that goes from 0 to 1 from the dark side to the bright side of the model. Because the gradient wraps all the way around the model instead of just halfway (as realistic lighting does), it has a softer, more stylized look. | +| **DiffuseLambert** | Creates standard diffuse lighting using the dot product between the surface normal and the light vector. If the two vectors are pointing in the same direction, the surface has a diffuse value of 1. If the two vectors are perpendicular, the surface has a value of 0. The dark side of the model (facing away from the light) is clamped so that the result is also 0. | +| **DiffuseOrenNayar** | Uses the Oren Nayar lighting formula which simulates the lighting response of a rough surface like clay or plaster. The math used by this formula is quite expensive when you compare it with the subtle results that it provides, so you may find it sufficient to just use DiffuseLambert instead. | ## Reflectance -### ReflectancePBR -A subgraph that calculates reflectance using a standard physically-based model. -### ReflectanceURP -A subgraph that calculates reflectance using the same formula that URP uses. +| **Sub graph** | **Description** | +| :--- | :--- | +| **ReflectancePBR** | Calculates reflectance using a standard physically-based model. | +| **ReflectanceURP** | Calculates reflectance using the same formula that URP uses. | ## Specular -### SpecularBlinn -This subgraph calculates specular highlights using the Blinn formula. It’s cheaper than a more modern/realistic formula. - -### SpecularCookTorrance -This subgraph calculates specular highlights using the Cook Torrance formula. This method creates specular that works well for brushed metal surfaces. -### SpecularPBR -This subgraph calculates specular highlights using the GGX formula, which is popular in modern PBR lighting models. +| **Sub graph** | **Description** | +| :--- | :--- | +| **SpecularBlinn** | Calculates specular highlights using the Blinn formula. It’s cheaper than a more modern/realistic formula. | +| **SpecularCookTorrance** | Calculates specular highlights using the Cook Torrance formula. This method creates specular highlights that work well for brushed metal surfaces. | +| **SpecularPBR** | Calculates specular highlights using the GGX formula, which is popular in modern PBR lighting models. | +| **SpecularStylized** | Calculates specular highlights in a less realistic, more stylized way. This specular works better for an illustrative style. | +| **SpecularURP** | Calculates specular highlights using the same formula as the lighting that the Universal Render Pipeline uses. | -### SpecularStylized -This subgraph calculates specular highlights in a less realistic, more stylized way. This specular works better for an illustrative style. +## Additional resources -### SpecularURP -This subgraph calculates specular highlights using the same formula as the lighting that the Universal Render Pipeline uses. +* [Introduction to lighting model customization](Shader-Graph-Sample-Custom-Lighting-Introduction.md) +* [Get started with the Custom Lighting sample](Shader-Graph-Sample-Custom-Lighting-Get-Started.md) +* [Lighting Model sub graph reference](Shader-Graph-Sample-Custom-Lighting-Lighting-Models.md) diff --git a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Get-Started.md b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Get-Started.md new file mode 100644 index 00000000000..e12e7c57273 --- /dev/null +++ b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Get-Started.md @@ -0,0 +1,39 @@ +# Get started with the Custom Lighting sample + +Use the templates and sub graphs included in the **Custom Lighting** sample to get started with lighting model customization in Shader Graph. + +> [!NOTE] +> To use the **Custom Lighting** templates and sub graphs, you first need to [import the sample in your project](ShaderGraph-Samples.md#add-samples). + +## Start from a shader graph template + +To use one of the available Custom Lighting templates as a starting point to customize lighting in a prebuilt shader graph asset, follow these steps: + +1. [Create a shader graph asset from a template](create-shader-graph.md). + +1. In the [template browser](template-browser.md), select one of the templates from the **URP Custom Lighting** section. + +1. Select **Create**. + +1. Open the created shader graph asset in the Shader Graph window if the window doesn't open automatically. + +## Start from an empty shader graph + +To use one of the available Lighting Model sub graphs as a starting point to customize lighting in an empty shader graph asset, follow these steps: + +1. [Create a shader graph asset with a preset target](create-shader-graph.md#create-a-shader-graph-with-a-preset-target) and select **URP** > **Unlit Shader Graph**. + +1. Open the created shader graph asset in the Shader Graph window if the window doesn't open automatically. + +1. Go to the [**Create Node** menu](Create-Node-Menu.md) and add one of the sub graphs from the **Custom Lighting** > **Lighting Models** section. + +1. Connect the **Lit** output port of the added sub graph to the **Base Color** input port of the Master Stack. + +1. To allow the Unlit target to correctly support custom lighting models, set the [Graph Settings](Graph-Settings-Tab.md) as follows: + * Enable **Keep Lighting Variants**. + * Disable **Default Decal Blending** and **Default SSAO**. + +## Additional resources + +* [Create a shader graph asset](Create-Shader-Graph.md) +* [Add and connect nodes](Create-Node-Menu.md) diff --git a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Introduction.md b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Introduction.md new file mode 100644 index 00000000000..b52c4be8d66 --- /dev/null +++ b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Introduction.md @@ -0,0 +1,41 @@ +# Introduction to lighting model customization with Shader Graph + +You can customize lighting models to do the following: + +* Improve rendering performance. You can remove or simplify one or more types of lighting calculations and sacrifice visual quality for rendering speed. + +* Make your lighting look different from Unity's default lighting. For example, to make your project look like a watercolor painting or a pen and ink drawing. + + +## Lighting model customization examples + +The assets available in the **Custom Lighting** sample allow you to [get started with lighting model customization](Shader-Graph-Sample-Custom-Lighting-Get-Started.md) in different contexts and for various purposes. + +| **Context** | **Description** | **Template** | +| :--- | :--- | :--- | +| Model for devices where performance is critical | With XR or low-end mobile devices where performance is critical, you likely need to reduce the cost of calculations in your shaders. For example, you might skip any fog, specular, reflections, light cookies, or SSAO support and only keep the basics. | [Custom Lighting Basic](Shader-Graph-Sample-Custom-Lighting-Templates.md#custom-lighting-basic) | +| Simplified URP model with performance optimization | If you need to optimize performance in URP, you might want to use a Blinn model, which is similar to the main lighting in URP but slightly cheaper for specular highlights. The Blinn model slightly affects the redering quality but renders faster in most cases. | [Custom Lighting Simple](Shader-Graph-Sample-Custom-Lighting-Templates.md#custom-lighting-simple) | +| Posterization model for cartoon appearance | You can alter the lighting in a shader graph to achieve stylized effects such as posterization, to give the visuals of your project the appearance of a cartoon. | [Custom Lighting Toon](Shader-Graph-Sample-Custom-Lighting-Templates.md#custom-lighting-toon) | +| Lit URP model customization | You might want to explore the process of lighting customization directly from a shader based on the Lit URP model. | [Custom Lighting URP](Shader-Graph-Sample-Custom-Lighting-Templates.md#custom-lighting-urp) | +| Other types of lighting customization | You can use any of the [Lighting Model](Shader-Graph-Sample-Custom-Lighting-Lighting-Models.md) sub graphs available in the **Custom Lighting** sample to create any type of lighting that you need within your own shader graphs. These sub graphs use a recommended pattern that illustrates how Unity expects custom lighting models to be defined. | N/A | + + +## Limitations + +Before you start to customize lighting models with Shader Graph, be aware of the following limitations: + +### Shader Graph doesn't support deferred rendering + +Customizable lighting is only intended to be used when you set the render type to Forward or Forward+ in the Render Asset. + +When you set the render type to Deferred or Deferred+, it's not possible to control the lighting directly in an object’s shader, because the lighting occurs in a pass that is not directly connected to the object's shader. + +If you need to customize lighting in a deferred rendering context, you have to [write shaders in code](xref:um-shader-writing) instead of using Shader Graph. + +### Handling multiple light sources in Shader Graph requires HLSL coding + +To support multiple light sources in Shader Graph, you have to write a small amount of code. + +For the main directional light, you can create custom lighting in Shader Graph without coding. However, the part of the graph that does multiple light calculations requires the use of a [Custom Function node](Custom-Function-Node.md), because Shader Graph doesn’t support `For` loops. + +The sample includes multiple examples of Additional Lights nodes, but if you want to create your own, you need to know a little bit of HLSL coding. diff --git a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Lighting-Models.md b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Lighting-Models.md index e3cfd396a28..7f92aa7db4f 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Lighting-Models.md +++ b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Lighting-Models.md @@ -1,21 +1,46 @@ -# Lighting Models +# Lighting Model sub graph reference -Use any of these subgraphs with the Unlit material type to create lighting that is defined in the Shader Graph. To know how to use these subgraphs, refer to the [main page](Shader-Graph-Sample-Custom-Lighting.md#examples). +Explore the Lighting Model sub graphs used in the [URP Custom Lighting templates](Shader-Graph-Sample-Custom-Lighting-Templates.md) included in the Custom Lighting sample. -All of the following subgraphs include the ApplyDecals subgraph to blend decal data, and the Debug Lighting and Debug Materials subgraph nodes to support the debug rendering modes (available in the Rendering Debugger window). They also include a subgraph from the Core Lighting Models category to define the behavior of the lighting itself as described below. +These sub graphs are available in the [**Create Node** menu](Create-Node-Menu.md) under the **Lighting** > **Light Models** section. -## Lit Basic -The Lit Basic lighting model does very simple lighting and leaves out most lighting features to render as fast as possible. It calculates simple diffuse lighting and a simple form of ambient lighting. It does not support fog, reflections, specular, light cookies, or any other lighting features. But it does render fast and is ideal for low-end mobile devices and XR headsets. +> [!NOTE] +> To use any of these sub graphs, you must include it in a shader graph set up with the **Universal** (URP) target and the **Unlit** material type. -## Lit Colorize -The Colorize lighting model is an example of custom behavior type you can create when you can control the lighting model. The main directional light renders the scene in grayscale with no color. Color is introduced with point lights, which allows you to control where the scene has color based on where you place the point lights in the scene. +## Common sub graph structure -## Lit Simple -The Lit Simple lighting model is the same as the URP lighting model, except it uses the Blinn formula for the specular highlights. This makes it slightly cheaper to render than standard URP while looking fairly similar. If you still need all of the lighting features (specular, fog, screen space ambient occlusion, reflections, etc), but you want to make the lighting cheaper, this may be a good choice. +Each Lighting Model sub graph includes the following: +* The [ApplyDecals](Shader-Graph-Sample-Custom-Lighting-Components.md#general) sub graph, to blend decal data with the original material properties. +* The [Debug Lighting and Debug Materials](Shader-Graph-Sample-Custom-Lighting-Components.md#debug) sub graphs, to support the debug rendering modes (available in the Rendering Debugger window). +* A sub graph from the [Core Models](Shader-Graph-Sample-Custom-Lighting-Components.md#core-models) category, to define the lighting behavior according to the model. -## Lit Toon -The Lit Toon lighting model uses a Posterize operation to break the smooth lighting gradient into distinct bands of shading. It simulates the look of cartoons where lighting is rendered with distinct colors of paint rather than smooth gradients. +> [!NOTE] +> The ApplyDecals, DebugLighting, and DebugMaterials sub graph nodes aren’t strictly required. They enable the decals and debug rendering modes, which are core engine features. When you don't use these features, the corresponding sub graph nodes don't affect your project's performance. -## Lit URP -The Lit URP lighting model closely matches the lighting that the Universal Render Pipeline does by default. If you want to start with the URP lighting and then alter it, this is the node to use. +## Available Lighting Model sub graphs +### Lit Basic + +This lighting model does very simple lighting and leaves out most lighting features to render as fast as possible. It calculates simple diffuse lighting and a simple form of ambient lighting. It does not support fog, reflections, specular, light cookies, or any other lighting features. But it does render fast and is ideal for low-end mobile devices and XR headsets. + +### Lit Colorize + +This lighting model is an example of custom behavior type you can create when you can control the lighting model. The main directional light renders the scene in grayscale with no color. Color is introduced with point lights, which allows you to control where the scene has color based on where you place the point lights in the scene. + +### Lit Simple + +This lighting model is the same as the URP lighting model, except it uses the Blinn formula for the specular highlights. This makes it slightly cheaper to render than standard URP while looking fairly similar. If you still need all of the lighting features (specular, fog, screen space ambient occlusion, reflections, etc), but you want to make the lighting cheaper, this may be a good choice. + +### Lit Toon + +This lighting model uses a Posterize operation to break the smooth lighting gradient into distinct bands of shading. It simulates the look of cartoons where lighting is rendered with distinct colors of paint rather than smooth gradients. + +### Lit URP + +This lighting model closely matches the lighting that the Universal Render Pipeline does by default. If you want to start with the URP lighting and then alter it, this is the node to use. + +## Additional resources + +* [Introduction to lighting model customization](Shader-Graph-Sample-Custom-Lighting-Introduction.md) +* [Get started with the Custom Lighting sample](Shader-Graph-Sample-Custom-Lighting-Get-Started.md) +* [URP Custom Lighting template reference](Shader-Graph-Sample-Custom-Lighting-Templates.md) diff --git a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Templates.md b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Templates.md new file mode 100644 index 00000000000..a4803fe1b05 --- /dev/null +++ b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting-Templates.md @@ -0,0 +1,29 @@ +# URP Custom Lighting template reference + +Explore the prebuilt URP Custom Lighting shader graph templates included in the Custom Lighting sample. + +> [!NOTE] +> These templates are available in the [template browser](template-browser.md) under the **URP Custom Lighting** section. Don't edit the corresponding assets in the **Assets** > **Samples** > **Shader Graph** folder of your project. + +Each Custom Lighting template includes a specific [Lighting Model sub graph](Shader-Graph-Sample-Custom-Lighting-Lighting-Models.md). + +## Custom Lighting Basic + +This template uses a basic lighting model that calculates diffuse lighting for multiple light sources. To reduce the cost of calculations, this shader does not support fog, specular, reflections, light cookies, and SSAO, but you can reintegrate any of these features if needed. This model makes the lighting as cheap as possible by only including the basic requirements. This type of lighting model is ideal for XR or low-end mobile devices where performance is critical. + +## Custom Lighting Simple + +This template uses a lighting model designed to be similar to the main lighting used by URP. It uses a slightly cheaper Blinn model for specular highlights, which reduces the quality but speeds up the rendering in most cases. + +## Custom Lighting Toon + +This template uses a lighting model that posterizes the lighting to give it the appearance of a cartoon. This shows you how you can alter lighting in the graph to achieve stylized effects that give your project a unique appearance. + +## Custom Lighting URP + +This template uses the same lighting formula as the Lit URP model. You can use it as a starting point if you want to begin with URP as is and then make changes. + +## Additional resources + +* [Introduction to lighting model customization](Shader-Graph-Sample-Custom-Lighting-Introduction.md) +* [Get started with the Custom Lighting sample](Shader-Graph-Sample-Custom-Lighting-Get-Started.md) diff --git a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting.md b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting.md index be7c2e0ed2d..10402c4e975 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting.md +++ b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Custom-Lighting.md @@ -1,57 +1,13 @@ # Custom Lighting -![The Shader Graph Custom Lighting Sample: A collection of Shader Graph subgraphs that serve as building blocks for building user interface elements.](images/CustomLightingSample.png) -The Shader Graph Custom Lighting sample shows how you can create your own custom lighting in Shader Graph and provides dozens of example templates, shaders, and subgraphs to help you get started with your own custom lighting. +![An example scene with custom lighting effects.](images/CustomLightingSample.png) - Documentation for this set of samples is broken into two pages: +Use the additional templates and sub graphs provided in the **Custom Lighting** sample to get started with lighting model customization in Shader Graph. -* [Lighting Models](Shader-Graph-Sample-Custom-Lighting-Lighting-Models.md) -* [Components](Shader-Graph-Sample-Custom-Lighting-Components.md) - -## Limitations -Before making your own custom lighting model in Shader Graph, be aware of the following limitations: - -* Customizable lighting is only intended to be used when the render type is set to Forward or Forward+ in the Render Asset. - - When the render type is set to Deferred or Deferred+, it's not possible to control the lighting directly in an object’s shader, because the lighting occurs in a pass that is not directly connected to the object's shader. - - If you need to customize lighting in deferred rendering context, you have to write code instead of using Shader Graph. - -* To support multiple light sources, you have to write a small amount of code. - - For the main directional light, you can create custom lighting 100% in Shader Graph. However, the part of the graph that does multiple light calculations requires the use of a Custom Function node, because Shader Graph doesn’t support `For` loops. - - The sample includes multiple examples of Additional Lights nodes, but if you want to create your own, you need to know a little bit of HLSL coding. - - -## Motivations -There are two main reasons you might want to customize the lighting model in Shader Graph: - -* Improve rendering performance by leaving out one or more types of lighting calculations, sacrificing visual quality for rendering speed. - -* Make your lighting look different from the lighting that Unity already provides. For example, you might want your project to look like a watercolor painting, like it’s drawn with pen and ink, etc. - -## Examples -The sample includes the following subgraph examples in the Shader Graph node library: - -* Lighting / Light Models / Lit Basic -* Lighting / Light Models / Lit Colorize -* Lighting / Light Models / Lit Simple -* Lighting / Light Models / Lit Toon -* Lighting / Light Models / Lit URP - -To get customized lighting with any of these subgraphs: -1. Add the subgraph to an empty Shader Graph. -1. Connect the Lit output port to the Base Color input port on the Unlit Master Stack. -1. To allow the Unlit target to correctly support custom lighting models, make sure to set the Graph inspector as follows: - * Enable *Keep Lighting Variants*. - * Disable *Default Decal Blending* and *Default SSAO*. - -Notice that each of the above subgraphs use the following: -* The ApplyDecals subgraph to blend decal data with the original material properties. -* The Debug Lighting and Debug Materials subgraph nodes to support the debug rendering modes (available in the Rendering Debugger window). -* A subgraph from the Core Lighting Models category to define the behavior of the lighting itself. - -While the ApplyDecals, DebugLighting, and DebugMaterials subgraph nodes aren’t strictly required, they are included in the lighting model subgraphs to enable these core engine features: decals and debug rendering modes. When these features are not in use, the ApplyDecals, DebugLighting, and DebugMaterials subgraph nodes don't add any performance cost to the shader overall. You can use them without worrying that you’re slowing down your project. - -You can create any type of lighting that you want, but the above subgraphs show you a recommended pattern to illustrate how Unity expects custom lighting models to be defined. +| **Topic** | **Description** | +| :--- | :--- | +| [Introduction to lighting model customization with Shader Graph](Shader-Graph-Sample-Custom-Lighting-Introduction.md) | Learn about the purpose and limitations of lighting model customization in Shader Graph and get an overview of the use cases covered in the **Custom Lighting** sample. | +| [Get started with the Custom Lighting sample](Shader-Graph-Sample-Custom-Lighting-Get-Started.md) | Start your lighting customization from either a prebuilt shader graph template or a lighting model sub graph in your own shader graph. | +| [URP Custom Lighting template reference](Shader-Graph-Sample-Custom-Lighting-Templates.md) | Explore the prebuilt shader graph templates included in the sample. | +| [Lighting Model sub graph reference](Shader-Graph-Sample-Custom-Lighting-Lighting-Models.md) | Explore the Lighting Model sub graphs included in the sample and used in the URP Custom Lighting templates. | +| [Component sub graph reference](Shader-Graph-Sample-Custom-Lighting-Components.md) | Explore the Component sub graphs used as building blocks for the Lighting Model sub graphs included in the sample. | diff --git a/Packages/com.unity.shadergraph/Documentation~/TableOfContents.md b/Packages/com.unity.shadergraph/Documentation~/TableOfContents.md index 893161dacbf..819d2079080 100644 --- a/Packages/com.unity.shadergraph/Documentation~/TableOfContents.md +++ b/Packages/com.unity.shadergraph/Documentation~/TableOfContents.md @@ -355,8 +355,11 @@ * [How to make shapes that adapt to the aspect ratio of the UI element](Shader-Graph-Sample-UGUI-Shaders-How-tos-aspect-ratio.md) * [Notes on performance](Shader-Graph-Sample-UGUI-Shaders-Notes-on-performance.md) * [Custom Lighting](Shader-Graph-Sample-Custom-Lighting.md) - * [Lighting Models](Shader-Graph-Sample-Custom-Lighting-Lighting-Models.md) - * [Components](Shader-Graph-Sample-Custom-Lighting-Components.md) + * [Introduction to lighting model customization](Shader-Graph-Sample-Custom-Lighting-Introduction.md) + * [Get started with the Custom Lighting sample](Shader-Graph-Sample-Custom-Lighting-Get-Started.md) + * [URP Custom Lighting template reference](Shader-Graph-Sample-Custom-Lighting-Templates.md) + * [Lighting Model sub graph reference](Shader-Graph-Sample-Custom-Lighting-Lighting-Models.md) + * [Component sub graph reference](Shader-Graph-Sample-Custom-Lighting-Components.md) * [Terrain Shaders](Shader-Graph-Sample-Terrain.md) * [Texture Packing Schemes](Shader-Graph-Sample-Terrain-Packing.md) * [Shaders](Shader-Graph-Sample-Terrain-Shaders.md) From d1d4f66bf8937f37dc13db76da478fc351b8eea3 Mon Sep 17 00:00:00 2001 From: Myeongseon Kim Date: Mon, 12 Jan 2026 23:49:15 +0000 Subject: [PATCH 21/43] [UUM-129871] Fix performance regression and insufficient light rendering in FPTL/Cluster shaders --- .../lightlistbuild-clustered.compute | 25 +++++++++++-------- .../Lighting/LightLoop/lightlistbuild.compute | 25 +++++++++++-------- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild-clustered.compute b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild-clustered.compute index 0a1d500b406..03040d1409e 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild-clustered.compute +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild-clustered.compute @@ -61,9 +61,9 @@ RWStructuredBuffer g_logBaseBuffer : register( u3 ); // don't #define MAX_NR_COARSE_ENTRIES LIGHT_CLUSTER_MAX_COARSE_ENTRIES -#define MAX_NR_VISIBLE_LIGHTS 826 // correspond to m_MaxLightsOnScreen in LightLoop.cs +#define MAX_NR_VISIBLE_LIGHTS 4096 // correspond to m_MaxLightsOnScreen in LightLoop.cs -groupshared unsigned int ldsTilePassList[MAX_NR_VISIBLE_LIGHTS]; +groupshared unsigned int ldsTilePassList[MAX_NR_VISIBLE_LIGHTS/32]; groupshared unsigned int coarseList[MAX_NR_COARSE_ENTRIES]; groupshared unsigned int clusterIdxs[MAX_NR_COARSE_ENTRIES/2]; groupshared float4 lightPlanes[4*6]; // Each plane is defined by a float4. 6 planes per light, 4 lights (24 planes) @@ -248,10 +248,9 @@ void LIGHTLISTGEN(uint threadID : SV_GroupIndex, uint3 u3GroupID : SV_GroupID) const bool lightSortRequired = g_iNrVisibLights > MAX_NR_COARSE_ENTRIES; // Uniform runtime branch if (lightSortRequired) { - UNITY_LOOP - for(i=t; i> 5], 1u << (ul & (32 - 1))); // ldsTilePassList[ul/32] |= 1u << (ul % 32); else if(uIndex g_vBigTileLightList : register( t4 ); // don't sup RWStructuredBuffer g_vLightList : register( u0 ); // don't support RWBuffer yet in unity #define CATEGORY_LIST_SIZE LIGHTCATEGORY_COUNT -#define MAX_NR_VISIBLE_LIGHTS 826 // correspond to m_MaxLightsOnScreen in LightLoop.cs +#define MAX_NR_VISIBLE_LIGHTS 4096 // correspond to m_MaxLightsOnScreen in LightLoop.cs -groupshared unsigned int ldsTilePassList[MAX_NR_VISIBLE_LIGHTS]; +groupshared unsigned int ldsTilePassList[MAX_NR_VISIBLE_LIGHTS/32]; groupshared unsigned int coarseList[LIGHT_LIST_MAX_COARSE_ENTRIES]; groupshared unsigned int prunedList[LIGHT_LIST_MAX_COARSE_ENTRIES]; // temporarily support room for all 64 while in LDS @@ -160,10 +160,9 @@ void TileLightListGen(uint3 dispatchThreadId : SV_DispatchThreadID, uint threadI const bool lightSortRequired = g_iNrVisibLights > LIGHT_LIST_MAX_COARSE_ENTRIES; // Uniform runtime branch if (lightSortRequired) { - UNITY_LOOP - for(i=t; i> 5], 1u << (ul & (32 - 1))); // ldsTilePassList[ul/32] |= 1u << (ul % 32); else if(uIndex Date: Tue, 13 Jan 2026 14:47:42 +0000 Subject: [PATCH 22/43] [MultipleSRP_Tests] Disable consistently failing AssetPreviewTests.CreatePreviewAssetImportWorker --- .../Assets/Tests/EditMode/Framework/WorkerLogAnalyzer.cs | 2 ++ .../Assets/Tests/EditMode/Preview/AssetPreviewTests.cs | 1 + 2 files changed, 3 insertions(+) diff --git a/Tests/SRPTests/Projects/MultipleSRP_Tests/Assets/Tests/EditMode/Framework/WorkerLogAnalyzer.cs b/Tests/SRPTests/Projects/MultipleSRP_Tests/Assets/Tests/EditMode/Framework/WorkerLogAnalyzer.cs index 25387c038a3..ed9cd194007 100644 --- a/Tests/SRPTests/Projects/MultipleSRP_Tests/Assets/Tests/EditMode/Framework/WorkerLogAnalyzer.cs +++ b/Tests/SRPTests/Projects/MultipleSRP_Tests/Assets/Tests/EditMode/Framework/WorkerLogAnalyzer.cs @@ -213,6 +213,8 @@ public static void AssertSingleWorkerUsedAtLeastTwice(WorkerLogSnapshot importDi { var workersWithImports = importDifference.WorkerImportCounts.Where(kvp => kvp.Value > 0).ToList(); + Assert.IsTrue(workersWithImports.Count > 0, "Expect at least 1 worker"); + var maxImportsWorker = workersWithImports.OrderByDescending(kvp => kvp.Value).First(); Assert.IsTrue(maxImportsWorker.Value > 1, $"Expected at least 2 imports on a single Worker for {assetPath}"); diff --git a/Tests/SRPTests/Projects/MultipleSRP_Tests/Assets/Tests/EditMode/Preview/AssetPreviewTests.cs b/Tests/SRPTests/Projects/MultipleSRP_Tests/Assets/Tests/EditMode/Preview/AssetPreviewTests.cs index 7faf55ef76c..ed79ee2a77c 100644 --- a/Tests/SRPTests/Projects/MultipleSRP_Tests/Assets/Tests/EditMode/Preview/AssetPreviewTests.cs +++ b/Tests/SRPTests/Projects/MultipleSRP_Tests/Assets/Tests/EditMode/Preview/AssetPreviewTests.cs @@ -116,6 +116,7 @@ public IEnumerator CreatePreview(AssetFactory objectFactory, Type renderPipeline } } + [Ignore("issue: no worker when launching AssertSingleWorkerUsedAtLeastTwice https://jira.unity3d.com/browse/UUM-131927")] [UnityTest] [TestCaseSource(nameof(s_TestCaseDataPreviewImporter))] /// From 8b5bd0d795d3d86461229c3701977250dc609022 Mon Sep 17 00:00:00 2001 From: Sumin Cho Date: Tue, 13 Jan 2026 21:24:52 +0000 Subject: [PATCH 23/43] 'Shader warning in 'Hidden/HDRP/DebugFullScreen': HLSLcc: Large chunk of constant data detected' after building HDRP project --- .../ShaderLibrary/DebugMipmapStreaming.hlsl | 111 ++++++++++++------ 1 file changed, 76 insertions(+), 35 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreaming.hlsl b/Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreaming.hlsl index 0bac3a67394..a1c8aba4b60 100644 --- a/Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreaming.hlsl +++ b/Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreaming.hlsl @@ -3,6 +3,32 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Debug.hlsl" +// Helper to pack 4 characters into one 32-bit uint +// Use (a << 24) for the first char, (b << 16) for the second, etc. +#define PACK_BYTES(a, b, c, d) \ + (((uint)(a) << 24) | ((uint)(b) << 16) | ((uint)(c) << 8) | (uint)(d)) + +// Macro to pack 32 elements into 8 uints +#define PACK_STRING_32( \ + c0, c1, c2, c3, \ + c4, c5, c6, c7, \ + c8, c9, c10, c11, \ + c12, c13, c14, c15, \ + c16, c17, c18, c19, \ + c20, c21, c22, c23, \ + c24, c25, c26, c27, \ + c28, c29, c30, c31) \ + { \ + PACK_BYTES(c0, c1, c2, c3), \ + PACK_BYTES(c4, c5, c6, c7), \ + PACK_BYTES(c8, c9, c10, c11), \ + PACK_BYTES(c12, c13, c14, c15), \ + PACK_BYTES(c16, c17, c18, c19), \ + PACK_BYTES(c20, c21, c22, c23), \ + PACK_BYTES(c24, c25, c26, c27), \ + PACK_BYTES(c28, c29, c30, c31) \ + } + // Indices for Mipmap Debug Legend Strings #define _kNotStreamingIndex 0 #define _kStreamingIndex 1 @@ -40,60 +66,75 @@ #define _kRecentlyUpdated 28 #define _kNotRecentlyUpdated 29 -static const uint kMipmapDebugLegendStrings[][32] = +static const uint kMipmapDebugLegendStrings[][8] = { // Status - {13, 'N','o','t',' ','s','t','r','e','a','m','i','n','g','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, - { 9, 'S','t','r','e','a','m','i','n','g','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, - {31, 'S','t','r','e','a','m','i','n','g',' ','(','m','a','n','u','a','l','l','y',' ','v','i','a',' ','s','c','r','i','p','t',')'}, - {18, 'N','o',' ','t','e','x','t','u','r','e',' ','i','n',' ','s','l','o','t','.','.','.','.','.','.','.','.','.','.','.','.','.'}, - { 7, 'W','a','r','n','i','n','g','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, - {21, 'U','n','k','n','o','w','n',' ','(','n','o',' ','r','e','n','d','e','r','e','r',')','.','.','.','.','.','.','.','.','.','.'}, - {24, 'T','e','x','t','u','r','e','S','t','r','e','a','m','e','r',' ','d','i','s','a','b','l','e','d','.','.','.','.','.','.','.'}, - {19, 'N','o',' ','m','i','p','m','a','p',' ','g','e','n','e','r','a','t','e','d','.','.','.','.','.','.','.','.','.','.','.','.'}, - {21, 'S','t','r','e','a','m','i','n','g',' ','n','o','t',' ','e','n','a','b','l','e','d','.','.','.','.','.','.','.','.','.','.'}, - {19, 'C','a','n','n','o','t',' ','s','t','r','e','a','m',' ','a','s','y','n','c','.','.','.','.','.','.','.','.','.','.','.','.'}, - { 7, 'T','e','r','r','a','i','n','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, - - {23, 'N','o',' ','t','e','x','t','u','r','e','s',' ','o','n',' ','m','a','t','e','r','i','a','l','.','.','.','.','.','.','.','.'}, - {15, 'I','s','s','u','e','s',' ','d','e','t','e','c','t','e','d','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, - {13, 'A','l','l',' ','s','t','r','e','a','m','i','n','g','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, - {29, 'A','l','l',' ','s','t','r','e','a','m','i','n','g',' ','(','s','o','m','e',' ','m','a','n','u','a','l','l','y',')','.','.'}, - {21, 'N','o',' ','t','e','x','t','u','r','e','s',' ','s','t','r','e','a','m','i','n','g','.','.','.','.','.','.','.','.','.','.'}, - {14, 'S','o','m','e',' ','s','t','r','e','a','m','i','n','g','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, - {30, 'S','o','m','e',' ','s','t','r','e','a','m','i','n','g',' ','(','s','o','m','e',' ','m','a','n','u','a','l','l','y',')','.'}, + PACK_STRING_32(13, 'N','o','t',' ','s','t','r','e','a','m','i','n','g','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32( 9, 'S','t','r','e','a','m','i','n','g','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32(31, 'S','t','r','e','a','m','i','n','g',' ','(','m','a','n','u','a','l','l','y',' ','v','i','a',' ','s','c','r','i','p','t',')'), + PACK_STRING_32(18, 'N','o',' ','t','e','x','t','u','r','e',' ','i','n',' ','s','l','o','t','.','.','.','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32( 7, 'W','a','r','n','i','n','g','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32(21, 'U','n','k','n','o','w','n',' ','(','n','o',' ','r','e','n','d','e','r','e','r',')','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32(24, 'T','e','x','t','u','r','e','S','t','r','e','a','m','e','r',' ','d','i','s','a','b','l','e','d','.','.','.','.','.','.','.'), + PACK_STRING_32(19, 'N','o',' ','m','i','p','m','a','p',' ','g','e','n','e','r','a','t','e','d','.','.','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32(21, 'S','t','r','e','a','m','i','n','g',' ','n','o','t',' ','e','n','a','b','l','e','d','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32(19, 'C','a','n','n','o','t',' ','s','t','r','e','a','m',' ','a','s','y','n','c','.','.','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32( 7, 'T','e','r','r','a','i','n','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'), + + PACK_STRING_32(23, 'N','o',' ','t','e','x','t','u','r','e','s',' ','o','n',' ','m','a','t','e','r','i','a','l','.','.','.','.','.','.','.','.'), + PACK_STRING_32(15, 'I','s','s','u','e','s',' ','d','e','t','e','c','t','e','d','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32(13, 'A','l','l',' ','s','t','r','e','a','m','i','n','g','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32(29, 'A','l','l',' ','s','t','r','e','a','m','i','n','g',' ','(','s','o','m','e',' ','m','a','n','u','a','l','l','y',')','.','.'), + PACK_STRING_32(21, 'N','o',' ','t','e','x','t','u','r','e','s',' ','s','t','r','e','a','m','i','n','g','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32(14, 'S','o','m','e',' ','s','t','r','e','a','m','i','n','g','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32(30, 'S','o','m','e',' ','s','t','r','e','a','m','i','n','g',' ','(','s','o','m','e',' ','m','a','n','u','a','l','l','y',')','.'), // MipCount - {16, 'I','n','v','a','l','i','d',' ','m','i','p','C','o','u','n','t','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, - {26, 'M','o','r','e',' ','t','h','a','n',' ','1','4',' ','m','i','p','s',' ','u','p','l','o','a','d','e','d','.','.','.','.','.'}, + PACK_STRING_32(16, 'I','n','v','a','l','i','d',' ','m','i','p','C','o','u','n','t','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32(26, 'M','o','r','e',' ','t','h','a','n',' ','1','4',' ','m','i','p','s',' ','u','p','l','o','a','d','e','d','.','.','.','.','.'), // Ratio - {18, 'H','i','g','h',' ','p','i','x','e','l',' ','d','e','n','s','i','t','y','.','.','.','.','.','.','.','.','.','.','.','.','.'}, - {17, 'L','o','w',' ','p','i','x','e','l',' ','d','e','n','s','i','t','y','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, + PACK_STRING_32(18, 'H','i','g','h',' ','p','i','x','e','l',' ','d','e','n','s','i','t','y','.','.','.','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32(17, 'L','o','w',' ','p','i','x','e','l',' ','d','e','n','s','i','t','y','.','.','.','.','.','.','.','.','.','.','.','.','.','.'), // Priorities - {10, 'L','o','w',' ','(','-','1','2','8',')','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, - {10, 'H','i','g','h',' ','(','1','2','7',')','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, + PACK_STRING_32(10, 'L','o','w',' ','(','-','1','2','8',')','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32(10, 'H','i','g','h',' ','(','1','2','7',')','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'), // Performance - {10, 'M','i','p','s',' ','s','a','v','e','d','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, - {31, 'M','i','p','s',' ','s','a','v','e','d',' ','(','s','o','m','e',' ','c','a','c','h','e','d',' ','o','n',' ','G','P','U',')'}, - {30, 'N','o',' ','s','a','v','i','n','g','s',' ','(','a','l','l',' ','m','i','p','s',' ','r','e','q','u','i','r','e','d',')','.'}, - {30, 'N','o','t',' ','a','l','l',' ','r','e','q','u','i','r','e','d',' ','m','i','p','s',' ','u','p','l','o','a','d','e','d','.'}, + PACK_STRING_32(10, 'M','i','p','s',' ','s','a','v','e','d','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32(31, 'M','i','p','s',' ','s','a','v','e','d',' ','(','s','o','m','e',' ','c','a','c','h','e','d',' ','o','n',' ','G','P','U',')'), + PACK_STRING_32(30, 'N','o',' ','s','a','v','i','n','g','s',' ','(','a','l','l',' ','m','i','p','s',' ','r','e','q','u','i','r','e','d',')','.'), + PACK_STRING_32(30, 'N','o','t',' ','a','l','l',' ','r','e','q','u','i','r','e','d',' ','m','i','p','s',' ','u','p','l','o','a','d','e','d','.'), // RecentlyUpdated - {13, 'J','u','s','t',' ','s','t','r','e','a','m','e','d','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'}, - {21, 'N','o','t',' ','r','e','c','e','n','t','l','y',' ','s','t','r','e','a','m','e','d','.','.','.','.','.','.','.','.','.','.'}, + PACK_STRING_32(13, 'J','u','s','t',' ','s','t','r','e','a','m','e','d','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.'), + PACK_STRING_32(21, 'N','o','t',' ','r','e','c','e','n','t','l','y',' ','s','t','r','e','a','m','e','d','.','.','.','.','.','.','.','.','.','.'), }; +uint GetCharFromPacked(int stringIdx, uint charIdx) +{ + // Divide by 4 to find which uint, modulo 4 to find the byte + uint arrayIdx = charIdx * 0.25; + + // Shift: 24 for byte 0, 16 for byte 1, 8 for byte 2, 0 for byte 3 + uint shift = (3 - (charIdx % 4)) * 8; + + return (kMipmapDebugLegendStrings[stringIdx][arrayIdx] >> shift) & 0xFF; +} + void DrawString(int stringIdx, uint2 unormCoord, float3 textColor, uint2 textLocation, bool alignRight, inout float3 outputColor) { - const uint stringSize = kMipmapDebugLegendStrings[stringIdx][0]; + const uint stringSize = GetCharFromPacked(stringIdx, 0); + const int direction = alignRight ? -1 : 1; uint i = alignRight ? stringSize : 1; - + [fastopt] for (; alignRight ? i > 0 : i <= stringSize; i += direction) - DrawCharacter(kMipmapDebugLegendStrings[stringIdx][i], textColor, unormCoord, textLocation, outputColor.rgb, direction); + { + uint character = GetCharFromPacked(stringIdx, i); + DrawCharacter(character, textColor, unormCoord, textLocation, outputColor.rgb, direction); + } } void DrawString(int stringIdx, uint2 unormCoord, float3 textColor, uint2 textLocation, inout float3 outputColor) From 0f314092a8cc0cb0df4d406d38d3fbdea1f7fba1 Mon Sep 17 00:00:00 2001 From: April Roszkowski Date: Tue, 13 Jan 2026 21:25:02 +0000 Subject: [PATCH 24/43] [UUM-131589] Prevent subgraph node starting drag on double-click --- .../Editor/Drawing/Views/MaterialNodeView.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialNodeView.cs b/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialNodeView.cs index c1848a12847..830d0220222 100644 --- a/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialNodeView.cs +++ b/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialNodeView.cs @@ -334,6 +334,9 @@ void OnSubGraphDoubleClick(MouseDownEvent evt) var path = AssetDatabase.GUIDToAssetPath(subgraphNode.subGraphGuid); ShaderGraphImporterEditor.ShowGraphEditWindow(path); + + // Stop the double click event from starting a drag action on the node + evt.StopImmediatePropagation(); } } From e02f0b866f98a68b5d328d7a00e9360345dd50ce Mon Sep 17 00:00:00 2001 From: April Roszkowski Date: Wed, 14 Jan 2026 15:23:32 +0000 Subject: [PATCH 25/43] [UUM-131603][UUM-131646] Fix some small ShaderGraph UI issues --- .../PropertyDrawers/ShaderInputPropertyDrawer.cs | 10 +++++++--- .../Drawing/Views/Slots/ColorRGBSlotControlView.cs | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/PropertyDrawers/ShaderInputPropertyDrawer.cs b/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/PropertyDrawers/ShaderInputPropertyDrawer.cs index ba4199930cc..2657bbc4439 100644 --- a/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/PropertyDrawers/ShaderInputPropertyDrawer.cs +++ b/Packages/com.unity.shadergraph/Editor/Drawing/Inspector/PropertyDrawers/ShaderInputPropertyDrawer.cs @@ -1499,11 +1499,15 @@ void CustomAttributesAddCallbacks() m_CustomAttributesReorderableList.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) => { var entry = (AbstractShaderProperty.PropertyAttribute)m_CustomAttributesReorderableList.list[index]; - Rect displayRect = new Rect(rect.x, rect.y, rect.width / 2, EditorGUIUtility.singleLineHeight); + float entryHeight = EditorGUIUtility.singleLineHeight; + float columnWidth = rect.width / 2; + float verticalPadding = (rect.height - entryHeight) / 2; + Rect nameDisplayRect = new Rect(rect.x, rect.y + verticalPadding, columnWidth, entryHeight); + Rect valueDisplayRect = new Rect(rect.x + columnWidth, rect.y + verticalPadding, columnWidth, entryHeight); EditorGUI.BeginChangeCheck(); - var name = EditorGUI.DelayedTextField(displayRect, entry.name, EditorStyles.label); - var value = EditorGUI.DelayedTextField(new Rect(rect.x + rect.width / 2, rect.y, rect.width / 2, EditorGUIUtility.singleLineHeight), entry.value); + var name = EditorGUI.DelayedTextField(nameDisplayRect, entry.name, EditorStyles.label); + var value = EditorGUI.DelayedTextField(valueDisplayRect, entry.value); if (EditorGUI.EndChangeCheck()) { diff --git a/Packages/com.unity.shadergraph/Editor/Drawing/Views/Slots/ColorRGBSlotControlView.cs b/Packages/com.unity.shadergraph/Editor/Drawing/Views/Slots/ColorRGBSlotControlView.cs index 65a6049a255..f47522c2ee7 100644 --- a/Packages/com.unity.shadergraph/Editor/Drawing/Views/Slots/ColorRGBSlotControlView.cs +++ b/Packages/com.unity.shadergraph/Editor/Drawing/Views/Slots/ColorRGBSlotControlView.cs @@ -17,7 +17,7 @@ public ColorRGBSlotControlView(ColorRGBMaterialSlot slot) m_Slot = slot; var colorField = new ColorField { - value = new Color(slot.value.x, slot.value.y, slot.value.z, 0), + value = new Color(slot.value.x, slot.value.y, slot.value.z, 1), showEyeDropper = false, showAlpha = false, hdr = (slot.colorMode == ColorMode.HDR) From fc1ee16442582433164c9b915d9b7633ab67e1fb Mon Sep 17 00:00:00 2001 From: Tarek Elsherif Date: Wed, 14 Jan 2026 20:26:46 +0000 Subject: [PATCH 26/43] [content automatically redacted] touching PlatformDependent folder --- .../Runtime/UniversalRenderPipeline.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipeline.cs b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipeline.cs index a2d376700f8..f36585d239b 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipeline.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipeline.cs @@ -13,6 +13,10 @@ using UnityEngine.Profiling; using static UnityEngine.Camera; +#if ENABLE_MULTI_WINDOWING && PLATFORM_SUPPORTS_PER_WINDOW_TRANSPARENCY +using UnityEngine.Windowing; +#endif + namespace UnityEngine.Rendering.Universal { /// @@ -1373,7 +1377,11 @@ static UniversalCameraData CreateCameraData(ContextContainer frameData, Camera c if (renderer is UniversalRenderer { onTileValidation: true } && UniversalRenderer.PlatformRequiresExplicitMsaaResolve()) msaaSamples = 1; +#if ENABLE_MULTI_WINDOWING && PLATFORM_SUPPORTS_PER_WINDOW_TRANSPARENCY && !UNITY_EDITOR + bool needsAlphaChannel = GameWindowManager.IsGameWindowTransparent(cameraData.camera.targetDisplay); +#else bool needsAlphaChannel = Graphics.preserveFramebufferAlpha; +#endif cameraData.hdrColorBufferPrecision = asset ? asset.hdrColorBufferPrecision : HDRColorBufferPrecision._32Bits; cameraData.cameraTargetDescriptor = CreateRenderTextureDescriptor(camera, cameraData, From 780692f6852ba4195d4debf4e63d387b9d779de7 Mon Sep 17 00:00:00 2001 From: Nicola Cerone Date: Thu, 15 Jan 2026 00:08:02 +0000 Subject: [PATCH 27/43] Show warning when VisualElement material is not compatible. --- .../Editor/Generation/Targets/UITK/UISubTarget.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Packages/com.unity.shadergraph/Editor/Generation/Targets/UITK/UISubTarget.cs b/Packages/com.unity.shadergraph/Editor/Generation/Targets/UITK/UISubTarget.cs index 5b589dc8d63..321ad95f8be 100644 --- a/Packages/com.unity.shadergraph/Editor/Generation/Targets/UITK/UISubTarget.cs +++ b/Packages/com.unity.shadergraph/Editor/Generation/Targets/UITK/UISubTarget.cs @@ -110,6 +110,7 @@ public virtual SubShaderDescriptor GenerateDefaultSubshader(bool isSRP = true ) shaderFallback = "", CanUseSpriteAtlas = "True", generatesPreview = true, + customTags = "\"isCustomUITKShader\"=\"true\"", passes = new PassCollection(), }; From 67773afca9e25f50c75489895f398fb8b84fd459 Mon Sep 17 00:00:00 2001 From: April Roszkowski Date: Thu, 15 Jan 2026 13:18:33 +0000 Subject: [PATCH 28/43] [UUM-131625] Fix subgraphs with only non-numeric outputs generating errors --- .../Editor/Data/SubGraph/SubGraphOutputNode.cs | 8 +++++++- .../Editor/Generation/Processors/GenerationUtils.cs | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Packages/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphOutputNode.cs b/Packages/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphOutputNode.cs index d14dcd14e97..2b71f4fcc39 100644 --- a/Packages/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphOutputNode.cs +++ b/Packages/com.unity.shadergraph/Editor/Data/SubGraph/SubGraphOutputNode.cs @@ -27,6 +27,12 @@ class SubGraphOutputNode : AbstractMaterialNode }; public bool IsFirstSlotValid = true; + // Returns true if the given slot is non-null and the slot's data may be used to render a preview + public static bool IsPreviewableType(MaterialSlot slot) + { + return slot == null ? false : s_ValidSlotTypes.Contains(slot.concreteValueType); + } + public SubGraphOutputNode() { name = "Output"; @@ -75,7 +81,7 @@ void ValidateSlotType() { owner.AddValidationError(objectId, s_MissingOutputSlot, ShaderCompilerMessageSeverity.Error); } - else if (!s_ValidSlotTypes.Contains(slots.FirstOrDefault().concreteValueType)) + else if (!IsPreviewableType(slots.FirstOrDefault())) { IsFirstSlotValid = false; owner.AddValidationError(objectId, "Preview can only compile if the first output slot is a Vector, Matrix, or Boolean type. Please adjust slot types.", ShaderCompilerMessageSeverity.Error); diff --git a/Packages/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs b/Packages/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs index 984f2c0b1dd..e64e1b0f20e 100644 --- a/Packages/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs +++ b/Packages/com.unity.shadergraph/Editor/Generation/Processors/GenerationUtils.cs @@ -1040,7 +1040,7 @@ internal static void GenerateSurfaceDescriptionStruct(ShaderStringBuilder surfac if (isSubgraphOutput) { var firstSlot = slots.FirstOrDefault(); - if (firstSlot != null) + if (SubGraphOutputNode.IsPreviewableType(firstSlot)) { var hlslName = $"{NodeUtils.GetHLSLSafeName(firstSlot.shaderOutputName)}_{firstSlot.id}"; surfaceDescriptionStruct.AppendLine("{0} {1};", firstSlot.concreteValueType.ToShaderString(firstSlot.owner.concretePrecision), hlslName); @@ -1206,7 +1206,7 @@ static void GenerateSurfaceDescriptionRemap( else if (rootNode is SubGraphOutputNode) { var slot = slots.FirstOrDefault(); - if (slot != null) + if (SubGraphOutputNode.IsPreviewableType(slot)) { var foundEdges = graph.GetEdges(slot.slotReference).ToArray(); var hlslName = $"{NodeUtils.GetHLSLSafeName(slot.shaderOutputName)}_{slot.id}"; From 12fd52adb2d52beff49736c9f113b44cf2f1f7ab Mon Sep 17 00:00:00 2001 From: Guillaume Levasseur Date: Fri, 16 Jan 2026 10:13:10 +0000 Subject: [PATCH 29/43] Remove automatic backbuffer image resizing and standardize test resolutions to 1080p --- .../Editor/HDRP_TestSettings_Editor.cs | 17 +- .../Runtime/UniversalGraphicsTestSettings.cs | 3 +- .../Scripts/Runtime/UniversalGraphicsTests.cs | 32 +- .../Runtime/ConfigureMockHMD.cs | 10 +- .../Assets/Tests/HDRP_DXR_Graphics_Tests.cs | 9 + .../Tests/HDRP_Runtime_Graphics_Tests.cs | 7 + .../GraphicTests/Tests/HDRP_Graphics_Tests.cs | 2 + ...rfect_CropFrame_Letterbox_Horizontal.unity | 110 +++---- .../GameCoreScarlettSettings.asset | 13 - .../GameCoreXboxOneSettings.asset | 16 - .../ProjectSettings/ProjectSettings.asset | 6 +- .../Assets/Scenes/001_SimpleCube.unity | 157 +++++---- .../Assets/Scenes/350_VRS_CustomPass.unity | 80 ++--- .../ProjectSettings/ProjectSettings.asset | 311 +++++++++--------- .../ProjectSettings/ProjectSettings.asset | 6 +- .../Scenes/071_ChromaticAberration.unity | 97 ++---- .../375_URP_Asset_HDROutput_FSR.asset | 11 +- .../ProjectSettings/ProjectSettings.asset | 4 +- 18 files changed, 426 insertions(+), 465 deletions(-) delete mode 100644 Tests/SRPTests/Projects/UniversalGraphicsTest_2D/ProjectSettings/GameCoreScarlettSettings.asset delete mode 100644 Tests/SRPTests/Projects/UniversalGraphicsTest_2D/ProjectSettings/GameCoreXboxOneSettings.asset diff --git a/Tests/SRPTests/Packages/com.unity.testing.hdrp/TestRunner/Editor/HDRP_TestSettings_Editor.cs b/Tests/SRPTests/Packages/com.unity.testing.hdrp/TestRunner/Editor/HDRP_TestSettings_Editor.cs index 6261a2c87cd..ee87e33668f 100644 --- a/Tests/SRPTests/Packages/com.unity.testing.hdrp/TestRunner/Editor/HDRP_TestSettings_Editor.cs +++ b/Tests/SRPTests/Packages/com.unity.testing.hdrp/TestRunner/Editor/HDRP_TestSettings_Editor.cs @@ -81,18 +81,23 @@ override public void OnInspectorGUI() EditorGUILayout.PropertyField(containsVFX); EditorGUILayout.PropertyField(doBeforeTest); - if(typedTarget.ImageComparisonSettings.UseBackBuffer) + string resolutionSource = ""; + + if (typedTarget.ImageComparisonSettings.UseBackBuffer) { - targetResolution = GetResolutionFromBackBufferResolutionEnum(typedTarget.ImageComparisonSettings.ImageResolution.ToString()); + // Default to 1080p when using backbuffer + targetResolution = new Vector2(1920, 1080); + resolutionSource = "Backbuffer Default (1920x1080)"; } else { targetResolution = new Vector2(typedTarget.ImageComparisonSettings.TargetWidth, typedTarget.ImageComparisonSettings.TargetHeight); + resolutionSource = $"Target {targetResolution.x}x{targetResolution.y}"; } liveViewSize = GUILayout.Toggle(liveViewSize, "When enabled, Game View resolution is updated live."); - if (GUILayout.Button("Set Game View Size") || liveViewSize && (prevWidth != targetResolution.x || prevHeight != targetResolution.y)) + if (GUILayout.Button($"Set Game View Size to {resolutionSource}") || liveViewSize && (prevWidth != targetResolution.x || prevHeight != targetResolution.y)) { prevWidth = (int)targetResolution.x; prevHeight = (int)targetResolution.y; @@ -114,12 +119,6 @@ override public void OnInspectorGUI() serializedObject.ApplyModifiedProperties(); } - public Vector2 GetResolutionFromBackBufferResolutionEnum(string resolution) - { - string[] resolutionArray = resolution.ToString().Split('w')[1].Split('h'); - return new Vector2(int.Parse(resolutionArray[0]), int.Parse(resolutionArray[1])); - } - void SetGameViewSize() { if (typedTarget == null) return; diff --git a/Tests/SRPTests/Packages/com.unity.testing.urp/Scripts/Runtime/UniversalGraphicsTestSettings.cs b/Tests/SRPTests/Packages/com.unity.testing.urp/Scripts/Runtime/UniversalGraphicsTestSettings.cs index 7328ba0dd1d..70829ebabc1 100644 --- a/Tests/SRPTests/Packages/com.unity.testing.urp/Scripts/Runtime/UniversalGraphicsTestSettings.cs +++ b/Tests/SRPTests/Packages/com.unity.testing.urp/Scripts/Runtime/UniversalGraphicsTestSettings.cs @@ -1,3 +1,4 @@ +using UnityEngine; using UnityEngine.TestTools.Graphics; public class UniversalGraphicsTestSettings : GraphicsTestSettings @@ -16,7 +17,7 @@ public enum RenderBackendCompatibility } public RenderBackendCompatibility renderBackendCompatibility = RenderBackendCompatibility.RenderGraphAndNonRenderGraph; - [UnityEngine.Tooltip("If enabled, the back buffer resolution will be set to the value specified by Image Comparison Settings -> Image Resolution, before doing the back buffer capture.")] + [HideInInspector] public bool SetBackBufferResolution = false; public UniversalGraphicsTestSettings() diff --git a/Tests/SRPTests/Packages/com.unity.testing.urp/Scripts/Runtime/UniversalGraphicsTests.cs b/Tests/SRPTests/Packages/com.unity.testing.urp/Scripts/Runtime/UniversalGraphicsTests.cs index d2c0e831911..892cb815819 100644 --- a/Tests/SRPTests/Packages/com.unity.testing.urp/Scripts/Runtime/UniversalGraphicsTests.cs +++ b/Tests/SRPTests/Packages/com.unity.testing.urp/Scripts/Runtime/UniversalGraphicsTests.cs @@ -28,8 +28,6 @@ public static IEnumerator RunGraphicsTest(SceneGraphicsTestCase testCase) Watermark.showDeveloperWatermark = false; GraphicsTestLogger.Log( $"Running test case '{testCase}' with scene '{testCase.ScenePath}'."); - GlobalResolutionSetter.SetResolution(RuntimePlatform.Android, width: 1920, height: 1080); - GlobalResolutionSetter.SetResolution(RuntimePlatform.EmbeddedLinuxArm64, width: 1920, height: 1080); SceneManager.LoadScene(testCase.ScenePath); @@ -73,22 +71,20 @@ public static IEnumerator RunGraphicsTest(SceneGraphicsTestCase testCase) if (settings.SetBackBufferResolution) { - // Set screen/backbuffer resolution before doing the capture in ImageAssert.AreEqual. This will avoid doing - // any resizing/scaling of the rendered image when comparing with the reference image in ImageAssert.AreEqual. - // This has to be done before WaitForEndOfFrame, as the request will only be applied after the frame ends. - int targetWidth = settings.ImageComparisonSettings.TargetWidth; - int targetHeight = settings.ImageComparisonSettings.TargetHeight; - Screen.SetResolution(targetWidth, targetHeight, settings.ImageComparisonSettings.UseBackBuffer ? FullScreenMode.FullScreenWindow : Screen.fullScreenMode); - - // Yield once to finish the current frame (this code runs before the rendering in a frame) with the former - // resolution. - // Yield twice to finish the next frame with the new resolution taking effect. - // Note that once the yields finish and the test resumes after the next for loop, the rendering will be - // in the same frame where the new resolution first took place. For effects such as motion vector - // rendering it means if the aspect ratio changes after setting the resolution, the previous camera matrix - // will be reset, cancelling out all the camera-based motions. - // In this case (e.g. UniversalGraphicsTest_Terrain, test scene 300 and 301) increase the wait frame to 3 - // on the UniversalGraphicsTestSettings component. + //This option is disabled and we keep it only to keep the extra wait frames and preserve the existing + // reference image. + + // Changing resolution during a test run introduce instabilities. + // Decides of a resolution for a test run and leave it to that. The resolution for most + // test projects is set to a constant 1080p,except when running in XR compatibility mode. + + // XR compatibility mode changes resolution depending on the target size, because the image is + // always captured from the backbuffer. + + GraphicsTestLogger.Log(LogType.Log, "Set back buffer resolution is being deprecated and does not change the resolution anymore, it only introduces extra wait frames to the test."); + + // Removing this line causes a subset of tests to fail. Removing it would require to update images + // and revisit some tests. waitFrames = Mathf.Max(waitFrames, 2); } diff --git a/Tests/SRPTests/Packages/com.unity.testing.xr/Runtime/ConfigureMockHMD.cs b/Tests/SRPTests/Packages/com.unity.testing.xr/Runtime/ConfigureMockHMD.cs index 3b38248f9c3..b4944019cc7 100644 --- a/Tests/SRPTests/Packages/com.unity.testing.xr/Runtime/ConfigureMockHMD.cs +++ b/Tests/SRPTests/Packages/com.unity.testing.xr/Runtime/ConfigureMockHMD.cs @@ -33,7 +33,15 @@ static public int SetupTest(bool xrCompatible, int waitFrames, UnityEngine.TestT Unity.XR.MockHMD.MockHMD.SetRenderMode(Unity.XR.MockHMD.MockHMDBuildSettings.RenderMode.SinglePassInstanced); // Configure MockHMD to match the original settings from the test scene - UnityEngine.TestTools.Graphics.ImageAssert.GetImageResolution(settings, out int w, out int h); + int w = 1920; + int h = 1080; + + if(!settings.UseBackBuffer) + { + w = settings.TargetWidth; + h = settings.TargetHeight; + } + Unity.XR.MockHMD.MockHMD.SetEyeResolution(w, h); Unity.XR.MockHMD.MockHMD.SetMirrorViewCrop(0.0f); diff --git a/Tests/SRPTests/Projects/HDRP_DXR_Tests/Assets/Tests/HDRP_DXR_Graphics_Tests.cs b/Tests/SRPTests/Projects/HDRP_DXR_Tests/Assets/Tests/HDRP_DXR_Graphics_Tests.cs index 5c34a9e8240..8e573d83e61 100644 --- a/Tests/SRPTests/Projects/HDRP_DXR_Tests/Assets/Tests/HDRP_DXR_Graphics_Tests.cs +++ b/Tests/SRPTests/Projects/HDRP_DXR_Tests/Assets/Tests/HDRP_DXR_Graphics_Tests.cs @@ -95,6 +95,13 @@ public class HDRP_Graphics_Tests public IEnumerator Run(SceneGraphicsTestCase testCase) { yield return HDRP_GraphicTestRunner.Run(testCase); + } + + [OneTimeSetUp] + public void OneTimeSetUp() + { + // Standard resolution for backbuffer capture is 1080p + Screen.SetResolution(1920, 1080, true); } #if UNITY_EDITOR @@ -148,6 +155,8 @@ public HDRP_GRD_DXR_Graphics_Tests(GpuResidentDrawerContext grdContext) [OneTimeSetUp] public void OneTimeSetUp() { + // Standard resolution for backbuffer capture is 1080p + Screen.SetResolution(1920, 1080, true); SceneManager.LoadScene("GraphicsTestTransitionScene", LoadSceneMode.Single); } diff --git a/Tests/SRPTests/Projects/HDRP_RuntimeTests/Assets/Tests/HDRP_Runtime_Graphics_Tests.cs b/Tests/SRPTests/Projects/HDRP_RuntimeTests/Assets/Tests/HDRP_Runtime_Graphics_Tests.cs index 7cb68bbc194..67d315bc590 100644 --- a/Tests/SRPTests/Projects/HDRP_RuntimeTests/Assets/Tests/HDRP_Runtime_Graphics_Tests.cs +++ b/Tests/SRPTests/Projects/HDRP_RuntimeTests/Assets/Tests/HDRP_Runtime_Graphics_Tests.cs @@ -13,6 +13,13 @@ public class HDRP_Runtime_Graphics_Tests : IPrebuildSetup #endif { + [OneTimeSetUp] + public void SetDefaultResolution() + { + // Standard resolution for backbuffer capture is 1080p + Screen.SetResolution(1920, 1080, true); + } + [UnityTest] [SceneGraphicsTest(@"Assets/Scenes/^[0-9]+")] [Timeout(450 * 1000)] // Set timeout to 450 sec. to handle complex scenes with many shaders (previous timeout was 300s) diff --git a/Tests/SRPTests/Projects/HDRP_Tests/Assets/GraphicTests/Tests/HDRP_Graphics_Tests.cs b/Tests/SRPTests/Projects/HDRP_Tests/Assets/GraphicTests/Tests/HDRP_Graphics_Tests.cs index 3840e244738..41b621e4f34 100644 --- a/Tests/SRPTests/Projects/HDRP_Tests/Assets/GraphicTests/Tests/HDRP_Graphics_Tests.cs +++ b/Tests/SRPTests/Projects/HDRP_Tests/Assets/GraphicTests/Tests/HDRP_Graphics_Tests.cs @@ -54,6 +54,8 @@ public HDRP_Graphics_Tests(GpuResidentDrawerContext grdContext) [OneTimeSetUp] public void OneTimeSetUp() { + // Standard resolution for backbuffer capture is 1080p + Screen.SetResolution(1920, 1080, true); SceneManager.LoadScene("GraphicsTestTransitionScene", LoadSceneMode.Single); } diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/001_Pixel_Perfect_CropFrame_Letterbox_Horizontal.unity b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/001_Pixel_Perfect_CropFrame_Letterbox_Horizontal.unity index ea8667ccf65..5cd2e9a3922 100644 --- a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/001_Pixel_Perfect_CropFrame_Letterbox_Horizontal.unity +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/001_Pixel_Perfect_CropFrame_Letterbox_Horizontal.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 9 + serializedVersion: 10 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -38,13 +38,12 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.12731713, g: 0.13414736, b: 0.121078536, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 + serializedVersion: 13 + m_BakeOnSceneLoad: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -67,9 +66,6 @@ LightmapSettings: m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 1 @@ -104,7 +100,7 @@ NavMeshSettings: serializedVersion: 2 m_ObjectHideFlags: 0 m_BuildSettings: - serializedVersion: 2 + serializedVersion: 3 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 @@ -117,58 +113,12 @@ NavMeshSettings: cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 - accuratePlacement: 0 + buildHeightMesh: 0 maxJobWorkers: 0 preserveTilesOutsideBounds: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &750040182 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 750040184} - - component: {fileID: 750040183} - m_Layer: 0 - m_Name: Resolution setter - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &750040183 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 750040182} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3b7a791aa4ee448a7a269341301b2063, type: 3} - m_Name: - m_EditorClassIdentifier: - customResolutionSettings: {fileID: 11400000, guid: 2fcff19072d5c4aa7b8dc1e0822a8bc8, - type: 2} ---- !u!4 &750040184 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 750040182} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1054903254 GameObject: m_ObjectHideFlags: 0 @@ -194,13 +144,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1054903254} + serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 2, y: 2, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!23 &1054903257 MeshRenderer: @@ -219,6 +169,11 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -240,9 +195,11 @@ MeshRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_MaskInteraction: 0 m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1054903258 MeshFilter: @@ -303,8 +260,19 @@ MonoBehaviour: m_Dithering: 0 m_ClearDepth: 1 m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} m_RequiresDepthTexture: 0 m_RequiresColorTexture: 0 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 m_Version: 2 --- !u!81 &1711343245 AudioListener: @@ -328,15 +296,23 @@ Camera: m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 m_SensorSize: {x: 36, y: 24} m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 m_NormalizedViewPortRect: serializedVersion: 2 x: 0 y: 0 - width: 0.60117495 - height: 0.35110533 + width: 1 + height: 1 near clip plane: 0.3 far clip plane: 1000 field of view: 60 @@ -364,13 +340,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1711343243} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1711343248 MonoBehaviour: @@ -390,6 +366,7 @@ MonoBehaviour: m_RefResolutionY: 2 m_CropFrame: 2 m_GridSnapping: 0 + m_FilterMode: 0 m_UpscaleRT: 0 m_PixelSnapping: 0 m_CropFrameX: 0 @@ -410,15 +387,26 @@ MonoBehaviour: ImageComparisonSettings: TargetWidth: 512 TargetHeight: 256 + TargetMSAASamples: 1 PerPixelCorrectnessThreshold: 0.001 PerPixelGammaThreshold: 0.003921569 PerPixelAlphaThreshold: 0.003921569 + RMSEThreshold: 0 AverageCorrectnessThreshold: 0.005 IncorrectPixelsThreshold: 0.0000038146973 UseHDR: 0 UseBackBuffer: 0 - ImageResolution: 0 ActiveImageTests: 1 ActivePixelTests: 7 WaitFrames: 0 XRCompatible: 1 + gpuDrivenCompatible: 1 + CheckMemoryAllocation: 1 + renderBackendCompatibility: 2 + SetBackBufferResolution: 0 +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1711343247} + - {fileID: 1054903255} diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/ProjectSettings/GameCoreScarlettSettings.asset b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/ProjectSettings/GameCoreScarlettSettings.asset deleted file mode 100644 index 27643e16ec8..00000000000 --- a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/ProjectSettings/GameCoreScarlettSettings.asset +++ /dev/null @@ -1,13 +0,0 @@ -{ - "buildSubtarget": 0, - "deploymentMethod": 0, - "deploymentDrive": 0, - "scid": "00000000-0000-0000-0000-000000000000", - "packageEncryption": 0, - "localizationPathOverride": "", - "resourcePriPathOverride": "", - "xboxSeriesSResolutionWidth": 2560, - "xboxSeriesSResolutionHeight": 1440, - "xboxSeriesXResolutionWidth": 3840, - "xboxSeriesXResolutionHeight": 2160 -} \ No newline at end of file diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/ProjectSettings/GameCoreXboxOneSettings.asset b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/ProjectSettings/GameCoreXboxOneSettings.asset deleted file mode 100644 index 1166df265f5..00000000000 --- a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/ProjectSettings/GameCoreXboxOneSettings.asset +++ /dev/null @@ -1,16 +0,0 @@ -{ - "buildSubtarget": 0, - "deploymentMethod": 0, - "deploymentDrive": 0, - "scid": "00000000-0000-0000-0000-000000000000", - "packageEncryption": 0, - "localizationPathOverride": "", - "resourcePriPathOverride": "", - "xboxOneResolutionWidth": 1920, - "xboxOneResolutionHeight": 1080, - "xboxOneSResolutionWidth": 1920, - "xboxOneSResolutionHeight": 1080, - "xboxOneXResolutionWidth": 3840, - "xboxOneXResolutionHeight": 2160, - "esramDisabled": false -} \ No newline at end of file diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/ProjectSettings/ProjectSettings.asset b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/ProjectSettings/ProjectSettings.asset index 1b893d16257..2f8878b44f1 100644 --- a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/ProjectSettings/ProjectSettings.asset +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/ProjectSettings/ProjectSettings.asset @@ -43,8 +43,8 @@ PlayerSettings: m_VirtualRealitySplashScreen: {fileID: 0} defaultScreenWidth: 1920 defaultScreenHeight: 1080 - defaultScreenWidthWeb: 960 - defaultScreenHeightWeb: 600 + defaultScreenWidthWeb: 1920 + defaultScreenHeightWeb: 1080 m_StereoRenderingPath: 1 m_ActiveColorSpace: 1 unsupportedMSAAFallback: 0 @@ -602,7 +602,7 @@ PlayerSettings: switchSocketMemoryPoolSize: 6144 switchSocketAllocatorPoolSize: 128 switchSocketConcurrencyLimit: 14 - switchScreenResolutionBehavior: 2 + switchScreenResolutionBehavior: 0 switchUseCPUProfiler: 0 switchEnableFileSystemTrace: 0 switchLTOSetting: 0 diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/001_SimpleCube.unity b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/001_SimpleCube.unity index 60cb868156d..fd900c93636 100644 --- a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/001_SimpleCube.unity +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/001_SimpleCube.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 9 + serializedVersion: 10 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -38,13 +38,12 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.18029502, g: 0.22572649, b: 0.30692935, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 + serializedVersion: 13 + m_BakeOnSceneLoad: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -134,6 +133,7 @@ GameObject: - component: {fileID: 380492251} - component: {fileID: 380492250} - component: {fileID: 380492252} + - component: {fileID: 380492255} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -172,6 +172,7 @@ MonoBehaviour: ImageComparisonSettings: TargetWidth: 512 TargetHeight: 512 + TargetMSAASamples: 1 PerPixelCorrectnessThreshold: 0.005 PerPixelGammaThreshold: 0.003921569 PerPixelAlphaThreshold: 0.003921569 @@ -180,12 +181,14 @@ MonoBehaviour: IncorrectPixelsThreshold: 0.0000038146973 UseHDR: 0 UseBackBuffer: 0 - ImageResolution: 0 ActiveImageTests: 1 ActivePixelTests: 7 WaitFrames: 0 XRCompatible: 1 + gpuDrivenCompatible: 1 CheckMemoryAllocation: 1 + renderBackendCompatibility: 2 + SetBackBufferResolution: 0 --- !u!20 &380492253 Camera: m_ObjectHideFlags: 0 @@ -244,14 +247,58 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 380492249} + serializedVersion: 2 m_LocalRotation: {x: 0.24609356, y: 0.36251447, z: -0.099864565, w: 0.89333546} m_LocalPosition: {x: -3.6031294, y: 2.2863412, z: 26.36942} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &380492255 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 380492249} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalCameraData + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 + m_Version: 2 --- !u!1 &707831285 GameObject: m_ObjectHideFlags: 0 @@ -278,15 +325,14 @@ Light: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 707831285} m_Enabled: 1 - serializedVersion: 10 + serializedVersion: 13 m_Type: 1 - m_Shape: 0 m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} m_Intensity: 1 m_Range: 10 m_SpotAngle: 30 m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 + m_CookieSize2D: {x: 10, y: 10} m_Shadows: m_Type: 0 m_Resolution: -1 @@ -330,8 +376,12 @@ Light: m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} m_UseBoundingSphereOverride: 0 m_UseViewFrustumForShadowCasterCull: 1 - m_ShadowRadius: 0 + m_ForceVisible: 0 + m_ShapeRadius: 0 m_ShadowAngle: 0 + m_LightUnit: 1 + m_LuxAtDistance: 1 + m_EnableSpotReflector: 1 --- !u!4 &707831287 Transform: m_ObjectHideFlags: 0 @@ -339,13 +389,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 707831285} + serializedVersion: 2 m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!114 &707831288 MonoBehaviour: @@ -359,63 +409,23 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 3 m_UsePipelineSettings: 1 m_AdditionalLightsShadowResolutionTier: 2 - m_LightLayerMask: 1 - m_RenderingLayers: 1 m_CustomShadowLayers: 0 - m_ShadowLayerMask: 1 - m_ShadowRenderingLayers: 1 m_LightCookieSize: {x: 1, y: 1} m_LightCookieOffset: {x: 0, y: 0} m_SoftShadowQuality: 1 ---- !u!1 &1159751076 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1159751078} - - component: {fileID: 1159751077} - m_Layer: 0 - m_Name: Resolution setter - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1159751077 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1159751076} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3b7a791aa4ee448a7a269341301b2063, type: 3} - m_Name: - m_EditorClassIdentifier: - customResolutionSettings: {fileID: 11400000, guid: 73b21b64e959149e3a2168f1ef286e21, - type: 2} ---- !u!4 &1159751078 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1159751076} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_RenderingLayersMask: + serializedVersion: 0 + m_Bits: 1 + m_ShadowRenderingLayersMask: + serializedVersion: 0 + m_Bits: 1 + m_Version: 4 + m_LightLayerMask: 1 + m_ShadowLayerMask: 1 + m_RenderingLayers: 1 + m_ShadowRenderingLayers: 1 --- !u!1 &1203640971 GameObject: m_ObjectHideFlags: 0 @@ -452,6 +462,11 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -473,9 +488,11 @@ MeshRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_MaskInteraction: 0 m_AdditionalVertexStreams: {fileID: 0} --- !u!65 &1203640973 BoxCollider: @@ -513,13 +530,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1203640971} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -1.8925657, y: 0.82283884, z: 28.129997} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1396913726 GameObject: @@ -551,6 +568,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: qualityLevelIndex: 0 + callbacks: [] --- !u!4 &1396913728 Transform: m_ObjectHideFlags: 0 @@ -558,13 +576,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1396913726} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -1.5195698, y: 1.3765798, z: 0.5559635} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &2119664221 GameObject: @@ -602,11 +620,20 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2119664221} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1396913728} + - {fileID: 380492254} + - {fileID: 707831287} + - {fileID: 1203640975} + - {fileID: 2119664223} diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/350_VRS_CustomPass.unity b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/350_VRS_CustomPass.unity index f00baf668a5..cecf2ee227a 100644 --- a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/350_VRS_CustomPass.unity +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/350_VRS_CustomPass.unity @@ -163,7 +163,6 @@ MonoBehaviour: IncorrectPixelsThreshold: 0.0000038146973 UseHDR: 0 UseBackBuffer: 0 - ImageResolution: 3 ActiveImageTests: 1 ActivePixelTests: -1 WaitFrames: 0 @@ -274,7 +273,6 @@ MonoBehaviour: m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} m_RequiresDepthTexture: 0 m_RequiresColorTexture: 0 - m_Version: 2 m_TaaSettings: m_Quality: 3 m_FrameInfluence: 0.1 @@ -282,6 +280,7 @@ MonoBehaviour: m_MipBias: 0 m_VarianceClampScale: 0.9 m_ContrastAdaptiveSharpening: 0 + m_Version: 2 --- !u!1 &677415232 GameObject: m_ObjectHideFlags: 0 @@ -343,6 +342,8 @@ MeshRenderer: m_RayTracingAccelStructBuildFlagsOverride: 0 m_RayTracingAccelStructBuildFlags: 1 m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -364,9 +365,11 @@ MeshRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_MaskInteraction: 0 m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &677415235 MeshFilter: @@ -417,14 +420,14 @@ Light: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 707831285} m_Enabled: 1 - serializedVersion: 11 + serializedVersion: 13 m_Type: 1 m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} m_Intensity: 1 m_Range: 10 m_SpotAngle: 30 m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 + m_CookieSize2D: {x: 10, y: 10} m_Shadows: m_Type: 0 m_Resolution: -1 @@ -469,7 +472,7 @@ Light: m_UseBoundingSphereOverride: 0 m_UseViewFrustumForShadowCasterCull: 1 m_ForceVisible: 0 - m_ShadowRadius: 0 + m_ShapeRadius: 0 m_ShadowAngle: 0 m_LightUnit: 1 m_LuxAtDistance: 1 @@ -501,63 +504,23 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 3 m_UsePipelineSettings: 1 m_AdditionalLightsShadowResolutionTier: 2 - m_LightLayerMask: 1 - m_RenderingLayers: 1 m_CustomShadowLayers: 0 - m_ShadowLayerMask: 1 - m_ShadowRenderingLayers: 1 m_LightCookieSize: {x: 1, y: 1} m_LightCookieOffset: {x: 0, y: 0} m_SoftShadowQuality: 1 ---- !u!1 &1159751076 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1159751078} - - component: {fileID: 1159751077} - m_Layer: 0 - m_Name: Resolution setter - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1159751077 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1159751076} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3b7a791aa4ee448a7a269341301b2063, type: 3} - m_Name: - m_EditorClassIdentifier: - customResolutionSettings: {fileID: 11400000, guid: 73b21b64e959149e3a2168f1ef286e21, - type: 2} ---- !u!4 &1159751078 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1159751076} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_RenderingLayersMask: + serializedVersion: 0 + m_Bits: 1 + m_ShadowRenderingLayersMask: + serializedVersion: 0 + m_Bits: 1 + m_Version: 4 + m_LightLayerMask: 1 + m_ShadowLayerMask: 1 + m_RenderingLayers: 1 + m_ShadowRenderingLayers: 1 --- !u!1 &1282555821 GameObject: m_ObjectHideFlags: 0 @@ -618,6 +581,8 @@ MeshRenderer: m_RayTracingAccelStructBuildFlagsOverride: 0 m_RayTracingAccelStructBuildFlags: 1 m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -639,9 +604,11 @@ MeshRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_MaskInteraction: 0 m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1282555824 MeshFilter: @@ -764,6 +731,5 @@ SceneRoots: - {fileID: 380492254} - {fileID: 707831287} - {fileID: 2119664223} - - {fileID: 1159751078} - {fileID: 677415236} - {fileID: 1282555825} diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/ProjectSettings/ProjectSettings.asset b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/ProjectSettings/ProjectSettings.asset index 855a239e51e..d680005dfa2 100644 --- a/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/ProjectSettings/ProjectSettings.asset +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/ProjectSettings/ProjectSettings.asset @@ -17,8 +17,8 @@ PlayerSettings: defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} - m_ShowUnitySplashScreen: 1 - m_ShowUnitySplashLogo: 1 + m_ShowUnitySplashScreen: 0 + m_ShowUnitySplashLogo: 0 m_SplashScreenOverlayOpacity: 1 m_SplashScreenAnimation: 1 m_SplashScreenLogoStyle: 1 @@ -43,8 +43,8 @@ PlayerSettings: m_VirtualRealitySplashScreen: {fileID: 0} defaultScreenWidth: 1920 defaultScreenHeight: 1080 - defaultScreenWidthWeb: 960 - defaultScreenHeightWeb: 600 + defaultScreenWidthWeb: 1920 + defaultScreenHeightWeb: 1080 m_StereoRenderingPath: 1 m_ActiveColorSpace: 1 unsupportedMSAAFallback: 0 @@ -69,6 +69,7 @@ PlayerSettings: androidStartInFullscreen: 1 androidRenderOutsideSafeArea: 1 androidUseSwappy: 0 + androidDisplayOptions: 1 androidBlitType: 0 androidResizeableActivity: 0 androidDefaultWindowWidth: 1920 @@ -94,7 +95,7 @@ PlayerSettings: bakeCollisionMeshes: 0 forceSingleInstance: 0 useFlipModelSwapchain: 1 - resizableWindow: 0 + resizableWindow: 1 useMacAppStoreValidation: 0 macAppStoreCategory: public.app-category.games gpuSkinning: 0 @@ -106,7 +107,7 @@ PlayerSettings: xboxEnableFitness: 0 visibleInBackground: 1 allowFullscreenSwitch: 1 - fullscreenMode: 3 + fullscreenMode: 0 xboxSpeechDB: 0 xboxEnableHeadOrientation: 0 xboxEnableGuest: 0 @@ -172,10 +173,11 @@ PlayerSettings: tvOS: 0 overrideDefaultApplicationIdentifier: 1 AndroidBundleVersionCode: 1 - AndroidMinSdkVersion: 23 + AndroidMinSdkVersion: 25 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1 - aotOptions: + AndroidPreferredDataLocation: 1 + aotOptions: stripEngineCode: 1 iPhoneStrippingLevel: 0 iPhoneScriptCallOptimization: 0 @@ -189,11 +191,11 @@ PlayerSettings: VertexChannelCompressionMask: 4054 iPhoneSdkVersion: 988 iOSSimulatorArchitecture: 0 - iOSTargetOSVersionString: 13.0 + iOSTargetOSVersionString: 15.0 tvOSSdkVersion: 0 tvOSSimulatorArchitecture: 0 tvOSRequireExtendedGameController: 0 - tvOSTargetOSVersionString: 13.0 + tvOSTargetOSVersionString: 15.0 VisionOSSdkVersion: 0 VisionOSTargetOSVersionString: 1.0 uIPrerenderedIcon: 0 @@ -227,8 +229,8 @@ PlayerSettings: rgba: 0 iOSLaunchScreeniPadFillPct: 100 iOSLaunchScreeniPadSize: 100 - iOSLaunchScreenCustomStoryboardPath: - iOSLaunchScreeniPadCustomStoryboardPath: + iOSLaunchScreenCustomStoryboardPath: + iOSLaunchScreeniPadCustomStoryboardPath: iOSDeviceRequirements: [] iOSURLSchemes: [] macOSURLSchemes: [] @@ -239,10 +241,10 @@ PlayerSettings: metalCompileShaderBinary: 1 iOSRenderExtraFrameOnPause: 0 iosCopyPluginsCodeInsteadOfSymlink: 0 - appleDeveloperTeamID: - iOSManualSigningProvisioningProfileID: - tvOSManualSigningProvisioningProfileID: - VisionOSManualSigningProvisioningProfileID: + appleDeveloperTeamID: + iOSManualSigningProvisioningProfileID: + tvOSManualSigningProvisioningProfileID: + VisionOSManualSigningProvisioningProfileID: iOSManualSigningProvisioningProfileType: 0 tvOSManualSigningProvisioningProfileType: 0 VisionOSManualSigningProvisioningProfileType: 0 @@ -252,8 +254,8 @@ PlayerSettings: appleEnableProMotion: 0 shaderPrecisionModel: 0 clonedFromGUID: 00000000000000000000000000000000 - templatePackageId: - templateDefaultScene: + templatePackageId: + templateDefaultScene: useCustomMainManifest: 0 useCustomLauncherManifest: 0 useCustomMainGradleTemplate: 0 @@ -267,7 +269,7 @@ PlayerSettings: AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} AndroidKeystoreName: '{inproject}: ' - AndroidKeyaliasName: + AndroidKeyaliasName: AndroidEnableArmv9SecurityFeatures: 0 AndroidEnableArm64MTE: 0 AndroidBuildApkPerCpuArchitecture: 0 @@ -275,7 +277,7 @@ PlayerSettings: AndroidIsGame: 1 androidAppCategory: 3 useAndroidAppCategory: 1 - androidAppCategoryOther: + androidAppCategoryOther: AndroidEnableTango: 0 androidEnableBanner: 1 androidUseLowAccuracyLocation: 0 @@ -396,96 +398,96 @@ PlayerSettings: m_Width: 432 m_Height: 432 m_Kind: 2 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 324 m_Height: 324 m_Kind: 2 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 216 m_Height: 216 m_Kind: 2 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 162 m_Height: 162 m_Kind: 2 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 108 m_Height: 108 m_Kind: 2 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 81 m_Height: 81 m_Kind: 2 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 192 m_Height: 192 m_Kind: 1 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 144 m_Height: 144 m_Kind: 1 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 96 m_Height: 96 m_Kind: 1 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 72 m_Height: 72 m_Kind: 1 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 48 m_Height: 48 m_Kind: 1 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 36 m_Height: 36 m_Kind: 1 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 192 m_Height: 192 m_Kind: 0 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 144 m_Height: 144 m_Kind: 0 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 96 m_Height: 96 m_Kind: 0 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 72 m_Height: 72 m_Kind: 0 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 48 m_Height: 48 m_Kind: 0 - m_SubKind: + m_SubKind: - m_Textures: [] m_Width: 36 m_Height: 36 m_Kind: 0 - m_SubKind: + m_SubKind: m_BuildTargetBatching: - m_BuildTarget: Standalone m_StaticBatching: 0 - m_DynamicBatching: 1 + m_DynamicBatching: 0 m_BuildTargetShaderSettings: [] m_BuildTargetGraphicsJobs: - m_BuildTarget: MacStandaloneSupport @@ -546,7 +548,10 @@ PlayerSettings: m_BuildTargetGroupLightmapSettings: [] m_BuildTargetGroupLoadStoreDebugModeSettings: [] m_BuildTargetNormalMapEncoding: [] - m_BuildTargetDefaultTextureCompressionFormat: [] + m_BuildTargetDefaultTextureCompressionFormat: + - serializedVersion: 3 + m_BuildTarget: WebGL + m_Formats: 05000000 playModeTestRunnerEnabled: 1 runPlayModeTestAsEditModeTest: 0 actionOnDotNetUnhandledException: 1 @@ -554,13 +559,13 @@ PlayerSettings: enableInternalProfiler: 0 logObjCUncaughtExceptions: 1 enableCrashReportAPI: 0 - cameraUsageDescription: - locationUsageDescription: - microphoneUsageDescription: - bluetoothUsageDescription: - macOSTargetOSVersion: 11.0 - switchNMETAOverride: - switchNetLibKey: + cameraUsageDescription: + locationUsageDescription: + microphoneUsageDescription: + bluetoothUsageDescription: + macOSTargetOSVersion: 12.0 + switchNMETAOverride: + switchNetLibKey: switchSocketMemoryPoolSize: 6144 switchSocketAllocatorPoolSize: 128 switchSocketConcurrencyLimit: 14 @@ -569,40 +574,40 @@ PlayerSettings: switchEnableFileSystemTrace: 0 switchLTOSetting: 0 switchApplicationID: 0x01004b9000490000 - switchNSODependencies: - switchCompilerFlags: - switchTitleNames_0: - switchTitleNames_1: - switchTitleNames_2: - switchTitleNames_3: - switchTitleNames_4: - switchTitleNames_5: - switchTitleNames_6: - switchTitleNames_7: - switchTitleNames_8: - switchTitleNames_9: - switchTitleNames_10: - switchTitleNames_11: - switchTitleNames_12: - switchTitleNames_13: - switchTitleNames_14: - switchTitleNames_15: - switchPublisherNames_0: - switchPublisherNames_1: - switchPublisherNames_2: - switchPublisherNames_3: - switchPublisherNames_4: - switchPublisherNames_5: - switchPublisherNames_6: - switchPublisherNames_7: - switchPublisherNames_8: - switchPublisherNames_9: - switchPublisherNames_10: - switchPublisherNames_11: - switchPublisherNames_12: - switchPublisherNames_13: - switchPublisherNames_14: - switchPublisherNames_15: + switchNSODependencies: + switchCompilerFlags: + switchTitleNames_0: + switchTitleNames_1: + switchTitleNames_2: + switchTitleNames_3: + switchTitleNames_4: + switchTitleNames_5: + switchTitleNames_6: + switchTitleNames_7: + switchTitleNames_8: + switchTitleNames_9: + switchTitleNames_10: + switchTitleNames_11: + switchTitleNames_12: + switchTitleNames_13: + switchTitleNames_14: + switchTitleNames_15: + switchPublisherNames_0: + switchPublisherNames_1: + switchPublisherNames_2: + switchPublisherNames_3: + switchPublisherNames_4: + switchPublisherNames_5: + switchPublisherNames_6: + switchPublisherNames_7: + switchPublisherNames_8: + switchPublisherNames_9: + switchPublisherNames_10: + switchPublisherNames_11: + switchPublisherNames_12: + switchPublisherNames_13: + switchPublisherNames_14: + switchPublisherNames_15: switchIcons_0: {fileID: 0} switchIcons_1: {fileID: 0} switchIcons_2: {fileID: 0} @@ -635,18 +640,18 @@ PlayerSettings: switchSmallIcons_13: {fileID: 0} switchSmallIcons_14: {fileID: 0} switchSmallIcons_15: {fileID: 0} - switchManualHTML: - switchAccessibleURLs: - switchLegalInformation: + switchManualHTML: + switchAccessibleURLs: + switchLegalInformation: switchMainThreadStackSize: 1048576 - switchPresenceGroupId: + switchPresenceGroupId: switchLogoHandling: 0 switchReleaseVersion: 0 switchDisplayVersion: 1.0.0 switchStartupUserAccount: 0 switchSupportedLanguagesMask: 0 switchLogoType: 0 - switchApplicationErrorCodeCategory: + switchApplicationErrorCodeCategory: switchUserAccountSaveDataSize: 0 switchUserAccountSaveDataJournalSize: 0 switchApplicationAttribute: 0 @@ -666,14 +671,14 @@ PlayerSettings: switchRatingsInt_10: 0 switchRatingsInt_11: 0 switchRatingsInt_12: 0 - switchLocalCommunicationIds_0: - switchLocalCommunicationIds_1: - switchLocalCommunicationIds_2: - switchLocalCommunicationIds_3: - switchLocalCommunicationIds_4: - switchLocalCommunicationIds_5: - switchLocalCommunicationIds_6: - switchLocalCommunicationIds_7: + switchLocalCommunicationIds_0: + switchLocalCommunicationIds_1: + switchLocalCommunicationIds_2: + switchLocalCommunicationIds_3: + switchLocalCommunicationIds_4: + switchLocalCommunicationIds_5: + switchLocalCommunicationIds_6: + switchLocalCommunicationIds_7: switchParentalControl: 0 switchAllowsScreenshot: 1 switchAllowsVideoCapturing: 1 @@ -705,35 +710,35 @@ PlayerSettings: switchRamDiskSpaceSize: 12 switchUpgradedPlayerSettingsToNMETA: 0 ps4NPAgeRating: 12 - ps4NPTitleSecret: - ps4NPTrophyPackPath: + ps4NPTitleSecret: + ps4NPTrophyPackPath: ps4ParentalLevel: 11 ps4ContentID: ED1633-NPXX51362_00-0000000000000000 ps4Category: 0 ps4MasterVersion: 01.00 ps4AppVersion: 01.00 ps4AppType: 0 - ps4ParamSfxPath: + ps4ParamSfxPath: ps4VideoOutPixelFormat: 0 ps4VideoOutInitialWidth: 1920 ps4VideoOutBaseModeInitialWidth: 1920 ps4VideoOutReprojectionRate: 60 - ps4PronunciationXMLPath: - ps4PronunciationSIGPath: - ps4BackgroundImagePath: - ps4StartupImagePath: - ps4StartupImagesFolder: - ps4IconImagesFolder: - ps4SaveDataImagePath: - ps4SdkOverride: - ps4BGMPath: - ps4ShareFilePath: - ps4ShareOverlayImagePath: - ps4PrivacyGuardImagePath: - ps4ExtraSceSysFile: - ps4NPtitleDatPath: + ps4PronunciationXMLPath: + ps4PronunciationSIGPath: + ps4BackgroundImagePath: + ps4StartupImagePath: + ps4StartupImagesFolder: + ps4IconImagesFolder: + ps4SaveDataImagePath: + ps4SdkOverride: + ps4BGMPath: + ps4ShareFilePath: + ps4ShareOverlayImagePath: + ps4PrivacyGuardImagePath: + ps4ExtraSceSysFile: + ps4NPtitleDatPath: ps4RemotePlayKeyAssignment: -1 - ps4RemotePlayKeyMappingDir: + ps4RemotePlayKeyMappingDir: ps4PlayTogetherPlayerCount: 0 ps4EnterButtonAssignment: 2 ps4ApplicationParam1: 0 @@ -761,9 +766,9 @@ PlayerSettings: ps4ScriptOptimizationLevel: 2 ps4Audio3dVirtualSpeakerCount: 14 ps4attribCpuUsage: 0 - ps4PatchPkgPath: - ps4PatchLatestPkgPath: - ps4PatchChangeinfoPath: + ps4PatchPkgPath: + ps4PatchLatestPkgPath: + ps4PatchChangeinfoPath: ps4PatchDayOne: 0 ps4attribUserManagement: 0 ps4attribMoveSupport: 0 @@ -779,19 +784,19 @@ PlayerSettings: ps4attribEyeToEyeDistanceSettingVR: 0 ps4IncludedModules: [] ps4attribVROutputEnabled: 0 - monoEnv: + monoEnv: splashScreenBackgroundSourceLandscape: {fileID: 0} splashScreenBackgroundSourcePortrait: {fileID: 0} blurSplashScreenBackground: 1 - spritePackerPolicy: + spritePackerPolicy: webGLMemorySize: 256 webGLExceptionSupport: 1 webGLNameFilesAsHashes: 0 webGLShowDiagnostics: 0 webGLDataCaching: 1 webGLDebugSymbols: 0 - webGLEmscriptenArgs: - webGLModulesDirectory: + webGLEmscriptenArgs: + webGLModulesDirectory: webGLTemplate: APPLICATION:Default webGLAnalyzeBuildSize: 0 webGLUseEmbeddedResources: 1 @@ -836,7 +841,7 @@ PlayerSettings: suppressCommonWarnings: 1 allowUnsafeCode: 0 useDeterministicCompilation: 1 - additionalIl2CppArgs: + additionalIl2CppArgs: scriptingRuntimeVersion: 1 gcIncremental: 0 gcWBarrierValidation: 0 @@ -845,15 +850,15 @@ PlayerSettings: m_RenderingPath: 1 m_MobileRenderingPath: 1 metroPackageName: GraphicsTests - metroPackageVersion: - metroCertificatePath: - metroCertificatePassword: - metroCertificateSubject: - metroCertificateIssuer: + metroPackageVersion: + metroCertificatePath: + metroCertificatePassword: + metroCertificateSubject: + metroCertificateIssuer: metroCertificateNotAfter: 0000000000000000 metroApplicationDescription: GraphicsTests wsaImages: {} - metroTileShortName: + metroTileShortName: metroTileShowName: 0 metroMediumTileShowName: 0 metroLargeTileShowName: 0 @@ -869,23 +874,23 @@ PlayerSettings: syncCapabilities: 0 platformCapabilities: {} metroTargetDeviceFamilies: {} - metroFTAName: + metroFTAName: metroFTAFileTypes: [] - metroProtocolName: - vcxProjDefaultLanguage: - XboxOneProductId: - XboxOneUpdateKey: - XboxOneSandboxId: - XboxOneContentId: - XboxOneTitleId: - XboxOneSCId: - XboxOneGameOsOverridePath: - XboxOnePackagingOverridePath: - XboxOneAppManifestOverridePath: + metroProtocolName: + vcxProjDefaultLanguage: + XboxOneProductId: + XboxOneUpdateKey: + XboxOneSandboxId: + XboxOneContentId: + XboxOneTitleId: + XboxOneSCId: + XboxOneGameOsOverridePath: + XboxOnePackagingOverridePath: + XboxOneAppManifestOverridePath: XboxOneVersion: 1.0.0.0 XboxOnePackageEncryption: 0 XboxOnePackageUpdateGranularity: 2 - XboxOneDescription: + XboxOneDescription: XboxOneLanguage: - enus XboxOneCapability: [] @@ -898,36 +903,36 @@ PlayerSettings: XboxOneAllowedProductIds: [] XboxOnePersistentLocalStorageSize: 0 XboxOneXTitleMemory: 8 - XboxOneOverrideIdentityName: - XboxOneOverrideIdentityPublisher: + XboxOneOverrideIdentityName: + XboxOneOverrideIdentityPublisher: vrEditorSettings: {} cloudServicesEnabled: {} luminIcon: - m_Name: - m_ModelFolderPath: - m_PortalFolderPath: + m_Name: + m_ModelFolderPath: + m_PortalFolderPath: luminCert: - m_CertPath: + m_CertPath: m_SignPackage: 1 luminIsChannelApp: 0 luminVersion: m_VersionCode: 1 - m_VersionName: - hmiPlayerDataPath: + m_VersionName: + hmiPlayerDataPath: hmiForceSRGBBlit: 1 embeddedLinuxEnableGamepadInput: 1 - hmiCpuConfiguration: + hmiCpuConfiguration: hmiLogStartupTiming: 0 - qnxGraphicConfPath: + qnxGraphicConfPath: apiCompatibilityLevel: 6 captureStartupLogs: {} activeInputHandler: 0 windowsGamepadBackendHint: 0 - cloudProjectId: + cloudProjectId: framebufferDepthMemorylessMode: 0 qualitySettingsNames: [] - projectName: - organizationId: + projectName: + organizationId: cloudEnabled: 0 legacyClampBlendShapeWeights: 1 hmiLoadingImage: {fileID: 0} @@ -937,3 +942,5 @@ PlayerSettings: androidVulkanDenyFilterList: [] androidVulkanAllowFilterList: [] androidVulkanDeviceFilterListAsset: {fileID: 0} + d3d12DeviceFilterListAsset: {fileID: 0} + allowedHttpConnections: 3 diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_Lighting/ProjectSettings/ProjectSettings.asset b/Tests/SRPTests/Projects/UniversalGraphicsTest_Lighting/ProjectSettings/ProjectSettings.asset index 617f9284e04..d268cc447ab 100644 --- a/Tests/SRPTests/Projects/UniversalGraphicsTest_Lighting/ProjectSettings/ProjectSettings.asset +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_Lighting/ProjectSettings/ProjectSettings.asset @@ -43,8 +43,8 @@ PlayerSettings: m_VirtualRealitySplashScreen: {fileID: 0} defaultScreenWidth: 1920 defaultScreenHeight: 1080 - defaultScreenWidthWeb: 960 - defaultScreenHeightWeb: 600 + defaultScreenWidthWeb: 1920 + defaultScreenHeightWeb: 1080 m_StereoRenderingPath: 1 m_ActiveColorSpace: 1 unsupportedMSAAFallback: 0 @@ -561,7 +561,7 @@ PlayerSettings: switchSocketMemoryPoolSize: 6144 switchSocketAllocatorPoolSize: 128 switchSocketConcurrencyLimit: 14 - switchScreenResolutionBehavior: 2 + switchScreenResolutionBehavior: 0 switchUseCPUProfiler: 0 switchEnableFileSystemTrace: 0 switchUseGOLDLinker: 0 diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/Assets/Scenes/071_ChromaticAberration.unity b/Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/Assets/Scenes/071_ChromaticAberration.unity index 1632021d005..ebbb0e72033 100644 --- a/Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/Assets/Scenes/071_ChromaticAberration.unity +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/Assets/Scenes/071_ChromaticAberration.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 9 + serializedVersion: 10 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -38,13 +38,12 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 + serializedVersion: 13 + m_BakeOnSceneLoad: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -161,13 +160,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 255570693} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &896969948 GameObject: @@ -204,6 +203,11 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -225,9 +229,11 @@ MeshRenderer: m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_MaskInteraction: 0 m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &896969950 MeshFilter: @@ -244,60 +250,14 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 896969948} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1271118584 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1271118585} - - component: {fileID: 1271118586} - m_Layer: 0 - m_Name: Resolution setter - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1271118585 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1271118584} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1271118586 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1271118584} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3b7a791aa4ee448a7a269341301b2063, type: 3} - m_Name: - m_EditorClassIdentifier: - customResolutionSettings: {fileID: 11400000, guid: edb26acb1cd7e47baa34647cef262829, - type: 2} --- !u!1 &1340572837 GameObject: m_ObjectHideFlags: 0 @@ -328,6 +288,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: qualityLevelIndex: 0 + callbacks: [] --- !u!4 &1340572839 Transform: m_ObjectHideFlags: 0 @@ -335,13 +296,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1340572837} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1598565826 GameObject: @@ -392,19 +353,20 @@ MonoBehaviour: m_Dithering: 0 m_ClearDepth: 1 m_AllowXRRendering: 1 + m_AllowHDROutput: 1 m_UseScreenCoordOverride: 0 m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} m_RequiresDepthTexture: 0 m_RequiresColorTexture: 0 - m_Version: 2 m_TaaSettings: - quality: 3 - frameInfluence: 0.1 - jitterScale: 1 - mipBias: 0 - varianceClampScale: 0.9 - contrastAdaptiveSharpening: 0 + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 + m_Version: 2 --- !u!114 &1598565828 MonoBehaviour: m_ObjectHideFlags: 0 @@ -420,6 +382,7 @@ MonoBehaviour: ImageComparisonSettings: TargetWidth: 256 TargetHeight: 256 + TargetMSAASamples: 1 PerPixelCorrectnessThreshold: 0.005 PerPixelGammaThreshold: 0.003921569 PerPixelAlphaThreshold: 0.003921569 @@ -428,12 +391,14 @@ MonoBehaviour: IncorrectPixelsThreshold: 0.0000038146973 UseHDR: 0 UseBackBuffer: 0 - ImageResolution: 0 ActiveImageTests: 1 ActivePixelTests: 7 WaitFrames: 0 XRCompatible: 1 + gpuDrivenCompatible: 1 CheckMemoryAllocation: 1 + renderBackendCompatibility: 2 + SetBackBufferResolution: 0 --- !u!20 &1598565829 Camera: m_ObjectHideFlags: 0 @@ -492,11 +457,19 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1598565826} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -1} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1340572839} + - {fileID: 1598565830} + - {fileID: 255570695} + - {fileID: 896969951} diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/Assets/Scenes/375_HDROutput_UpscalingFilters/375_URP_Asset_HDROutput_FSR.asset b/Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/Assets/Scenes/375_HDROutput_UpscalingFilters/375_URP_Asset_HDROutput_FSR.asset index 10730a3107a..f2db22e24ab 100644 --- a/Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/Assets/Scenes/375_HDROutput_UpscalingFilters/375_URP_Asset_HDROutput_FSR.asset +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/Assets/Scenes/375_HDROutput_UpscalingFilters/375_URP_Asset_HDROutput_FSR.asset @@ -12,8 +12,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} m_Name: 375_URP_Asset_HDROutput_FSR m_EditorClassIdentifier: - k_AssetVersion: 12 - k_AssetPreviousVersion: 12 + k_AssetVersion: 13 + k_AssetPreviousVersion: 13 m_RendererType: 1 m_RendererData: {fileID: 0} m_RendererDataList: @@ -53,6 +53,7 @@ MonoBehaviour: m_AdditionalLightsShadowResolutionTierHigh: 512 m_ReflectionProbeBlending: 0 m_ReflectionProbeBoxProjection: 0 + m_ReflectionProbeAtlas: 1 m_ShadowDistance: 50 m_ShadowCascadeCount: 1 m_Cascade2Split: 0.25 @@ -127,8 +128,14 @@ MonoBehaviour: m_PrefilterSoftShadowsQualityHigh: 1 m_PrefilterSoftShadows: 0 m_PrefilterScreenCoord: 0 + m_PrefilterScreenSpaceIrradiance: 0 m_PrefilterNativeRenderPass: 1 m_PrefilterUseLegacyLightmaps: 0 + m_PrefilterBicubicLightmapSampling: 0 + m_PrefilterReflectionProbeRotation: 0 + m_PrefilterReflectionProbeBlending: 0 + m_PrefilterReflectionProbeBoxProjection: 0 + m_PrefilterReflectionProbeAtlas: 0 m_ShaderVariantLogLevel: 0 m_ShadowCascades: 0 m_Textures: diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/ProjectSettings/ProjectSettings.asset b/Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/ProjectSettings/ProjectSettings.asset index a80fa8c57a2..5b31cc09567 100644 --- a/Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/ProjectSettings/ProjectSettings.asset +++ b/Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/ProjectSettings/ProjectSettings.asset @@ -43,8 +43,8 @@ PlayerSettings: m_VirtualRealitySplashScreen: {fileID: 0} defaultScreenWidth: 1920 defaultScreenHeight: 1080 - defaultScreenWidthWeb: 960 - defaultScreenHeightWeb: 600 + defaultScreenWidthWeb: 1920 + defaultScreenHeightWeb: 1080 m_StereoRenderingPath: 1 m_ActiveColorSpace: 1 unsupportedMSAAFallback: 0 From 206a6b3c6ac6972d6c017e6db4ab3a096bd3e402 Mon Sep 17 00:00:00 2001 From: Alexey Orlov Date: Fri, 16 Jan 2026 22:38:20 +0000 Subject: [PATCH 30/43] [URP] fixed adaptive performance cascade count tweaking --- .../Runtime/UniversalRenderPipeline.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipeline.cs b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipeline.cs index f36585d239b..90a7f950542 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipeline.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipeline.cs @@ -2476,7 +2476,7 @@ static void ApplyAdaptivePerformance(ContextContainer frameData) shadowData.mainLightShadowmapHeight = (int)(shadowData.mainLightShadowmapHeight * MainLightShadowmapResolutionMultiplier); var MainLightShadowCascadesCountBias = AdaptivePerformance.AdaptivePerformanceRenderSettings.MainLightShadowCascadesCountBias; - shadowData.mainLightShadowCascadesCount = Mathf.Clamp(shadowData.mainLightShadowCascadesCount - MainLightShadowCascadesCountBias, 0, 4); + shadowData.mainLightShadowCascadesCount = Mathf.Clamp(shadowData.mainLightShadowCascadesCount - MainLightShadowCascadesCountBias, 1, 4); var shadowQualityIndex = AdaptivePerformance.AdaptivePerformanceRenderSettings.ShadowQualityBias; for (int i = 0; i < shadowQualityIndex; i++) From de3cf96a433a18062f410f014aa3eda76f22b58d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Chapelain?= Date: Sun, 18 Jan 2026 23:01:43 +0000 Subject: [PATCH 31/43] [SRP] Update blank hub template --- .../Assets/Settings/HDRP Balanced.asset | 44 +- .../Assets/Settings/HDRP High Fidelity.asset | 44 +- .../Assets/Settings/HDRP Performant.asset | 44 +- .../DefaultSettingsVolumeProfile.asset | 2566 +++++++++++++++-- .../HDRenderPipelineGlobalSettings.asset | 840 ++++-- .../CHANGELOG.md | 8 + .../ValidationExceptions.json | 2 +- .../package.json | 14 +- .../Packages/manifest.json | 11 +- .../Packages/packages-lock.json | 166 +- .../ProjectSettings/EditorBuildSettings.asset | 3 +- .../ProjectSettings/GraphicsSettings.asset | 4 +- .../ProjectSettings/ProjectVersion.txt | 4 +- .../ProjectSettings/TagManager.asset | 19 +- .../ProjectSettings/VFXManager.asset | 2 +- 15 files changed, 3059 insertions(+), 712 deletions(-) diff --git a/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRP Balanced.asset b/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRP Balanced.asset index 95011cb4bf7..4a7cff679c7 100644 --- a/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRP Balanced.asset +++ b/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRP Balanced.asset @@ -34,12 +34,11 @@ MonoBehaviour: supportWater: 0 waterSimulationResolution: 128 supportWaterExclusion: 0 - supportWaterDeformation: 0 - deformationAtlasSize: 512 - maximumDeformerCount: 64 - supportWaterFoam: 0 - foamAtlasSize: 512 - waterCPUSimulation: 0 + supportWaterDecals: 1 + waterDecalAtlasSize: 1024 + maximumWaterDecalCount: 48 + waterScriptInteractionsMode: 0 + waterFullCPUSimulation: 0 supportComputeThickness: 0 computeThicknessResolution: 1 computeThicknessLayerMask: @@ -166,9 +165,12 @@ MonoBehaviour: dynamicResolutionSettings: enabled: 0 useMipBias: 0 - advancedUpscalersByPriority: 0001 + advancedUpscalersByPriority: DLSSPerfQualitySetting: 0 DLSSInjectionPoint: 0 + TAAUInjectionPoint: 0 + STPInjectionPoint: 0 + defaultInjectionPoint: 2 DLSSUseOptimalSettings: 0 DLSSSharpness: 0 FSR2EnableSharpness: 0 @@ -186,6 +188,8 @@ MonoBehaviour: forcedPercentage: 100 lowResTransparencyMinimumThreshold: 0 rayTracingHalfResThreshold: 50 + lowResSSGIMinimumThreshold: 0 + lowResVolumetricCloudsMinimumThreshold: 50 enableDLSS: 0 lowresTransparentSettings: enabled: 1 @@ -210,6 +214,10 @@ MonoBehaviour: DoFResolution: 040000000200000002000000 DoFHighQualityFiltering: 000001 DoFPhysicallyBased: 000000 + AdaptiveSamplingWeight: + - 0.5 + - 0.75 + - 2 LimitManualRangeNearBlur: 000000 MotionBlurSampleCount: 04000000080000000c000000 BloomRes: 040000000200000002000000 @@ -263,10 +271,6 @@ MonoBehaviour: - 50 - 50 RTGIFullResolution: 000001 - RTGIClampValue: - - 0.5 - - 0.8 - - 1.5 RTGIRaySteps: 200000003000000040000000 RTGIDenoise: 010101 RTGIHalfResDenoise: 010000 @@ -287,10 +291,6 @@ MonoBehaviour: - 50 - 50 - 50 - RTRClampValue: - - 0.8 - - 1 - - 1.2 RTRFullResolution: 000001 RTRRayMaxIterations: 200000003000000040000000 RTRDenoise: 010101 @@ -312,7 +312,10 @@ MonoBehaviour: - 0.5 - 0.5 gpuResidentDrawerSettings: - mode: 0 + mode: 1 + smallMeshScreenPercentage: 0 + enableOcclusionCullingInCameras: 0 + useDepthPrepassForOccluders: 1 m_ObsoleteLightLayerName0: Light LayerDefault m_ObsoleteLightLayerName1: InteriorOnly m_ObsoleteLightLayerName2: ExteriorOnly @@ -347,7 +350,7 @@ MonoBehaviour: m_CompositorCustomVolumeComponentsList: m_InjectionPoint: 1 m_CustomPostProcessTypesAsString: [] - m_Version: 24 + m_Version: 25 m_ObsoleteFrameSettings: overrides: 0 enableShadow: 0 @@ -484,8 +487,7 @@ MonoBehaviour: enableBigTilePrepass: 0 isFptlEnabled: 0 m_ObsoleteDefaultVolumeProfile: {fileID: 0} - m_ObsoleteDefaultLookDevProfile: {fileID: 11400000, guid: 254c4fe87beb7be4fa72e1681edbed02, - type: 2} + m_ObsoleteDefaultLookDevProfile: {fileID: 11400000, guid: 254c4fe87beb7be4fa72e1681edbed02, type: 2} m_ObsoleteFrameSettingsMovedToDefaultSettings: bitDatas: data1: 140666621263709 @@ -534,9 +536,6 @@ MonoBehaviour: sssCustomDownsampleSteps: 0 msaaMode: 0 materialQuality: 0 - m_ObsoleteRenderPipelineResources: {fileID: 11400000, guid: 3ce144cff5783da45aa5d4fdc2da14b7, - type: 2} - m_ObsoleteRenderPipelineRayTracingResources: {fileID: 0} m_ObsoleteBeforeTransparentCustomPostProcesses: [] m_ObsoleteBeforePostProcessCustomPostProcesses: [] m_ObsoleteAfterPostProcessCustomPostProcesses: [] @@ -548,3 +547,4 @@ MonoBehaviour: - {fileID: 0} - {fileID: 11400000, guid: 2b7005ba3a4d8474b8cdc34141ad766e, type: 2} - {fileID: 0} + m_PrefilterUseLegacyLightmaps: 0 diff --git a/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRP High Fidelity.asset b/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRP High Fidelity.asset index dd1ba0fb08c..72b2942499d 100644 --- a/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRP High Fidelity.asset +++ b/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRP High Fidelity.asset @@ -34,12 +34,11 @@ MonoBehaviour: supportWater: 0 waterSimulationResolution: 128 supportWaterExclusion: 0 - supportWaterDeformation: 0 - deformationAtlasSize: 512 - maximumDeformerCount: 64 - supportWaterFoam: 0 - foamAtlasSize: 512 - waterCPUSimulation: 0 + supportWaterDecals: 1 + waterDecalAtlasSize: 1024 + maximumWaterDecalCount: 48 + waterScriptInteractionsMode: 0 + waterFullCPUSimulation: 0 supportComputeThickness: 0 computeThicknessResolution: 1 computeThicknessLayerMask: @@ -166,9 +165,12 @@ MonoBehaviour: dynamicResolutionSettings: enabled: 0 useMipBias: 0 - advancedUpscalersByPriority: 0001 + advancedUpscalersByPriority: DLSSPerfQualitySetting: 0 DLSSInjectionPoint: 0 + TAAUInjectionPoint: 0 + STPInjectionPoint: 0 + defaultInjectionPoint: 2 DLSSUseOptimalSettings: 0 DLSSSharpness: 0 FSR2EnableSharpness: 0 @@ -186,6 +188,8 @@ MonoBehaviour: forcedPercentage: 100 lowResTransparencyMinimumThreshold: 0 rayTracingHalfResThreshold: 50 + lowResSSGIMinimumThreshold: 0 + lowResVolumetricCloudsMinimumThreshold: 50 enableDLSS: 0 lowresTransparentSettings: enabled: 1 @@ -210,6 +214,10 @@ MonoBehaviour: DoFResolution: 040000000200000001000000 DoFHighQualityFiltering: 000101 DoFPhysicallyBased: 000000 + AdaptiveSamplingWeight: + - 0.5 + - 0.75 + - 2 LimitManualRangeNearBlur: 000000 MotionBlurSampleCount: 04000000080000000c000000 BloomRes: 040000000200000002000000 @@ -263,10 +271,6 @@ MonoBehaviour: - 50 - 50 RTGIFullResolution: 000001 - RTGIClampValue: - - 0.5 - - 0.8 - - 1.5 RTGIRaySteps: 200000003000000040000000 RTGIDenoise: 010101 RTGIHalfResDenoise: 010000 @@ -287,10 +291,6 @@ MonoBehaviour: - 50 - 50 - 50 - RTRClampValue: - - 0.8 - - 1 - - 1.2 RTRFullResolution: 000001 RTRRayMaxIterations: 200000003000000040000000 RTRDenoise: 010101 @@ -312,7 +312,10 @@ MonoBehaviour: - 0.5 - 0.5 gpuResidentDrawerSettings: - mode: 0 + mode: 1 + smallMeshScreenPercentage: 0 + enableOcclusionCullingInCameras: 0 + useDepthPrepassForOccluders: 1 m_ObsoleteLightLayerName0: Light LayerDefault m_ObsoleteLightLayerName1: InteriorOnly m_ObsoleteLightLayerName2: ExteriorOnly @@ -347,7 +350,7 @@ MonoBehaviour: m_CompositorCustomVolumeComponentsList: m_InjectionPoint: 1 m_CustomPostProcessTypesAsString: [] - m_Version: 24 + m_Version: 25 m_ObsoleteFrameSettings: overrides: 0 enableShadow: 0 @@ -484,8 +487,7 @@ MonoBehaviour: enableBigTilePrepass: 0 isFptlEnabled: 0 m_ObsoleteDefaultVolumeProfile: {fileID: 0} - m_ObsoleteDefaultLookDevProfile: {fileID: 11400000, guid: 254c4fe87beb7be4fa72e1681edbed02, - type: 2} + m_ObsoleteDefaultLookDevProfile: {fileID: 11400000, guid: 254c4fe87beb7be4fa72e1681edbed02, type: 2} m_ObsoleteFrameSettingsMovedToDefaultSettings: bitDatas: data1: 140666621394781 @@ -534,9 +536,6 @@ MonoBehaviour: sssCustomDownsampleSteps: 0 msaaMode: 0 materialQuality: 0 - m_ObsoleteRenderPipelineResources: {fileID: 11400000, guid: 3ce144cff5783da45aa5d4fdc2da14b7, - type: 2} - m_ObsoleteRenderPipelineRayTracingResources: {fileID: 0} m_ObsoleteBeforeTransparentCustomPostProcesses: [] m_ObsoleteBeforePostProcessCustomPostProcesses: [] m_ObsoleteAfterPostProcessCustomPostProcesses: [] @@ -546,3 +545,4 @@ MonoBehaviour: m_ObsoleteDiffusionProfileSettingsList: - {fileID: 0} - {fileID: 0} + m_PrefilterUseLegacyLightmaps: 0 diff --git a/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRP Performant.asset b/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRP Performant.asset index c784b23c107..1f66468b2f2 100644 --- a/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRP Performant.asset +++ b/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRP Performant.asset @@ -34,12 +34,11 @@ MonoBehaviour: supportWater: 0 waterSimulationResolution: 128 supportWaterExclusion: 0 - supportWaterDeformation: 0 - deformationAtlasSize: 512 - maximumDeformerCount: 64 - supportWaterFoam: 0 - foamAtlasSize: 512 - waterCPUSimulation: 0 + supportWaterDecals: 1 + waterDecalAtlasSize: 1024 + maximumWaterDecalCount: 48 + waterScriptInteractionsMode: 0 + waterFullCPUSimulation: 0 supportComputeThickness: 0 computeThicknessResolution: 1 computeThicknessLayerMask: @@ -166,9 +165,12 @@ MonoBehaviour: dynamicResolutionSettings: enabled: 0 useMipBias: 0 - advancedUpscalersByPriority: 0001 + advancedUpscalersByPriority: DLSSPerfQualitySetting: 0 DLSSInjectionPoint: 0 + TAAUInjectionPoint: 0 + STPInjectionPoint: 0 + defaultInjectionPoint: 2 DLSSUseOptimalSettings: 0 DLSSSharpness: 0 FSR2EnableSharpness: 0 @@ -186,6 +188,8 @@ MonoBehaviour: forcedPercentage: 100 lowResTransparencyMinimumThreshold: 0 rayTracingHalfResThreshold: 50 + lowResSSGIMinimumThreshold: 0 + lowResVolumetricCloudsMinimumThreshold: 50 enableDLSS: 0 lowresTransparentSettings: enabled: 1 @@ -210,6 +214,10 @@ MonoBehaviour: DoFResolution: 040000000400000002000000 DoFHighQualityFiltering: 000100 DoFPhysicallyBased: 000000 + AdaptiveSamplingWeight: + - 0.5 + - 0.75 + - 2 LimitManualRangeNearBlur: 000000 MotionBlurSampleCount: 04000000080000000c000000 BloomRes: 040000000200000002000000 @@ -263,10 +271,6 @@ MonoBehaviour: - 50 - 50 RTGIFullResolution: 000001 - RTGIClampValue: - - 0.5 - - 0.8 - - 1.5 RTGIRaySteps: 200000003000000040000000 RTGIDenoise: 010101 RTGIHalfResDenoise: 010000 @@ -287,10 +291,6 @@ MonoBehaviour: - 50 - 50 - 50 - RTRClampValue: - - 0.8 - - 1 - - 1.2 RTRFullResolution: 000001 RTRRayMaxIterations: 200000003000000040000000 RTRDenoise: 010101 @@ -312,7 +312,10 @@ MonoBehaviour: - 0.5 - 0.5 gpuResidentDrawerSettings: - mode: 0 + mode: 1 + smallMeshScreenPercentage: 0 + enableOcclusionCullingInCameras: 0 + useDepthPrepassForOccluders: 1 m_ObsoleteLightLayerName0: Light LayerDefault m_ObsoleteLightLayerName1: InteriorOnly m_ObsoleteLightLayerName2: ExteriorOnly @@ -347,7 +350,7 @@ MonoBehaviour: m_CompositorCustomVolumeComponentsList: m_InjectionPoint: 1 m_CustomPostProcessTypesAsString: [] - m_Version: 24 + m_Version: 25 m_ObsoleteFrameSettings: overrides: 0 enableShadow: 0 @@ -484,8 +487,7 @@ MonoBehaviour: enableBigTilePrepass: 0 isFptlEnabled: 0 m_ObsoleteDefaultVolumeProfile: {fileID: 0} - m_ObsoleteDefaultLookDevProfile: {fileID: 11400000, guid: 254c4fe87beb7be4fa72e1681edbed02, - type: 2} + m_ObsoleteDefaultLookDevProfile: {fileID: 11400000, guid: 254c4fe87beb7be4fa72e1681edbed02, type: 2} m_ObsoleteFrameSettingsMovedToDefaultSettings: bitDatas: data1: 140666621394781 @@ -534,9 +536,6 @@ MonoBehaviour: sssCustomDownsampleSteps: 0 msaaMode: 0 materialQuality: 0 - m_ObsoleteRenderPipelineResources: {fileID: 11400000, guid: 3ce144cff5783da45aa5d4fdc2da14b7, - type: 2} - m_ObsoleteRenderPipelineRayTracingResources: {fileID: 0} m_ObsoleteBeforeTransparentCustomPostProcesses: [] m_ObsoleteBeforePostProcessCustomPostProcesses: [] m_ObsoleteAfterPostProcessCustomPostProcesses: [] @@ -547,3 +546,4 @@ MonoBehaviour: - {fileID: 0} - {fileID: 0} - {fileID: 11400000, guid: 2b7005ba3a4d8474b8cdc34141ad766e, type: 2} + m_PrefilterUseLegacyLightmaps: 0 diff --git a/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRPDefaultResources/DefaultSettingsVolumeProfile.asset b/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRPDefaultResources/DefaultSettingsVolumeProfile.asset index 9f8b75d3313..fe639708fb7 100644 --- a/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRPDefaultResources/DefaultSettingsVolumeProfile.asset +++ b/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRPDefaultResources/DefaultSettingsVolumeProfile.asset @@ -1,5 +1,151 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!114 &-9104609640622649459 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a81bcacc415a1f743bfdf703afc52027, type: 3} + m_Name: GradientSky + m_EditorClassIdentifier: + active: 1 + rotation: + m_OverrideState: 1 + m_Value: 0 + skyIntensityMode: + m_OverrideState: 1 + m_Value: 0 + exposure: + m_OverrideState: 1 + m_Value: 0 + multiplier: + m_OverrideState: 1 + m_Value: 1 + upperHemisphereLuxValue: + m_OverrideState: 1 + m_Value: 1 + upperHemisphereLuxColor: + m_OverrideState: 1 + m_Value: {x: 0, y: 0, z: 0} + desiredLuxValue: + m_OverrideState: 1 + m_Value: 20000 + updateMode: + m_OverrideState: 1 + m_Value: 0 + updatePeriod: + m_OverrideState: 1 + m_Value: 0 + includeSunInBaking: + m_OverrideState: 1 + m_Value: 0 + top: + m_OverrideState: 1 + m_Value: {r: 0, g: 0, b: 1, a: 1} + middle: + m_OverrideState: 1 + m_Value: {r: 0.3, g: 0.7, b: 1, a: 1} + bottom: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + gradientDiffusion: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &-8673292173027971274 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 953beb541740ddc499d005ee80c9ff29, type: 3} + m_Name: Fog + m_EditorClassIdentifier: + active: 1 + quality: + m_OverrideState: 1 + m_Value: 1 + enabled: + m_OverrideState: 1 + m_Value: 0 + colorMode: + m_OverrideState: 1 + m_Value: 1 + color: + m_OverrideState: 1 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + tint: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + maxFogDistance: + m_OverrideState: 1 + m_Value: 5000 + mipFogMaxMip: + m_OverrideState: 1 + m_Value: 0.5 + mipFogNear: + m_OverrideState: 1 + m_Value: 0 + mipFogFar: + m_OverrideState: 1 + m_Value: 1000 + baseHeight: + m_OverrideState: 1 + m_Value: 0 + maximumHeight: + m_OverrideState: 1 + m_Value: 50 + meanFreePath: + m_OverrideState: 1 + m_Value: 400 + enableVolumetricFog: + m_OverrideState: 1 + m_Value: 0 + albedo: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + globalLightProbeDimmer: + m_OverrideState: 1 + m_Value: 1 + depthExtent: + m_OverrideState: 1 + m_Value: 64 + denoisingMode: + m_OverrideState: 1 + m_Value: 2 + anisotropy: + m_OverrideState: 1 + m_Value: 0 + sliceDistributionUniformity: + m_OverrideState: 1 + m_Value: 0.75 + multipleScatteringIntensity: + m_OverrideState: 1 + m_Value: 0 + m_FogControlMode: + m_OverrideState: 1 + m_Value: 0 + screenResolutionPercentage: + m_OverrideState: 1 + m_Value: 12.5 + volumeSliceCount: + m_OverrideState: 1 + m_Value: 64 + m_VolumetricFogBudget: + m_OverrideState: 1 + m_Value: 0.5 + m_ResolutionDepthRatio: + m_OverrideState: 1 + m_Value: 0.5 + directionalLightsOnly: + m_OverrideState: 1 + m_Value: 0 --- !u!114 &-8500501345142028434 MonoBehaviour: m_ObjectHideFlags: 3 @@ -18,7 +164,126 @@ MonoBehaviour: m_Value: - {fileID: 11400000, guid: 404820c4cf36ad944862fa59c56064f0, type: 2} - {fileID: 11400000, guid: 2384dbf2c1c420f45a792fbc315fbfb1, type: 2} - - {fileID: 11400000, guid: 879ffae44eefa4412bb327928f1a96dd, type: 2} +--- !u!114 &-7906026556897207749 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 32b6af8f7ad32324cb6941c3290e5895, type: 3} + m_Name: MicroShadowing + m_EditorClassIdentifier: + active: 1 + enable: + m_OverrideState: 1 + m_Value: 0 + opacity: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &-7754084186003669714 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 42ef2681fa3dc8c4fa031f044e68c63f, type: 3} + m_Name: GlobalIllumination + m_EditorClassIdentifier: + active: 1 + quality: + m_OverrideState: 1 + m_Value: 1 + enable: + m_OverrideState: 1 + m_Value: 0 + tracing: + m_OverrideState: 1 + m_Value: 1 + rayMiss: + m_OverrideState: 1 + m_Value: 3 + adaptiveProbeVolumesLayerMask: + m_OverrideState: 1 + m_Value: + serializedVersion: 0 + m_Bits: 1 + depthBufferThickness: + m_OverrideState: 1 + m_Value: 0.1 + fullResolutionSS: + m_OverrideState: 1 + m_Value: 1 + m_MaxRaySteps: + m_OverrideState: 1 + m_Value: 64 + m_DenoiseSS: + m_OverrideState: 1 + m_Value: 1 + m_HalfResolutionDenoiserSS: + m_OverrideState: 1 + m_Value: 0 + m_DenoiserRadiusSS: + m_OverrideState: 1 + m_Value: 0.5 + m_SecondDenoiserPassSS: + m_OverrideState: 1 + m_Value: 1 + lastBounceFallbackHierarchy: + m_OverrideState: 1 + m_Value: 3 + ambientProbeDimmer: + m_OverrideState: 1 + m_Value: 0 + layerMask: + m_OverrideState: 1 + m_Value: + serializedVersion: 2 + m_Bits: 4294967295 + textureLodBias: + m_OverrideState: 1 + m_Value: 7 + m_RayLength: + m_OverrideState: 1 + m_Value: 50 + m_ClampValue: + m_OverrideState: 1 + m_Value: 100 + mode: + m_OverrideState: 1 + m_Value: 2 + m_FullResolution: + m_OverrideState: 1 + m_Value: 0 + sampleCount: + m_OverrideState: 1 + m_Value: 2 + bounceCount: + m_OverrideState: 1 + m_Value: 1 + m_Denoise: + m_OverrideState: 1 + m_Value: 1 + m_HalfResolutionDenoiser: + m_OverrideState: 1 + m_Value: 0 + m_DenoiserRadius: + m_OverrideState: 1 + m_Value: 0.6 + m_SecondDenoiserPass: + m_OverrideState: 1 + m_Value: 1 + m_MaxMixedRaySteps: + m_OverrideState: 1 + m_Value: 48 + receiverMotionRejection: + m_OverrideState: 1 + m_Value: 1 --- !u!114 &-7089757308646879465 MonoBehaviour: m_ObjectHideFlags: 3 @@ -39,33 +304,1241 @@ MonoBehaviour: m_OverrideState: 1 m_Value: 0.5 maximumVelocity: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 200 minimumVelocity: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 2 cameraMotionBlur: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 specialCameraClampMode: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 cameraVelocityClamp: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0.05 cameraTranslationVelocityClamp: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0.05 cameraRotationVelocityClamp: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0.03 depthComparisonExtent: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 m_SampleCount: m_OverrideState: 1 m_Value: 8 ---- !u!114 &-1016694868962581565 +--- !u!114 &-6752085778903549216 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 46a79c9cffef5cc469553b1341c2ecdf, type: 3} + m_Name: RecursiveRendering + m_EditorClassIdentifier: + active: 1 + enable: + m_OverrideState: 1 + m_Value: 0 + layerMask: + m_OverrideState: 1 + m_Value: + serializedVersion: 2 + m_Bits: 4294967295 + maxDepth: + m_OverrideState: 1 + m_Value: 4 + rayLength: + m_OverrideState: 1 + m_Value: 10 + minSmoothness: + m_OverrideState: 1 + m_Value: 0.5 + rayMiss: + m_OverrideState: 1 + m_Value: 3 + lastBounce: + m_OverrideState: 1 + m_Value: 3 + ambientProbeDimmer: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &-6697726957421049558 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2f1984a7ac01bf84b86559f7595cdc68, type: 3} + m_Name: LightCluster + m_EditorClassIdentifier: + active: 1 + cameraClusterRange: + m_OverrideState: 1 + m_Value: 10 +--- !u!114 &-6695746078338391763 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5e17fad69ea181b4483974138b566975, type: 3} + m_Name: ScreenSpaceRefraction + m_EditorClassIdentifier: + active: 1 + screenFadeDistance: + m_OverrideState: 1 + m_Value: 0.1 +--- !u!114 &-6540514111184067192 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0775cbb206825d541bf6c0297ee524ca, type: 3} + m_Name: SplitToning + m_EditorClassIdentifier: + active: 1 + shadows: + m_OverrideState: 1 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + highlights: + m_OverrideState: 1 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + balance: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &-5669340920799288205 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 598e2d32e2c7b0c418e030c3236d663a, type: 3} + m_Name: ChromaticAberration + m_EditorClassIdentifier: + active: 1 + quality: + m_OverrideState: 1 + m_Value: 1 + spectralLut: + m_OverrideState: 1 + m_Value: {fileID: 0} + intensity: + m_OverrideState: 1 + m_Value: 0 + m_MaxSamples: + m_OverrideState: 1 + m_Value: 6 +--- !u!114 &-4504623625339508525 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f034cba68ab55e046ae1445a42f18c0e, type: 3} + m_Name: IndirectLightingController + m_EditorClassIdentifier: + active: 1 + indirectDiffuseLightingMultiplier: + m_OverrideState: 1 + m_Value: 1 + indirectDiffuseLightingLayers: + m_OverrideState: 1 + m_Value: 65535 + reflectionLightingMultiplier: + m_OverrideState: 1 + m_Value: 1 + reflectionLightingLayers: + m_OverrideState: 1 + m_Value: 65535 + reflectionProbeIntensityMultiplier: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &-4137673254655318850 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: aaa3b8214f75b354e9ba2caadd022259, type: 3} + m_Name: DepthOfField + m_EditorClassIdentifier: + active: 1 + quality: + m_OverrideState: 1 + m_Value: 1 + focusMode: + m_OverrideState: 1 + m_Value: 0 + focusDistance: + m_OverrideState: 1 + m_Value: 10 + focusDistanceMode: + m_OverrideState: 1 + m_Value: 0 + nearFocusStart: + m_OverrideState: 1 + m_Value: 0 + nearFocusEnd: + m_OverrideState: 1 + m_Value: 4 + farFocusStart: + m_OverrideState: 1 + m_Value: 10 + farFocusEnd: + m_OverrideState: 1 + m_Value: 20 + m_NearSampleCount: + m_OverrideState: 1 + m_Value: 5 + m_NearMaxBlur: + m_OverrideState: 1 + m_Value: 4 + m_FarSampleCount: + m_OverrideState: 1 + m_Value: 7 + m_FarMaxBlur: + m_OverrideState: 1 + m_Value: 8 + m_Resolution: + m_OverrideState: 1 + m_Value: 2 + m_HighQualityFiltering: + m_OverrideState: 1 + m_Value: 1 + m_PhysicallyBased: + m_OverrideState: 1 + m_Value: 0 + m_AdaptiveSamplingWeight: + m_OverrideState: 1 + m_Value: 0.75 + m_LimitManualRangeNearBlur: + m_OverrideState: 1 + m_Value: 0 + coCStabilization: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &-3330317644286675642 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9c1bfcd0f0fa7b8468f281d6bbbaf320, type: 3} + m_Name: LensDistortion + m_EditorClassIdentifier: + active: 1 + intensity: + m_OverrideState: 1 + m_Value: 0 + xMultiplier: + m_OverrideState: 1 + m_Value: 1 + yMultiplier: + m_OverrideState: 1 + m_Value: 1 + center: + m_OverrideState: 1 + m_Value: {x: 0.5, y: 0.5} + scale: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &-1948486662955970935 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5a6b00fcf518bb94a90b408492e07b44, type: 3} + m_Name: FilmGrain + m_EditorClassIdentifier: + active: 1 + type: + m_OverrideState: 1 + m_Value: 0 + intensity: + m_OverrideState: 1 + m_Value: 0 + response: + m_OverrideState: 1 + m_Value: 0.8 + texture: + m_OverrideState: 1 + m_Value: {fileID: 0} +--- !u!114 &-1016694868962581565 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 56b145d2b9ee1ac4f846968484e7485a, type: 3} + m_Name: ContactShadows + m_EditorClassIdentifier: + active: 1 + quality: + m_OverrideState: 1 + m_Value: 1 + enable: + m_OverrideState: 1 + m_Value: 1 + length: + m_OverrideState: 1 + m_Value: 0.15 + opacity: + m_OverrideState: 1 + m_Value: 1 + distanceScaleFactor: + m_OverrideState: 1 + m_Value: 0.5 + maxDistance: + m_OverrideState: 1 + m_Value: 50 + minDistance: + m_OverrideState: 1 + m_Value: 0 + fadeDistance: + m_OverrideState: 1 + m_Value: 5 + fadeInDistance: + m_OverrideState: 1 + m_Value: 0 + rayBias: + m_OverrideState: 1 + m_Value: 0.2 + thicknessScale: + m_OverrideState: 1 + m_Value: 0.15 + m_SampleCount: + m_OverrideState: 1 + m_Value: 10 +--- !u!114 &-808592539149273358 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 384c4d03a551c44448145f4093304119, type: 3} + m_Name: ScreenSpaceReflection + m_EditorClassIdentifier: + active: 1 + quality: + m_OverrideState: 1 + m_Value: 1 + enabled: + m_OverrideState: 1 + m_Value: 1 + enabledTransparent: + m_OverrideState: 1 + m_Value: 1 + tracing: + m_OverrideState: 1 + m_Value: 1 + m_MinSmoothness: + m_OverrideState: 1 + m_Value: 0.9 + m_SmoothnessFadeStart: + m_OverrideState: 1 + m_Value: 0.9 + reflectSky: + m_OverrideState: 1 + m_Value: 1 + usedAlgorithm: + m_OverrideState: 1 + m_Value: 0 + depthBufferThickness: + m_OverrideState: 1 + m_Value: 0.01 + screenFadeDistance: + m_OverrideState: 1 + m_Value: 0.1 + accumulationFactor: + m_OverrideState: 1 + m_Value: 0.75 + biasFactor: + m_OverrideState: 1 + m_Value: 0.5 + speedRejectionParam: + m_OverrideState: 1 + m_Value: 0.5 + speedRejectionScalerFactor: + m_OverrideState: 1 + m_Value: 0.2 + speedSmoothReject: + m_OverrideState: 1 + m_Value: 0 + speedSurfaceOnly: + m_OverrideState: 1 + m_Value: 1 + speedTargetOnly: + m_OverrideState: 1 + m_Value: 1 + enableWorldSpeedRejection: + m_OverrideState: 1 + m_Value: 0 + m_RayMaxIterations: + m_OverrideState: 1 + m_Value: 32 + rayMiss: + m_OverrideState: 1 + m_Value: 3 + lastBounceFallbackHierarchy: + m_OverrideState: 1 + m_Value: 3 + ambientProbeDimmer: + m_OverrideState: 1 + m_Value: 1 + layerMask: + m_OverrideState: 1 + m_Value: + serializedVersion: 2 + m_Bits: 4294967295 + textureLodBias: + m_OverrideState: 1 + m_Value: 1 + m_RayLength: + m_OverrideState: 1 + m_Value: 50 + m_ClampValue: + m_OverrideState: 1 + m_Value: 100 + m_Denoise: + m_OverrideState: 1 + m_Value: 1 + m_DenoiserRadius: + m_OverrideState: 1 + m_Value: 0.75 + m_DenoiserAntiFlickeringStrength: + m_OverrideState: 1 + m_Value: 1 + mode: + m_OverrideState: 1 + m_Value: 2 + m_FullResolution: + m_OverrideState: 1 + m_Value: 0 + sampleCount: + m_OverrideState: 1 + m_Value: 1 + bounceCount: + m_OverrideState: 1 + m_Value: 1 + m_RayMaxIterationsRT: + m_OverrideState: 1 + m_Value: 48 +--- !u!114 &-758833350353230868 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 15cc4c5fcb677014ebdc0d8be227b40c, type: 3} + m_Name: ScreenSpaceLensFlare + m_EditorClassIdentifier: + active: 1 + intensity: + m_OverrideState: 1 + m_Value: 0 + tintColor: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + bloomMip: + m_OverrideState: 1 + m_Value: 1 + firstFlareIntensity: + m_OverrideState: 1 + m_Value: 1 + secondaryFlareIntensity: + m_OverrideState: 1 + m_Value: 1 + warpedFlareIntensity: + m_OverrideState: 1 + m_Value: 1 + warpedFlareScale: + m_OverrideState: 1 + m_Value: {x: 1, y: 1} + samples: + m_OverrideState: 1 + m_Value: 1 + sampleDimmer: + m_OverrideState: 1 + m_Value: 0.5 + vignetteEffect: + m_OverrideState: 1 + m_Value: 1 + startingPosition: + m_OverrideState: 1 + m_Value: 1.25 + scale: + m_OverrideState: 1 + m_Value: 1.5 + streaksIntensity: + m_OverrideState: 1 + m_Value: 1 + streaksLength: + m_OverrideState: 1 + m_Value: 0.5 + streaksOrientation: + m_OverrideState: 1 + m_Value: 0 + streaksThreshold: + m_OverrideState: 1 + m_Value: 0.25 + resolution: + m_OverrideState: 1 + m_Value: 4 + spectralLut: + m_OverrideState: 1 + m_Value: {fileID: 0} + chromaticAbberationIntensity: + m_OverrideState: 1 + m_Value: 0.5 + chromaticAbberationSampleCount: + m_OverrideState: 1 + m_Value: 3 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} + m_Name: DefaultSettingsVolumeProfile + m_EditorClassIdentifier: + components: + - {fileID: 7686318427622180703} + - {fileID: -1016694868962581565} + - {fileID: 7502528774814404555} + - {fileID: 7542669330009093999} + - {fileID: 1501199423866068322} + - {fileID: 5315503232242033309} + - {fileID: 1932259527246508038} + - {fileID: 448115243408767295} + - {fileID: -7089757308646879465} + - {fileID: -8500501345142028434} + - {fileID: 2097231660816403494} + - {fileID: 3837628616732854212} + - {fileID: -7906026556897207749} + - {fileID: 5395333384281200431} + - {fileID: 2448651888755449528} + - {fileID: 5746433847734208960} + - {fileID: 3812076518312470650} + - {fileID: -4137673254655318850} + - {fileID: -808592539149273358} + - {fileID: 2061917649211073148} + - {fileID: 5187653951205467227} + - {fileID: 8974852522407309507} + - {fileID: -6697726957421049558} + - {fileID: -8673292173027971274} + - {fileID: -9104609640622649459} + - {fileID: -1948486662955970935} + - {fileID: 6627875414090041873} + - {fileID: 2407554452416097951} + - {fileID: 3555326013918735343} + - {fileID: -7754084186003669714} + - {fileID: -758833350353230868} + - {fileID: 8045328965405427507} + - {fileID: 761249601646457412} + - {fileID: 3191268899089827885} + - {fileID: -5669340920799288205} + - {fileID: -6695746078338391763} + - {fileID: -4504623625339508525} + - {fileID: -6752085778903549216} + - {fileID: -3330317644286675642} + - {fileID: 1918101770842916632} + - {fileID: -6540514111184067192} + - {fileID: 2044197306030878128} +--- !u!114 &448115243408767295 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59b6606ef2548734bb6d11b9d160bc7e, type: 3} + m_Name: HDRISky + m_EditorClassIdentifier: + active: 1 + rotation: + m_OverrideState: 1 + m_Value: 0 + skyIntensityMode: + m_OverrideState: 1 + m_Value: 0 + exposure: + m_OverrideState: 1 + m_Value: 11 + multiplier: + m_OverrideState: 1 + m_Value: 1 + upperHemisphereLuxValue: + m_OverrideState: 1 + m_Value: 0.4660715 + upperHemisphereLuxColor: + m_OverrideState: 1 + m_Value: {x: 0.18750614, y: 0.29181972, z: 0.5} + desiredLuxValue: + m_OverrideState: 1 + m_Value: 20000 + updateMode: + m_OverrideState: 1 + m_Value: 0 + updatePeriod: + m_OverrideState: 1 + m_Value: 0 + includeSunInBaking: + m_OverrideState: 1 + m_Value: 0 + hdriSky: + m_OverrideState: 1 + m_Value: {fileID: 8900000, guid: 8253d41e6e8b11a4cbe77a4f8f82934d, type: 3} + distortionMode: + m_OverrideState: 1 + m_Value: 0 + flowmap: + m_OverrideState: 1 + m_Value: {fileID: 0} + upperHemisphereOnly: + m_OverrideState: 1 + m_Value: 1 + scrollOrientation: + m_OverrideState: 1 + m_Value: + mode: 1 + customValue: 0 + additiveValue: 0 + multiplyValue: 1 + scrollSpeed: + m_OverrideState: 1 + m_Value: + mode: 1 + customValue: 100 + additiveValue: 0 + multiplyValue: 1 + sunInitialRotation: + m_OverrideState: 1 + m_Value: -Infinity + lockSun: + m_OverrideState: 1 + m_Value: 0 + enableBackplate: + m_OverrideState: 1 + m_Value: 0 + backplateType: + m_OverrideState: 1 + m_Value: 0 + groundLevel: + m_OverrideState: 1 + m_Value: 0 + scale: + m_OverrideState: 1 + m_Value: {x: 32, y: 32} + projectionDistance: + m_OverrideState: 1 + m_Value: 16 + plateRotation: + m_OverrideState: 1 + m_Value: 0 + plateTexRotation: + m_OverrideState: 1 + m_Value: 0 + plateTexOffset: + m_OverrideState: 1 + m_Value: {x: 0, y: 0} + blendAmount: + m_OverrideState: 1 + m_Value: 0 + shadowTint: + m_OverrideState: 1 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + pointLightShadow: + m_OverrideState: 1 + m_Value: 0 + dirLightShadow: + m_OverrideState: 1 + m_Value: 0 + rectLightShadow: + m_OverrideState: 1 + m_Value: 0 + m_SkyVersion: 1 + enableDistortion: + m_OverrideState: 1 + m_Value: 0 + procedural: + m_OverrideState: 1 + m_Value: 1 + scrollDirection: + m_OverrideState: 1 + m_Value: 0 + m_ObsoleteScrollSpeed: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &761249601646457412 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4b8bcdf71d7fafa419fca1ed162f5fc9, type: 3} + m_Name: ColorAdjustments + m_EditorClassIdentifier: + active: 1 + postExposure: + m_OverrideState: 1 + m_Value: 0 + contrast: + m_OverrideState: 1 + m_Value: 0 + colorFilter: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + hueShift: + m_OverrideState: 1 + m_Value: 0 + saturation: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &1501199423866068322 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 24f077503be6ae942a1e1245dbd53ea9, type: 3} + m_Name: Bloom + m_EditorClassIdentifier: + active: 1 + quality: + m_OverrideState: 1 + m_Value: 1 + threshold: + m_OverrideState: 1 + m_Value: 0 + intensity: + m_OverrideState: 1 + m_Value: 0.2 + scatter: + m_OverrideState: 1 + m_Value: 0.7 + tint: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + dirtTexture: + m_OverrideState: 1 + m_Value: {fileID: 0} + dirtIntensity: + m_OverrideState: 1 + m_Value: 0 + anamorphic: + m_OverrideState: 1 + m_Value: 1 + m_Resolution: + m_OverrideState: 1 + m_Value: 2 + m_HighQualityPrefiltering: + m_OverrideState: 1 + m_Value: 0 + m_HighQualityFiltering: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &1918101770842916632 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4b709909182ba0943abef2c49ed59205, type: 3} + m_Name: PaniniProjection + m_EditorClassIdentifier: + active: 1 + distance: + m_OverrideState: 1 + m_Value: 0 + cropToFit: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &1932259527246508038 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0d7593b3a9277ac4696b20006c21dde2, type: 3} + m_Name: VisualEnvironment + m_EditorClassIdentifier: + active: 1 + skyType: + m_OverrideState: 1 + m_Value: 1 + cloudType: + m_OverrideState: 1 + m_Value: 0 + skyAmbientMode: + m_OverrideState: 1 + m_Value: 1 + planetRadius: + m_OverrideState: 1 + m_Value: 6378.1 + renderingSpace: + m_OverrideState: 1 + m_Value: 1 + centerMode: + m_OverrideState: 1 + m_Value: 0 + planetCenter: + m_OverrideState: 1 + m_Value: {x: 0, y: -6378.1, z: 0} + windOrientation: + m_OverrideState: 1 + m_Value: 0 + windSpeed: + m_OverrideState: 1 + m_Value: 0 + fogType: + m_OverrideState: 1 + m_Value: 0 + m_Version: 1 +--- !u!114 &2044197306030878128 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6bd486065ce11414fa40e631affc4900, type: 3} + m_Name: ProbeVolumesOptions + m_EditorClassIdentifier: + active: 1 + normalBias: + m_OverrideState: 1 + m_Value: 0.05 + viewBias: + m_OverrideState: 1 + m_Value: 0.1 + scaleBiasWithMinProbeDistance: + m_OverrideState: 1 + m_Value: 0 + samplingNoise: + m_OverrideState: 1 + m_Value: 0.1 + animateSamplingNoise: + m_OverrideState: 1 + m_Value: 1 + leakReductionMode: + m_OverrideState: 1 + m_Value: 2 + minValidDotProductValue: + m_OverrideState: 1 + m_Value: 0.1 + occlusionOnlyReflectionNormalization: + m_OverrideState: 1 + m_Value: 1 + intensityMultiplier: + m_OverrideState: 1 + m_Value: 1 + skyOcclusionIntensityMultiplier: + m_OverrideState: 1 + m_Value: 1 + worldOffset: + m_OverrideState: 1 + m_Value: {x: 0, y: 0, z: 0} +--- !u!114 &2061917649211073148 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7e9e4ed5a6f56fb4ebd693e39684f36f, type: 3} + m_Name: VolumetricClouds + m_EditorClassIdentifier: + active: 1 + enable: + m_OverrideState: 1 + m_Value: 0 + cloudTiling: + m_OverrideState: 1 + m_Value: {x: 1, y: 1} + cloudOffset: + m_OverrideState: 1 + m_Value: {x: 0, y: 0} + bottomAltitude: + m_OverrideState: 1 + m_Value: 1200 + altitudeRange: + m_OverrideState: 1 + m_Value: 2000 + fadeInMode: + m_OverrideState: 1 + m_Value: 0 + fadeInStart: + m_OverrideState: 1 + m_Value: 0 + fadeInDistance: + m_OverrideState: 1 + m_Value: 0 + numPrimarySteps: + m_OverrideState: 1 + m_Value: 64 + numLightSteps: + m_OverrideState: 1 + m_Value: 6 + cloudMap: + m_OverrideState: 1 + m_Value: {fileID: 0} + dimension: 2 + cloudLut: + m_OverrideState: 1 + m_Value: {fileID: 0} + dimension: 2 + cloudControl: + m_OverrideState: 1 + m_Value: 0 + cloudSimpleMode: + m_OverrideState: 1 + m_Value: 0 + m_CloudPreset: + m_OverrideState: 1 + m_Value: 1 + cumulusMap: + m_OverrideState: 1 + m_Value: {fileID: 0} + dimension: 2 + cumulusMapMultiplier: + m_OverrideState: 1 + m_Value: 1 + altoStratusMap: + m_OverrideState: 1 + m_Value: {fileID: 0} + dimension: 2 + altoStratusMapMultiplier: + m_OverrideState: 1 + m_Value: 1 + cumulonimbusMap: + m_OverrideState: 1 + m_Value: {fileID: 0} + dimension: 2 + cumulonimbusMapMultiplier: + m_OverrideState: 1 + m_Value: 1 + rainMap: + m_OverrideState: 1 + m_Value: {fileID: 0} + dimension: 2 + cloudMapResolution: + m_OverrideState: 1 + m_Value: 64 + densityCurve: + m_OverrideState: 1 + m_Value: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.15 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0.1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + erosionCurve: + m_OverrideState: 1 + m_Value: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.1 + value: 0.9 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + ambientOcclusionCurve: + m_OverrideState: 1 + m_Value: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.25 + value: 0.4 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + scatteringTint: + m_OverrideState: 1 + m_Value: {r: 0, g: 0, b: 0, a: 1} + powderEffectIntensity: + m_OverrideState: 1 + m_Value: 0.25 + multiScattering: + m_OverrideState: 1 + m_Value: 0.5 + densityMultiplier: + m_OverrideState: 1 + m_Value: 0.4 + shapeFactor: + m_OverrideState: 1 + m_Value: 0.9 + shapeScale: + m_OverrideState: 1 + m_Value: 5 + shapeOffset: + m_OverrideState: 1 + m_Value: {x: 0, y: 0, z: 0} + erosionFactor: + m_OverrideState: 1 + m_Value: 0.8 + erosionScale: + m_OverrideState: 1 + m_Value: 107 + erosionNoiseType: + m_OverrideState: 1 + m_Value: 1 + microErosion: + m_OverrideState: 1 + m_Value: 0 + microErosionFactor: + m_OverrideState: 1 + m_Value: 0.5 + microErosionScale: + m_OverrideState: 1 + m_Value: 200 + ambientLightProbeDimmer: + m_OverrideState: 1 + m_Value: 1 + sunLightDimmer: + m_OverrideState: 1 + m_Value: 1 + erosionOcclusion: + m_OverrideState: 1 + m_Value: 0.1 + globalWindSpeed: + m_OverrideState: 1 + m_Value: + mode: 1 + customValue: 100 + additiveValue: 0 + multiplyValue: 1 + orientation: + m_OverrideState: 1 + m_Value: + mode: 1 + customValue: 0 + additiveValue: 0 + multiplyValue: 1 + altitudeDistortion: + m_OverrideState: 1 + m_Value: 0.25 + cloudMapSpeedMultiplier: + m_OverrideState: 1 + m_Value: 0.5 + shapeSpeedMultiplier: + m_OverrideState: 1 + m_Value: 1 + erosionSpeedMultiplier: + m_OverrideState: 1 + m_Value: 0.25 + verticalShapeWindSpeed: + m_OverrideState: 1 + m_Value: 0 + verticalErosionWindSpeed: + m_OverrideState: 1 + m_Value: 0 + temporalAccumulationFactor: + m_OverrideState: 1 + m_Value: 0.95 + ghostingReduction: + m_OverrideState: 1 + m_Value: 1 + perceptualBlending: + m_OverrideState: 1 + m_Value: 1 + shadows: + m_OverrideState: 1 + m_Value: 0 + shadowResolution: + m_OverrideState: 1 + m_Value: 256 + shadowDistance: + m_OverrideState: 1 + m_Value: 8000 + shadowOpacity: + m_OverrideState: 1 + m_Value: 1 + shadowOpacityFallback: + m_OverrideState: 1 + m_Value: 0 + m_Version: 3 + localClouds: + m_OverrideState: 1 + m_Value: 0 + m_ObsoleteWindSpeed: + m_OverrideState: 1 + m_Value: 1 + m_ObsoleteOrientation: + m_OverrideState: 1 + m_Value: 0 + m_ObsoleteShapeOffsetX: + m_OverrideState: 1 + m_Value: 0 + m_ObsoleteShapeOffsetY: + m_OverrideState: 1 + m_Value: 0 + m_ObsoleteShapeOffsetZ: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &2097231660816403494 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a76fd08475e21554b8f284f723dd7cf8, type: 3} + m_Name: WaterRendering + m_EditorClassIdentifier: + active: 1 + enable: + m_OverrideState: 1 + m_Value: 1 + triangleSize: + m_OverrideState: 1 + m_Value: 30 + ambientProbeDimmer: + m_OverrideState: 1 + m_Value: 0.5 +--- !u!114 &2407554452416097951 MonoBehaviour: m_ObjectHideFlags: 3 m_CorrespondingSourceObject: {fileID: 0} @@ -74,71 +1547,60 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 56b145d2b9ee1ac4f846968484e7485a, type: 3} - m_Name: ContactShadows + m_Script: {fileID: 11500000, guid: da5ab44aadfb1804db5fd470983ac1b8, type: 3} + m_Name: LiftGammaGain m_EditorClassIdentifier: active: 1 - quality: - m_OverrideState: 0 - m_Value: 1 - enable: + lift: m_OverrideState: 1 - m_Value: 1 - length: - m_OverrideState: 0 - m_Value: 0.15 - opacity: - m_OverrideState: 0 - m_Value: 1 - distanceScaleFactor: - m_OverrideState: 0 - m_Value: 0.5 - maxDistance: - m_OverrideState: 0 - m_Value: 50 - minDistance: - m_OverrideState: 0 - m_Value: 0 - fadeDistance: - m_OverrideState: 0 - m_Value: 5 - fadeInDistance: - m_OverrideState: 0 - m_Value: 0 - rayBias: - m_OverrideState: 0 - m_Value: 0.2 - thicknessScale: - m_OverrideState: 0 - m_Value: 0.15 - m_SampleCount: - m_OverrideState: 0 - m_Value: 10 ---- !u!114 &11400000 + m_Value: {x: 1, y: 1, z: 1, w: 0} + gamma: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + gain: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} +--- !u!114 &2448651888755449528 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 3 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} - m_Name: DefaultSettingsVolumeProfile + m_Script: {fileID: 11500000, guid: 2c1be1b6c95cd2e41b27903b9270817f, type: 3} + m_Name: Vignette m_EditorClassIdentifier: - components: - - {fileID: 7686318427622180703} - - {fileID: -1016694868962581565} - - {fileID: 7502528774814404555} - - {fileID: 7542669330009093999} - - {fileID: 1501199423866068322} - - {fileID: 5315503232242033309} - - {fileID: 1932259527246508038} - - {fileID: 448115243408767295} - - {fileID: -7089757308646879465} - - {fileID: -8500501345142028434} - - {fileID: 2097231660816403494} ---- !u!114 &448115243408767295 + active: 1 + mode: + m_OverrideState: 1 + m_Value: 0 + color: + m_OverrideState: 1 + m_Value: {r: 0, g: 0, b: 0, a: 1} + center: + m_OverrideState: 1 + m_Value: {x: 0.5, y: 0.5} + intensity: + m_OverrideState: 1 + m_Value: 0 + smoothness: + m_OverrideState: 1 + m_Value: 0.2 + roundness: + m_OverrideState: 1 + m_Value: 1 + rounded: + m_OverrideState: 1 + m_Value: 0 + mask: + m_OverrideState: 1 + m_Value: {fileID: 0} + opacity: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &3191268899089827885 MonoBehaviour: m_ObjectHideFlags: 3 m_CorrespondingSourceObject: {fileID: 0} @@ -147,125 +1609,161 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 59b6606ef2548734bb6d11b9d160bc7e, type: 3} - m_Name: HDRISky + m_Script: {fileID: 11500000, guid: e88178bb13f64a54f90d6cd6ef7aa9a1, type: 3} + m_Name: CloudLayer m_EditorClassIdentifier: active: 1 - rotation: - m_OverrideState: 0 - m_Value: 0 - skyIntensityMode: - m_OverrideState: 0 - m_Value: 0 - exposure: + opacity: m_OverrideState: 1 - m_Value: 11 - multiplier: - m_OverrideState: 0 m_Value: 1 - upperHemisphereLuxValue: + upperHemisphereOnly: m_OverrideState: 1 - m_Value: 0.4660715 - upperHemisphereLuxColor: + m_Value: 1 + layers: m_OverrideState: 1 - m_Value: {x: 0.18750614, y: 0.29181972, z: 0.5} - desiredLuxValue: - m_OverrideState: 0 - m_Value: 20000 - updateMode: - m_OverrideState: 0 m_Value: 0 - updatePeriod: - m_OverrideState: 0 - m_Value: 0 - includeSunInBaking: - m_OverrideState: 0 - m_Value: 0 - hdriSky: + resolution: + m_OverrideState: 1 + m_Value: 1024 + shadowMultiplier: m_OverrideState: 1 - m_Value: {fileID: 8900000, guid: 8253d41e6e8b11a4cbe77a4f8f82934d, type: 3} - distortionMode: - m_OverrideState: 0 - m_Value: 0 - flowmap: - m_OverrideState: 0 - m_Value: {fileID: 0} - upperHemisphereOnly: - m_OverrideState: 0 m_Value: 1 - scrollOrientation: - m_OverrideState: 0 - m_Value: - mode: 1 - customValue: 0 - additiveValue: 0 - multiplyValue: 1 - scrollSpeed: - m_OverrideState: 0 - m_Value: - mode: 1 - customValue: 100 - additiveValue: 0 - multiplyValue: 1 - sunInitialRotation: - m_OverrideState: 0 - m_Value: -Infinity - lockSun: - m_OverrideState: 0 - m_Value: 0 - enableBackplate: - m_OverrideState: 0 - m_Value: 0 - backplateType: - m_OverrideState: 0 - m_Value: 0 - groundLevel: - m_OverrideState: 0 - m_Value: 0 - scale: - m_OverrideState: 0 - m_Value: {x: 32, y: 32} - projectionDistance: - m_OverrideState: 0 - m_Value: 16 - plateRotation: - m_OverrideState: 0 - m_Value: 0 - plateTexRotation: - m_OverrideState: 0 - m_Value: 0 - plateTexOffset: - m_OverrideState: 0 - m_Value: {x: 0, y: 0} - blendAmount: - m_OverrideState: 0 - m_Value: 0 shadowTint: - m_OverrideState: 0 - m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} - pointLightShadow: - m_OverrideState: 0 - m_Value: 0 - dirLightShadow: - m_OverrideState: 0 - m_Value: 0 - rectLightShadow: - m_OverrideState: 0 - m_Value: 0 - m_SkyVersion: 1 - enableDistortion: - m_OverrideState: 0 - m_Value: 0 - procedural: - m_OverrideState: 0 - m_Value: 1 - scrollDirection: - m_OverrideState: 0 - m_Value: 0 - m_ObsoleteScrollSpeed: - m_OverrideState: 0 - m_Value: 1 ---- !u!114 &1501199423866068322 + m_OverrideState: 1 + m_Value: {r: 0, g: 0, b: 0, a: 1} + shadowResolution: + m_OverrideState: 1 + m_Value: 256 + shadowSize: + m_OverrideState: 1 + m_Value: 500 + layerA: + cloudMap: + m_OverrideState: 1 + m_Value: {fileID: 2800000, guid: 57a33fc2476a01644865bfde5f06e2f4, type: 3} + opacityR: + m_OverrideState: 1 + m_Value: 1 + opacityG: + m_OverrideState: 1 + m_Value: 0 + opacityB: + m_OverrideState: 1 + m_Value: 0 + opacityA: + m_OverrideState: 1 + m_Value: 0 + altitude: + m_OverrideState: 1 + m_Value: 2000 + rotation: + m_OverrideState: 1 + m_Value: 0 + tint: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + exposure: + m_OverrideState: 1 + m_Value: 0 + distortionMode: + m_OverrideState: 1 + m_Value: 0 + scrollOrientation: + m_OverrideState: 1 + m_Value: + mode: 1 + customValue: 0 + additiveValue: 0 + multiplyValue: 1 + scrollSpeed: + m_OverrideState: 1 + m_Value: + mode: 1 + customValue: 100 + additiveValue: 0 + multiplyValue: 1 + flowmap: + m_OverrideState: 1 + m_Value: {fileID: 0} + lighting: + m_OverrideState: 1 + m_Value: 1 + steps: + m_OverrideState: 1 + m_Value: 6 + thickness: + m_OverrideState: 1 + m_Value: 0.5 + ambientProbeDimmer: + m_OverrideState: 1 + m_Value: 1 + castShadows: + m_OverrideState: 1 + m_Value: 0 + layerB: + cloudMap: + m_OverrideState: 1 + m_Value: {fileID: 2800000, guid: 57a33fc2476a01644865bfde5f06e2f4, type: 3} + opacityR: + m_OverrideState: 1 + m_Value: 1 + opacityG: + m_OverrideState: 1 + m_Value: 0 + opacityB: + m_OverrideState: 1 + m_Value: 0 + opacityA: + m_OverrideState: 1 + m_Value: 0 + altitude: + m_OverrideState: 1 + m_Value: 2000 + rotation: + m_OverrideState: 1 + m_Value: 0 + tint: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + exposure: + m_OverrideState: 1 + m_Value: 0 + distortionMode: + m_OverrideState: 1 + m_Value: 0 + scrollOrientation: + m_OverrideState: 1 + m_Value: + mode: 1 + customValue: 0 + additiveValue: 0 + multiplyValue: 1 + scrollSpeed: + m_OverrideState: 1 + m_Value: + mode: 1 + customValue: 100 + additiveValue: 0 + multiplyValue: 1 + flowmap: + m_OverrideState: 1 + m_Value: {fileID: 0} + lighting: + m_OverrideState: 1 + m_Value: 1 + steps: + m_OverrideState: 1 + m_Value: 6 + thickness: + m_OverrideState: 1 + m_Value: 0.5 + ambientProbeDimmer: + m_OverrideState: 1 + m_Value: 1 + castShadows: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &3555326013918735343 MonoBehaviour: m_ObjectHideFlags: 3 m_CorrespondingSourceObject: {fileID: 0} @@ -274,44 +1772,41 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 24f077503be6ae942a1e1245dbd53ea9, type: 3} - m_Name: Bloom + m_Script: {fileID: 11500000, guid: d877a03bef431a847adca8ab343db3e1, type: 3} + m_Name: RayTracingSettings m_EditorClassIdentifier: active: 1 - quality: + rayBias: + m_OverrideState: 1 + m_Value: 0.001 + distantRayBias: + m_OverrideState: 1 + m_Value: 0.001 + extendShadowCulling: m_OverrideState: 1 m_Value: 1 - threshold: - m_OverrideState: 0 - m_Value: 0 - intensity: + extendCameraCulling: m_OverrideState: 1 - m_Value: 0.2 - scatter: - m_OverrideState: 0 - m_Value: 0.7 - tint: - m_OverrideState: 0 - m_Value: {r: 1, g: 1, b: 1, a: 1} - dirtTexture: - m_OverrideState: 0 - m_Value: {fileID: 0} - dirtIntensity: - m_OverrideState: 0 m_Value: 0 - anamorphic: - m_OverrideState: 0 + directionalShadowRayLength: + m_OverrideState: 1 + m_Value: 1000 + directionalShadowFallbackIntensity: + m_OverrideState: 1 m_Value: 1 - m_Resolution: + buildMode: m_OverrideState: 1 - m_Value: 2 - m_HighQualityPrefiltering: + m_Value: 0 + cullingMode: m_OverrideState: 1 m_Value: 0 - m_HighQualityFiltering: + cullingDistance: m_OverrideState: 1 - m_Value: 1 ---- !u!114 &1932259527246508038 + m_Value: 1000 + minSolidAngle: + m_OverrideState: 1 + m_Value: 4 +--- !u!114 &3812076518312470650 MonoBehaviour: m_ObjectHideFlags: 3 m_CorrespondingSourceObject: {fileID: 0} @@ -320,42 +1815,219 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0d7593b3a9277ac4696b20006c21dde2, type: 3} - m_Name: VisualEnvironment + m_Script: {fileID: 11500000, guid: 4bff652df78c97c4f963064ad1f34619, type: 3} + m_Name: ColorCurves m_EditorClassIdentifier: active: 1 - skyType: + master: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + red: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + green: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + blue: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + hueVsHue: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 1 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + hueVsSat: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 1 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + satVsSat: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 0 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + lumVsSat: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 0 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_SelectedCurve: 0 +--- !u!114 &3837628616732854212 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8c604242b4dd4c8caa4d1944b94189e0, type: 3} + m_Name: HighQualityLineRenderingVolumeComponent + m_EditorClassIdentifier: + active: 1 + enable: m_OverrideState: 1 - m_Value: 1 - cloudType: - m_OverrideState: 0 - m_Value: 0 - skyAmbientMode: - m_OverrideState: 0 m_Value: 0 - planetRadius: - m_OverrideState: 0 - m_Value: 6378.1 - renderingSpace: - m_OverrideState: 0 - m_Value: 1 - centerMode: - m_OverrideState: 0 + compositionMode: + m_OverrideState: 1 m_Value: 0 - planetCenter: - m_OverrideState: 0 - m_Value: {x: 0, y: -6378.1, z: 0} - windOrientation: - m_OverrideState: 0 + clusterCount: + m_OverrideState: 1 + m_Value: 24 + sortingQuality: + m_OverrideState: 1 m_Value: 0 - windSpeed: - m_OverrideState: 0 - m_Value: 100 - fogType: - m_OverrideState: 0 + tileOpacityThreshold: + m_OverrideState: 1 + m_Value: 1 + writeDepthAlphaThreshold: + m_OverrideState: 1 m_Value: 0 - m_Version: 1 ---- !u!114 &2097231660816403494 +--- !u!114 &5187653951205467227 MonoBehaviour: m_ObjectHideFlags: 3 m_CorrespondingSourceObject: {fileID: 0} @@ -364,19 +2036,37 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a76fd08475e21554b8f284f723dd7cf8, type: 3} - m_Name: WaterRendering + m_Script: {fileID: 11500000, guid: a7649d9368d3a5c4ab8ad01a63e04962, type: 3} + m_Name: ChannelMixer m_EditorClassIdentifier: active: 1 - enable: + redOutRedIn: + m_OverrideState: 1 + m_Value: 100 + redOutGreenIn: + m_OverrideState: 1 + m_Value: 0 + redOutBlueIn: + m_OverrideState: 1 + m_Value: 0 + greenOutRedIn: + m_OverrideState: 1 + m_Value: 0 + greenOutGreenIn: m_OverrideState: 1 - m_Value: 1 - triangleSize: - m_OverrideState: 0 - m_Value: 30 - ambientProbeDimmer: - m_OverrideState: 0 - m_Value: 0.5 + m_Value: 100 + greenOutBlueIn: + m_OverrideState: 1 + m_Value: 0 + blueOutRedIn: + m_OverrideState: 1 + m_Value: 0 + blueOutGreenIn: + m_OverrideState: 1 + m_Value: 0 + blueOutBlueIn: + m_OverrideState: 1 + m_Value: 100 --- !u!114 &5315503232242033309 MonoBehaviour: m_ObjectHideFlags: 3 @@ -394,25 +2084,25 @@ MonoBehaviour: m_OverrideState: 1 m_Value: 1 meteringMode: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 2 luminanceSource: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 fixedExposure: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 compensation: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 limitMin: - m_OverrideState: 0 - m_Value: -10 + m_OverrideState: 1 + m_Value: -1 limitMax: - m_OverrideState: 0 - m_Value: 10 + m_OverrideState: 1 + m_Value: 14 curveMap: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: serializedVersion: 2 m_Curve: @@ -438,7 +2128,7 @@ MonoBehaviour: m_PostInfinity: 2 m_RotationOrder: 4 limitMinCurveMap: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: serializedVersion: 2 m_Curve: @@ -464,7 +2154,7 @@ MonoBehaviour: m_PostInfinity: 2 m_RotationOrder: 4 limitMaxCurveMap: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: serializedVersion: 2 m_Curve: @@ -490,44 +2180,251 @@ MonoBehaviour: m_PostInfinity: 2 m_RotationOrder: 4 adaptationMode: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 adaptationSpeedDarkToLight: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 3 adaptationSpeedLightToDark: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 weightTextureMask: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: {fileID: 0} histogramPercentages: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: {x: 40, y: 90} histogramUseCurveRemapping: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 targetMidGray: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 centerAroundExposureTarget: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 proceduralCenter: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: {x: 0.5, y: 0.5} proceduralRadii: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: {x: 0.3, y: 0.3} maskMinIntensity: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: -30 maskMaxIntensity: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 30 proceduralSoftness: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0.5 +--- !u!114 &5395333384281200431 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31394aa05878563408489d5c1688f3a0, type: 3} + m_Name: PathTracing + m_EditorClassIdentifier: + active: 1 + enable: + m_OverrideState: 1 + m_Value: 0 + layerMask: + m_OverrideState: 1 + m_Value: + serializedVersion: 2 + m_Bits: 4294967295 + maximumSamples: + m_OverrideState: 1 + m_Value: 256 + minimumDepth: + m_OverrideState: 1 + m_Value: 1 + maximumDepth: + m_OverrideState: 1 + m_Value: 4 + maximumIntensity: + m_OverrideState: 1 + m_Value: 10 + skyImportanceSampling: + m_OverrideState: 1 + m_Value: 0 + tilingParameters: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 0, w: 0} + seedMode: + m_OverrideState: 1 + m_Value: 0 + customSeed: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &5746433847734208960 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d877ec3e844f2ca46830012e8e79319b, type: 3} + m_Name: PhysicallyBasedSky + m_EditorClassIdentifier: + active: 1 + rotation: + m_OverrideState: 1 + m_Value: 0 + skyIntensityMode: + m_OverrideState: 1 + m_Value: 0 + exposure: + m_OverrideState: 1 + m_Value: 0 + multiplier: + m_OverrideState: 1 + m_Value: 1 + upperHemisphereLuxValue: + m_OverrideState: 1 + m_Value: 1 + upperHemisphereLuxColor: + m_OverrideState: 1 + m_Value: {x: 0, y: 0, z: 0} + desiredLuxValue: + m_OverrideState: 1 + m_Value: 20000 + updateMode: + m_OverrideState: 1 + m_Value: 0 + updatePeriod: + m_OverrideState: 1 + m_Value: 0 + includeSunInBaking: + m_OverrideState: 1 + m_Value: 0 + type: + m_OverrideState: 1 + m_Value: 1 + atmosphericScattering: + m_OverrideState: 1 + m_Value: 1 + renderingMode: + m_OverrideState: 1 + m_Value: 0 + material: + m_OverrideState: 1 + m_Value: {fileID: -876546973899608171, guid: 02532cbb810fb404db49da84f1efe41e, type: 3} + airDensityR: + m_OverrideState: 1 + m_Value: 0.04534 + airDensityG: + m_OverrideState: 1 + m_Value: 0.10237241 + airDensityB: + m_OverrideState: 1 + m_Value: 0.23264056 + airTint: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + airMaximumAltitude: + m_OverrideState: 1 + m_Value: 55261.973 + aerosolDensity: + m_OverrideState: 1 + m_Value: 0.01192826 + aerosolTint: + m_OverrideState: 1 + m_Value: {r: 0.9, g: 0.9, b: 0.9, a: 1} + aerosolMaximumAltitude: + m_OverrideState: 1 + m_Value: 8289.296 + aerosolAnisotropy: + m_OverrideState: 1 + m_Value: 0.8 + ozoneDensityDimmer: + m_OverrideState: 1 + m_Value: 1 + ozoneMinimumAltitude: + m_OverrideState: 1 + m_Value: 20000 + ozoneLayerWidth: + m_OverrideState: 1 + m_Value: 20000 + groundTint: + m_OverrideState: 1 + m_Value: {r: 0.12, g: 0.1, b: 0.09, a: 1} + groundColorTexture: + m_OverrideState: 1 + m_Value: {fileID: 0} + groundEmissionTexture: + m_OverrideState: 1 + m_Value: {fileID: 0} + groundEmissionMultiplier: + m_OverrideState: 1 + m_Value: 1 + planetRotation: + m_OverrideState: 1 + m_Value: {x: 0, y: 0, z: 0} + spaceEmissionTexture: + m_OverrideState: 1 + m_Value: {fileID: 0} + spaceEmissionMultiplier: + m_OverrideState: 1 + m_Value: 1 + spaceRotation: + m_OverrideState: 1 + m_Value: {x: 0, y: 0, z: 0} + colorSaturation: + m_OverrideState: 1 + m_Value: 1 + alphaSaturation: + m_OverrideState: 1 + m_Value: 1 + alphaMultiplier: + m_OverrideState: 1 + m_Value: 1 + horizonTint: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + zenithTint: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + horizonZenithShift: + m_OverrideState: 1 + m_Value: 0 + m_SkyVersion: 3 + m_ObsoleteEarthPreset: + m_OverrideState: 1 + m_Value: 1 + planetaryRadius: + m_OverrideState: 1 + m_Value: 6378100 + planetCenterPosition: + m_OverrideState: 1 + m_Value: {x: 0, y: -6378100, z: 0} +--- !u!114 &6627875414090041873 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b51a78e223a2e504bb88a059b55229ea, type: 3} + m_Name: WhiteBalance + m_EditorClassIdentifier: + active: 1 + temperature: + m_OverrideState: 1 + m_Value: 0 + tint: + m_OverrideState: 1 + m_Value: 0 --- !u!114 &7502528774814404555 MonoBehaviour: m_ObjectHideFlags: 3 @@ -542,72 +2439,72 @@ MonoBehaviour: m_EditorClassIdentifier: active: 1 quality: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 rayTracing: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 intensity: m_OverrideState: 1 m_Value: 0.5 directLightingStrength: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 radius: m_OverrideState: 1 m_Value: 1.5 spatialBilateralAggressiveness: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0.15 temporalAccumulation: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 ghostingReduction: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0.5 blurSharpness: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0.1 layerMask: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: serializedVersion: 2 m_Bits: 4294967295 specularOcclusion: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0.5 occluderMotionRejection: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 receiverMotionRejection: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 m_StepCount: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 6 m_FullResolution: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 m_MaximumRadiusInPixels: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 40 m_BilateralUpsample: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 m_DirectionCount: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 2 m_RayLength: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 3 m_SampleCount: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 2 m_Denoise: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 m_DenoiserRadius: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0.5 --- !u!114 &7542669330009093999 MonoBehaviour: @@ -626,58 +2523,58 @@ MonoBehaviour: m_OverrideState: 1 m_Value: 2 useFullACES: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 toeStrength: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 toeLength: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0.5 shoulderStrength: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 shoulderLength: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0.5 shoulderAngle: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 gamma: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 lutTexture: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: {fileID: 0} lutContribution: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 neutralHDRRangeReductionMode: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 2 acesPreset: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 3 fallbackMode: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 hueShiftAmount: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 detectPaperWhite: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 paperWhite: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 300 detectBrightnessLimits: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 minNits: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0.005 maxNits: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1000 --- !u!114 &7686318427622180703 MonoBehaviour: @@ -697,19 +2594,19 @@ MonoBehaviour: m_OverrideState: 1 m_Value: 150 directionalTransmissionMultiplier: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 cascadeShadowSplitCount: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 4 cascadeShadowSplit0: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0.05 cascadeShadowSplit1: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0.15 cascadeShadowSplit2: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0.3 cascadeShadowBorder0: m_OverrideState: 1 @@ -718,8 +2615,61 @@ MonoBehaviour: m_OverrideState: 1 m_Value: 0.05086228 cascadeShadowBorder2: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 cascadeShadowBorder3: - m_OverrideState: 0 + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &8045328965405427507 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 464ccca2a3ef3ce429c63a5b5cd3be58, type: 3} + m_Name: SubSurfaceScattering + m_EditorClassIdentifier: + active: 1 + rayTracing: + m_OverrideState: 1 + m_Value: 0 + sampleCount: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &8974852522407309507 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b24b200358312b4fa1004e2431c2f1f, type: 3} + m_Name: ShadowsMidtonesHighlights + m_EditorClassIdentifier: + active: 1 + shadows: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + midtones: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + highlights: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + shadowsStart: + m_OverrideState: 1 m_Value: 0 + shadowsEnd: + m_OverrideState: 1 + m_Value: 0.3 + highlightsStart: + m_OverrideState: 1 + m_Value: 0.55 + highlightsEnd: + m_OverrideState: 1 + m_Value: 1 diff --git a/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRPDefaultResources/HDRenderPipelineGlobalSettings.asset b/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRPDefaultResources/HDRenderPipelineGlobalSettings.asset index b794ba15bfe..40964d2f45e 100644 --- a/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRPDefaultResources/HDRenderPipelineGlobalSettings.asset +++ b/Templates/com.unity.template.hdrp-blank/Assets/Settings/HDRPDefaultResources/HDRenderPipelineGlobalSettings.asset @@ -12,24 +12,52 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 781cc897cf8675041a751163b51f97dd, type: 3} m_Name: HDRenderPipelineGlobalSettings m_EditorClassIdentifier: - m_ObsoleteRenderPipelineRayTracingResources: {fileID: 0} - m_Settings: - m_SettingsList: - m_List: - - rid: 8556427327610290176 - - rid: 8556427327610290177 - - rid: 8556427327610290178 - - rid: 8556427327610290179 - - rid: 8556427327610290180 - - rid: 8556427327610290181 - - rid: 8556427327610290182 - - rid: 8556427327610290183 - m_RuntimeSettings: - m_List: [] - m_DefaultVolumeProfile: {fileID: 11400000, guid: 14b392ee213d25a48b1feddbd9f5a9be, - type: 2} - m_LookDevVolumeProfile: {fileID: 11400000, guid: 4594f4a3fb14247e192bcca6dc23c8ed, - type: 2} + m_CustomPostProcessOrdersSettings: + m_Version: 0 + m_BeforeTransparentCustomPostProcesses: + m_InjectionPoint: 0 + m_CustomPostProcessTypesAsString: [] + m_BeforeTAACustomPostProcesses: + m_InjectionPoint: 3 + m_CustomPostProcessTypesAsString: [] + m_BeforePostProcessCustomPostProcesses: + m_InjectionPoint: 1 + m_CustomPostProcessTypesAsString: [] + m_AfterPostProcessBlursCustomPostProcesses: + m_InjectionPoint: 4 + m_CustomPostProcessTypesAsString: [] + m_AfterPostProcessCustomPostProcesses: + m_InjectionPoint: 2 + m_CustomPostProcessTypesAsString: [] + beforeTransparentCustomPostProcesses: [] + beforePostProcessCustomPostProcesses: [] + afterPostProcessBlursCustomPostProcesses: [] + afterPostProcessCustomPostProcesses: [] + beforeTAACustomPostProcesses: [] + m_ShaderStrippingSetting: + m_Version: 0 + m_ExportShaderVariants: 1 + m_ShaderVariantLogLevel: 0 + m_StripRuntimeDebugShaders: 0 + m_ShaderVariantLogLevel: 0 + m_SupportRuntimeDebugDisplay: 0 + m_ExportShaderVariants: 1 + m_StripDebugVariants: 0 + DLSSProjectId: 000000 + useDLSSCustomProjectId: 0 + supportProbeVolumes: 0 + autoRegisterDiffusionProfiles: 0 + analyticDerivativeEmulation: 0 + analyticDerivativeDebugOutput: 0 + lensAttenuationMode: 0 + colorGradingSpace: 0 + m_ObsoleteDiffusionProfileSettingsList: + - {fileID: 11400000, guid: 48e911a1e337b44e2b85dbc65b47a594, type: 2} + - {fileID: 11400000, guid: 879ffae44eefa4412bb327928f1a96dd, type: 2} + specularFade: 0 + rendererListCulling: 0 + m_ObsoleteDefaultVolumeProfile: {fileID: 0} + m_ObsoleteLookDevVolumeProfile: {fileID: 0} m_ObsoleteRenderingPathDefaultCameraFrameSettings: bitDatas: data1: 72198260625768269 @@ -78,7 +106,7 @@ MonoBehaviour: sssCustomDownsampleSteps: 0 msaaMode: 1 materialQuality: 0 - m_RenderingPath: + m_ObsoleteRenderingPath: m_Version: 0 m_Camera: bitDatas: @@ -128,31 +156,44 @@ MonoBehaviour: sssCustomDownsampleSteps: 0 msaaMode: 1 materialQuality: 0 - m_RenderPipelineResources: {fileID: 11400000, guid: 3ce144cff5783da45aa5d4fdc2da14b7, - type: 2} - m_CustomPostProcessOrdersSettings: - m_Version: 0 - m_BeforeTransparentCustomPostProcesses: - m_InjectionPoint: 0 - m_CustomPostProcessTypesAsString: [] - m_BeforeTAACustomPostProcesses: - m_InjectionPoint: 3 - m_CustomPostProcessTypesAsString: [] - m_BeforePostProcessCustomPostProcesses: - m_InjectionPoint: 1 - m_CustomPostProcessTypesAsString: [] - m_AfterPostProcessBlursCustomPostProcesses: - m_InjectionPoint: 4 - m_CustomPostProcessTypesAsString: [] - m_AfterPostProcessCustomPostProcesses: - m_InjectionPoint: 2 - m_CustomPostProcessTypesAsString: [] - beforeTransparentCustomPostProcesses: [] - beforePostProcessCustomPostProcesses: [] - afterPostProcessBlursCustomPostProcesses: [] - afterPostProcessCustomPostProcesses: [] - beforeTAACustomPostProcesses: [] - defaultRenderingLayerMask: 257 + m_Settings: + m_SettingsList: + m_List: + - rid: 8556427327610290176 + - rid: 8556427327610290177 + - rid: 8556427327610290178 + - rid: 8556427327610290179 + - rid: 8556427327610290180 + - rid: 8556427327610290181 + - rid: 8556427327610290182 + - rid: 8556427327610290183 + - rid: 5747374308318511104 + - rid: 5747374308318511105 + - rid: 5747374308318511106 + - rid: 5747374308318511107 + - rid: 5747374308318511108 + - rid: 5747374308318511109 + - rid: 5747374308318511110 + - rid: 5747374308318511111 + - rid: 5747374308318511112 + - rid: 5747374308318511113 + - rid: 5747374308318511114 + - rid: 5747374308318511115 + - rid: 5747374308318511116 + - rid: 5747374308318511117 + - rid: 5747374308318511118 + - rid: 5747374308318511119 + - rid: 5747374308318511120 + - rid: 5747374308318511121 + - rid: 5747374308318511122 + - rid: 5747374308318511123 + - rid: 5747374308318511124 + - rid: 5747374308318511125 + - rid: 5747374308318511126 + - rid: 5747374308318511127 + - rid: 5747374308318511128 + m_RuntimeSettings: + m_List: [] renderingLayerNames: - Light Layer default - Light Layer 1 @@ -186,168 +227,494 @@ MonoBehaviour: decalLayerName5: Decal Layer 5 decalLayerName6: Decal Layer 6 decalLayerName7: Decal Layer 7 - lensAttenuationMode: 0 - colorGradingSpace: 0 - m_ObsoleteDiffusionProfileSettingsList: - - {fileID: 11400000, guid: 48e911a1e337b44e2b85dbc65b47a594, type: 2} - - {fileID: 11400000, guid: 879ffae44eefa4412bb327928f1a96dd, type: 2} - specularFade: 0 - rendererListCulling: 0 - DLSSProjectId: 000000 - useDLSSCustomProjectId: 0 - supportProbeVolumes: 0 - autoRegisterDiffusionProfiles: 0 - analyticDerivativeEmulation: 0 - analyticDerivativeDebugOutput: 0 apvScenesData: - m_ObsoleteSerializedBakingSets: [] - sceneToBakingSet: - m_Keys: [] - m_Values: [] - bakingSets: [] - sceneBounds: + obsoleteSceneBounds: m_Keys: [] m_Values: [] - hasProbeVolumes: + obsoleteHasProbeVolumes: m_Keys: [] m_Values: - m_Version: 12 - m_ShaderStrippingSetting: - m_Version: 0 - m_ExportShaderVariants: 1 - m_ShaderVariantLogLevel: 0 - m_StripRuntimeDebugShaders: 0 - m_ShaderVariantLogLevel: 0 - m_SupportRuntimeDebugDisplay: 0 - m_ExportShaderVariants: 1 - m_StripDebugVariants: 0 + m_Version: 14 references: version: 2 RefIds: + - rid: 5747374308318511104 + type: {class: LensSettings, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_Version: 0 + m_LensAttenuationMode: 0 + - rid: 5747374308318511105 + type: {class: RenderingPathFrameSettings, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_Version: 0 + m_Camera: + bitDatas: + data1: 72198260625768269 + data2: 13799031439032811544 + lodBias: 1 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 20 + sssCustomDownsampleSteps: 0 + msaaMode: 1 + materialQuality: 0 + m_CustomOrBakedReflection: + bitDatas: + data1: 135310754214733 + data2: 4539628428684460056 + lodBias: 1 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 20 + sssCustomDownsampleSteps: 0 + msaaMode: 1 + materialQuality: 0 + m_RealtimeReflection: + bitDatas: + data1: 139923391782733 + data2: 13763000465807638544 + lodBias: 1 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 20 + sssCustomDownsampleSteps: 0 + msaaMode: 1 + materialQuality: 0 + - rid: 5747374308318511106 + type: {class: LookDevVolumeProfileSettings, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_Version: 0 + m_VolumeProfile: {fileID: 11400000, guid: 4594f4a3fb14247e192bcca6dc23c8ed, type: 2} + - rid: 5747374308318511107 + type: {class: WaterSystemGlobalSettings, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_Version: 1 + m_EnableMaskAndCurrentWaterDecals: 0 + - rid: 5747374308318511108 + type: {class: CustomPostProcessOrdersSettings, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_Version: 0 + m_BeforeTransparentCustomPostProcesses: + m_InjectionPoint: 0 + m_CustomPostProcessTypesAsString: [] + m_BeforeTAACustomPostProcesses: + m_InjectionPoint: 3 + m_CustomPostProcessTypesAsString: [] + m_BeforePostProcessCustomPostProcesses: + m_InjectionPoint: 1 + m_CustomPostProcessTypesAsString: [] + m_AfterPostProcessBlursCustomPostProcesses: + m_InjectionPoint: 4 + m_CustomPostProcessTypesAsString: [] + m_AfterPostProcessCustomPostProcesses: + m_InjectionPoint: 2 + m_CustomPostProcessTypesAsString: [] + - rid: 5747374308318511109 + type: {class: RenderGraphSettings, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_Version: 0 + m_DynamicRenderPassCulling: 0 + - rid: 5747374308318511110 + type: {class: ColorGradingSettings, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_Version: 0 + m_ColorGradingSpace: 0 + - rid: 5747374308318511111 + type: {class: HDRenderPipelineEditorAssets, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_DefaultSettingsVolumeProfile: {fileID: 11400000, guid: f940a8037e6cda542891dc1aac1fa4e8, type: 2} + m_LookDevDefaultLookDevVolumeProfile: {fileID: 11400000, guid: 254c4fe87beb7be4fa72e1681edbed02, type: 2} + m_DefaultDiffusionProfileSettingsList: + - {fileID: 11400000, guid: 404820c4cf36ad944862fa59c56064f0, type: 2} + - {fileID: 11400000, guid: 2384dbf2c1c420f45a792fbc315fbfb1, type: 2} + - rid: 5747374308318511112 + type: {class: HDRenderPipelineRuntimeShaders, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_DefaultShader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} + m_CameraMotionVectorsPS: {fileID: 4800000, guid: 035941b63024d1943af48811c1db20d9, type: 3} + m_ColorPyramidPS: {fileID: 4800000, guid: 2fcfb8d92f45e4549b3f0bad5d0654bf, type: 3} + m_ColorPyramidCS: {fileID: 7200000, guid: 4e3267a1135742441a14298d8dcac04a, type: 3} + m_DepthPyramidCS: {fileID: 7200000, guid: 64a553bb564274041906f78ffba955e4, type: 3} + m_MaxZCS: {fileID: 7200000, guid: e95abf8c7230c344595f41c4dd5ff517, type: 3} + m_ApplyDistortionPS: {fileID: 4800000, guid: 02ae56f4306413c4a96dcf005cde1971, type: 3} + m_CustomPassUtils: {fileID: 4800000, guid: 7e3722d0388000848acb25fd3cc8c088, type: 3} + m_CustomPassRenderersUtils: {fileID: 4800000, guid: cef5ba33ee5063d4c8b495d2292e394d, type: 3} + m_ClearStencilBufferPS: {fileID: 4800000, guid: 8ea49ef16606acd489439e676ab84040, type: 3} + m_CopyStencilBufferPS: {fileID: 4800000, guid: 3d1574f1cdfa0ce4995f9bc79ed7f8ec, type: 3} + m_CopyDepthBufferPS: {fileID: 4800000, guid: 42dfcc8fe803ece4096c58630689982f, type: 3} + m_BlitPS: {fileID: 4800000, guid: e22fc1942c664490980b8793dd4a163d, type: 3} + m_BlitColorAndDepthPS: {fileID: 4800000, guid: b22ad378c678348729d3a3f981b9f270, type: 3} + m_DownsampleDepthPS: {fileID: 4800000, guid: 67d6171b0acc6554aad48c845ec7e67f, type: 3} + m_UpsampleTransparentPS: {fileID: 4800000, guid: 2ad7ce40f0dbaf64dadef1f58d8524d3, type: 3} + m_ResolveStencilCS: {fileID: 7200000, guid: 65b89cac5f286b043a31bf8041776ee7, type: 3} + m_DebugDisplayLatlongPS: {fileID: 4800000, guid: c1d1d149a043a5349ba367da6c2051ba, type: 3} + m_DebugViewMaterialGBufferPS: {fileID: 4800000, guid: 439949ea1bfa91b4ba0d04269fcde33d, type: 3} + m_DebugViewTilesPS: {fileID: 4800000, guid: c7c2bd17b06ceb4468e14081aaf1b96f, type: 3} + m_DebugFullScreenPS: {fileID: 4800000, guid: e874aca2df8300a488258738c31f85cf, type: 3} + m_DebugColorPickerPS: {fileID: 4800000, guid: 8137b807709e178498f22ed710864bb0, type: 3} + m_DebugExposurePS: {fileID: 4800000, guid: 0ef322534f047a34c96d29419d56d17a, type: 3} + m_DebugHDRPS: {fileID: 4800000, guid: 9bc5229549892084da43ad706d84f1bc, type: 3} + m_DebugLightVolumePS: {fileID: 4800000, guid: 8e706c0e71fcec34a8f5c9713e5e2943, type: 3} + m_DebugLightVolumeCS: {fileID: 7200000, guid: f5d5d21faef5cf445ac2c5d8ff9c4184, type: 3} + m_DebugBlitQuad: {fileID: 4800000, guid: cf5ca5b6ef18b3f429ed707ee9ceac9f, type: 3} + m_DebugViewVirtualTexturingBlit: {fileID: 4800000, guid: 55d195396b03b804eb78c92d468e3c8e, type: 3} + m_MaterialError: {fileID: 4800000, guid: 79a966a5200a456188dec0d48d805614, type: 3} + m_MaterialLoading: {fileID: 4800000, guid: 392325671f122f540be9033ca5ae7a56, type: 3} + m_ClearDebugBufferCS: {fileID: 7200000, guid: 7fc6041d5cf70004aa33bb1ac64e3c06, type: 3} + m_DebugWaveformPS: {fileID: 4800000, guid: 0024f9d09a828734192f3e1cd5931745, type: 3} + m_DebugWaveformCS: {fileID: 7200000, guid: 62b785f79355903428a21d5d8f8aeabe, type: 3} + m_DebugVectorscopePS: {fileID: 4800000, guid: 7a09af24008164d40ae85ccd6bf87e17, type: 3} + m_DebugVectorscopeCS: {fileID: 7200000, guid: 6a70efb18a2b2964c8eb0fc04aba20e9, type: 3} + m_DebugImageHistogramCS: {fileID: 7200000, guid: 52cc17ef5a5ffc443a5c142f9b745a85, type: 3} + m_DebugHDRxyMappingCS: {fileID: 7200000, guid: f055d2983d992b64494f1a03fc725cde, type: 3} + m_ProbeVolumeSamplingDebugComputeShader: {fileID: 7200000, guid: 22de19bc461f84742857dd64c56b0397, type: 3} + m_PlanarReflectionFilteringCS: {fileID: 7200000, guid: 9f3f8a01b8caaaa4595591dc96d43dd2, type: 3} + m_ScreenSpaceGlobalIlluminationCS: {fileID: 7200000, guid: 96170a954eb538b40a5ff369552c3629, type: 3} + m_ScreenSpaceReflectionsCS: {fileID: 7200000, guid: d1de9ac7d9016204da289affe9677942, type: 3} + m_ClearDispatchIndirectCS: {fileID: 7200000, guid: fc1f553acb80a6446a32d33e403d0656, type: 3} + m_ClearLightListsCS: {fileID: 7200000, guid: 743eb3491795b9545955695d591195a1, type: 3} + m_BuildDispatchIndirectCS: {fileID: 7200000, guid: 4eb1b418be7044c40bb5200496c50f14, type: 3} + m_BuildScreenAABBCS: {fileID: 7200000, guid: 728dce960f8a9c44bbc3abb3b851d8f6, type: 3} + m_BuildPerTileLightListCS: {fileID: 7200000, guid: 65af3444cbf4b3747a4dead7ee00cfee, type: 3} + m_BuildPerBigTileLightListCS: {fileID: 7200000, guid: 5ee1f9d6e09abe045b2f5e0b784b9072, type: 3} + m_BuildPerVoxelLightListCS: {fileID: 7200000, guid: 0bb1b7e0ddcd5c44baf3ddc7456eb196, type: 3} + m_LightListClusterClearAtomicIndexCS: {fileID: 7200000, guid: 1e3472a94b14a334a93230bbc700d7b2, type: 3} + m_BuildMaterialFlagsCS: {fileID: 7200000, guid: fb3eda953cd6e634e877fb777be2cd08, type: 3} + m_DeferredCS: {fileID: 7200000, guid: 0b64f79746d2daf4198eaf6eab9af259, type: 3} + m_VolumeVoxelizationCS: {fileID: 7200000, guid: c20b371db720da244b73830ec74a343a, type: 3} + m_VolumetricLightingCS: {fileID: 7200000, guid: b4901a10df2d1e24282725e9fbc77c97, type: 3} + m_VolumetricLightingFilteringCS: {fileID: 7200000, guid: ef9a910d0ec6ebb41ae3f5c7a69daf46, type: 3} + m_DefaultFogVolumeShader: {fileID: -6465566751694194690, guid: 95060fe3e070428418e64e6bed27b111, type: 3} + m_ScreenSpaceMultipleScatteringCS: {fileID: 7200000, guid: 29c79555731a206478f0ea448352340c, type: 3} + m_SubsurfaceScatteringCS: {fileID: 7200000, guid: b06a7993621def248addd55d0fe931b1, type: 3} + m_SubsurfaceScatteringDownsampleCS: {fileID: 7200000, guid: 4f8aaf0160a259e499fdfac512ca2692, type: 3} + m_CombineLightingPS: {fileID: 4800000, guid: 2e37131331fbdca449b1a2bc47a639ca, type: 3} + m_BlitCubemapPS: {fileID: 4800000, guid: d05913e251bed7a4992c921c62e1b647, type: 3} + m_OpaqueAtmosphericScatteringPS: {fileID: 4800000, guid: 32f724728cf19904291226f239ec16f0, type: 3} + m_HdriSkyPS: {fileID: 4800000, guid: 9bd32a6ece529fd4f9408b8d7e00c10d, type: 3} + m_IntegrateHdriSkyPS: {fileID: 4800000, guid: 48db2705cf2856d4e893eb30a6892d1b, type: 3} + m_SkyboxCubemapPS: {fileID: 103, guid: 0000000000000000f000000000000000, type: 0} + m_GradientSkyPS: {fileID: 4800000, guid: 2b5d4f1b26f03dc4a873b093e0c4adb1, type: 3} + m_AmbientProbeConvolutionCS: {fileID: 7200000, guid: 6d048f7b1bd45e840b4e79ec92639fa8, type: 3} + m_GroundIrradiancePrecomputationCS: {fileID: 7200000, guid: eb6ae6f326207ee4d987a3e5adddf63a, type: 3} + m_InScatteredRadiancePrecomputationCS: {fileID: 7200000, guid: 70c69d514688f8545855680760d77418, type: 3} + m_PhysicallyBasedSkyPS: {fileID: 4800000, guid: a06934a4863e778498be65d8f865b7a4, type: 3} + m_CloudLayerPS: {fileID: 4800000, guid: 001a47fa123e95a4bba13ecb0442d944, type: 3} + m_BakeCloudTextureCS: {fileID: 7200000, guid: 09a7f6850ee9fb4439e5ebd632127da5, type: 3} + m_BakeCloudShadowsCS: {fileID: 7200000, guid: 3e7317e0800c066448ee07a3e47f102b, type: 3} + m_SkyLUTGenerator: {fileID: 7200000, guid: 79224112d91b32241be6b65802863db4, type: 3} + m_LineStagePrepareCS: {fileID: 7200000, guid: 53231d98bbe64477aacc1adc14ba2619, type: 3} + m_LineStageSetupSegmentCS: {fileID: 7200000, guid: 028836c66d494d8d94e1b2ca7d5382ae, type: 3} + m_LineStageShadingSetupCS: {fileID: 7200000, guid: fefde0fac988da24a93bc2d8d6e0a0a1, type: 3} + m_LineStageRasterBinCS: {fileID: 7200000, guid: 17d1e3e43f0e4c878b40b52848a58a77, type: 3} + m_LineStageWorkQueueCS: {fileID: 7200000, guid: dae4ea8aeff24b16be3f0b2948e0acc5, type: 3} + m_LineStageRasterFineCS: {fileID: 7200000, guid: 8691ac13e67d457abb92eca75e88e995, type: 3} + m_LineCompositePS: {fileID: 4800000, guid: 8d9fbe0862434a2298748d335b9abea5, type: 3} + m_PreIntegratedFGD_GGXDisneyDiffusePS: {fileID: 4800000, guid: 123f13d52852ef547b2962de4bd9eaad, type: 3} + m_PreIntegratedFGD_CharlieFabricLambertPS: {fileID: 4800000, guid: 3b3bf235775cf8b4baae7f3306787ab0, type: 3} + m_PreIntegratedFGD_WardPS: {fileID: 4800000, guid: d279c46a545b0af4f9f0c4fa82cd489e, type: 3} + m_PreIntegratedFGD_CookTorrancePS: {fileID: 4800000, guid: a6402c19b020b4a4fb7073aaa2e26aba, type: 3} + m_PreIntegratedFGD_MarschnerPS: {fileID: 4800000, guid: 31f36caf0a5e7f848a1b5328b6ad3eb8, type: 3} + m_PreIntegratedFiberScatteringCS: {fileID: 7200000, guid: 4a087c9d074552c48aeb85184d56312e, type: 3} + m_VolumetricMaterialCS: {fileID: 7200000, guid: 26f18c9cb0bccbf4481f8c84579affb1, type: 3} + m_EyeMaterialCS: {fileID: 7200000, guid: 76f78ba05cea1ed449c1ef613ab90597, type: 3} + m_FilterAreaLightCookiesPS: {fileID: 4800000, guid: c243aac96dda5fa40bed693ed5ba02c4, type: 3} + m_BuildProbabilityTablesCS: {fileID: 7200000, guid: b9f26cf340afe9145a699753531b2a4c, type: 3} + m_ComputeGgxIblSampleDataCS: {fileID: 7200000, guid: 764a24bb47ef5ba4781d9ae82ca07445, type: 3} + m_GGXConvolvePS: {fileID: 4800000, guid: 123ed592ad5c2494b8aed301fd609e7b, type: 3} + m_CharlieConvolvePS: {fileID: 4800000, guid: 5685fd17e71045e4ca9fefca38a7c177, type: 3} + m_GpuPrefixSumCS: {fileID: 7200000, guid: 76fcf27f72d24907b1846939a7a2d83f, type: 3} + m_GpuSortCS: {fileID: 7200000, guid: e485b8d649234276ababbd36fcec8c1a, type: 3} + m_BilateralUpsampleCS: {fileID: 7200000, guid: 68e831c555284d741b985e05369f0e63, type: 3} + m_TemporalFilterCS: {fileID: 7200000, guid: 741979ff70f7bd6489fbcb464280ecff, type: 3} + m_DiffuseDenoiserCS: {fileID: 7200000, guid: b4ed2382141619f40af1f743a84ccaea, type: 3} + m_FurnaceTestCS: {fileID: 7200000, guid: 9c19385e40e70ea41811a942a46b04a3, type: 3} + m_ObjectIDPS: {fileID: -6465566751694194690, guid: 89daf81f8e8f6634da726cbca859ca38, type: 3} + m_ComputeThicknessPS: {fileID: 4800000, guid: 4d2c6daf0d4968748bb5b82d5016fdea, type: 3} + m_CopyChannelCS: {fileID: 7200000, guid: a4d45eda75e8e474dbe24a31f741f3b4, type: 3} + m_ClearBuffer2D: {fileID: 7200000, guid: fa9b66253270e9c47a67ae142f669eb4, type: 3} + m_EncodeBC6HCS: {fileID: 7200000, guid: aa922d239de60304f964e24488559eeb, type: 3} + m_CubeToPanoPS: {fileID: 4800000, guid: 595434cc3b6405246b6cd3086d0b6f7d, type: 3} + m_BlitCubeTextureFacePS: {fileID: 4800000, guid: d850d0a2481878d4bbf17e5126b04163, type: 3} + m_ClearUIntTextureCS: {fileID: 7200000, guid: d067ad4b88af51c498875426894aef76, type: 3} + m_Texture3DAtlasCS: {fileID: 7200000, guid: 81522e314a83afd4a8ed43bd00757051, type: 3} + m_XrMirrorViewPS: {fileID: 4800000, guid: e6255f98cf405eb45ab6f9006cf11e1f, type: 3} + m_XrOcclusionMeshPS: {fileID: 4800000, guid: 46a45b32bb110604fb36216b63bcdb81, type: 3} + m_ContactShadowCS: {fileID: 7200000, guid: 3e6900e06dc185a4380af4dacb4db0a4, type: 3} + m_ScreenSpaceShadowPS: {fileID: 4800000, guid: bfa43a48695613b4ea19c58858ae1a61, type: 3} + m_ShadowClearPS: {fileID: 4800000, guid: e3cab24f27741f44d8af1e94d006267c, type: 3} + m_EvsmBlurCS: {fileID: 7200000, guid: fb36979473602464fa32deacb9630c08, type: 3} + m_DebugHDShadowMapPS: {fileID: 4800000, guid: 93d40cc9a6e13994f86f576a624efa18, type: 3} + m_DebugLocalVolumetricFogAtlasPS: {fileID: 4800000, guid: 8371b763f09c7304889c22aa97ebdfd2, type: 3} + m_MomentShadowsCS: {fileID: 7200000, guid: 4dea53e2ff15ed0448817c2aa4246e53, type: 3} + m_ShadowBlitPS: {fileID: 4800000, guid: ca059f1af4587a24b9a9eed3b66cff0f, type: 3} + m_DecalNormalBufferPS: {fileID: 4800000, guid: fd532bf1795188c4daaa66ea798b8b0a, type: 3} + m_GTAOCS: {fileID: 7200000, guid: 6710b06492bd58c4bb8aec0fdc1fced3, type: 3} + m_GTAOSpatialDenoiseCS: {fileID: 7200000, guid: 2cb33c21587d12b4388d7866ab6c65f6, type: 3} + m_GTAOTemporalDenoiseCS: {fileID: 7200000, guid: 31e0ca4c210f97c468037d11a5b832bb, type: 3} + m_GTAOCopyHistoryCS: {fileID: 7200000, guid: 7f43be57ffd12ff469d4fc175c00c4b4, type: 3} + m_GTAOBlurAndUpsample: {fileID: 7200000, guid: 9eb1abde882538a4ea46fa23e49ab9fa, type: 3} + m_CopyAlphaCS: {fileID: 7200000, guid: c2c7eb6611725264187721ef9df0354b, type: 3} + m_NanKillerCS: {fileID: 7200000, guid: 83982f199acf927499576a99abc9bea9, type: 3} + m_ExposureCS: {fileID: 7200000, guid: 976d7bce54fae534fb9ec67e9c18570c, type: 3} + m_HistogramExposureCS: {fileID: 7200000, guid: 222da48299136f34b8e3fb75ae9f8ac7, type: 3} + m_ApplyExposureCS: {fileID: 7200000, guid: 1a6fea1dc099b984d8f2b27d504dc096, type: 3} + m_UberPostCS: {fileID: 7200000, guid: f1bf52f7c71bffd4f91e6cd90d12a4f7, type: 3} + m_LutBuilder3DCS: {fileID: 7200000, guid: 37f2b1b0ecd6f1c439e4c1b4f2fdb524, type: 3} + m_DepthOfFieldKernelCS: {fileID: 7200000, guid: 7869415cc3e4eaa4d82ac21a752a2780, type: 3} + m_DepthOfFieldCoCCS: {fileID: 7200000, guid: 048b235b54fbfaa4d80ec85ea847d4f8, type: 3} + m_DepthOfFieldCoCReprojectCS: {fileID: 7200000, guid: 4980decaa3878d6448569489f5fc7931, type: 3} + m_DepthOfFieldDilateCS: {fileID: 7200000, guid: 1c93af4338c0c1b42b92464992eebc10, type: 3} + m_DepthOfFieldMipCS: {fileID: 7200000, guid: d3ef53de069ded64e8377cba6eb951fa, type: 3} + m_DepthOfFieldMipSafeCS: {fileID: 7200000, guid: 2d24ee7b2c804d947a5c371c12ed46bd, type: 3} + m_DepthOfFieldPrefilterCS: {fileID: 7200000, guid: f2b89d19910854346b792fe7177ce634, type: 3} + m_DepthOfFieldTileMaxCS: {fileID: 7200000, guid: 84f84585ea8a7a849bea4a581adb93a7, type: 3} + m_DepthOfFieldGatherCS: {fileID: 7200000, guid: 486be52dddc4e054fb10a7b9b78788c2, type: 3} + m_DepthOfFieldCombineCS: {fileID: 7200000, guid: c8049ca85c4c7d047ba28f34d800c663, type: 3} + m_DepthOfFieldPreCombineFarCS: {fileID: 7200000, guid: 3b4a2acd03d1ce2438d93c325d588735, type: 3} + m_DepthOfFieldClearIndirectArgsCS: {fileID: 7200000, guid: 69905045e1d0a65458b205d6ab55502b, type: 3} + m_PaniniProjectionCS: {fileID: 7200000, guid: 0ddbf72c8fbb6e44b983f470c8384ef6, type: 3} + m_DofCircleOfConfusion: {fileID: 7200000, guid: 75332b7b315c80d4babe506820aa0bfd, type: 3} + m_DofGatherCS: {fileID: 7200000, guid: 1e6b16a7970a1494db74b1d3d007d1cc, type: 3} + m_DofCoCMinMaxCS: {fileID: 7200000, guid: c70dd492c3d2fe94589d6ca8d4e37915, type: 3} + m_DofMinMaxDilateCS: {fileID: 7200000, guid: 757a3f81b35177b44b2b178909b49172, type: 3} + m_DofCombineCS: {fileID: 7200000, guid: d9b940a90a2d0884f94990a0dde43a53, type: 3} + m_DofComputeSlowTilesCS: {fileID: 7200000, guid: b89f86a76de81ee42ae16daad78eb382, type: 3} + m_DofComputeApertureShapeCS: {fileID: 7200000, guid: dd5acecb27e20334fa3be332e85172df, type: 3} + m_MotionBlurMotionVecPrepCS: {fileID: 7200000, guid: ed9438fa777911d48933402087203b15, type: 3} + m_MotionBlurGenTileCS: {fileID: 7200000, guid: 336e1fdbb3a1b8647b06208415f87804, type: 3} + m_MotionBlurMergeTileCS: {fileID: 7200000, guid: cd14ddf849edeed43b0e3ccf66023038, type: 3} + m_MotionBlurNeighborhoodTileCS: {fileID: 7200000, guid: 5ea9865df3e53b448856785b88f8e7b9, type: 3} + m_MotionBlurCS: {fileID: 7200000, guid: 2af5c49c7865edb4b823826970ec176a, type: 3} + m_BloomPrefilterCS: {fileID: 7200000, guid: 243b24008041aaa4a91800690f63c684, type: 3} + m_BloomBlurCS: {fileID: 7200000, guid: 133a68380d324de4ea8d3ff8657b02d8, type: 3} + m_BloomUpsampleCS: {fileID: 7200000, guid: 5dbb0ac12cb11f84084b7e5633481bd1, type: 3} + m_DepthValuesPS: {fileID: 4800000, guid: 6e6a4a3dbb788234594aa74f2d6aeb6f, type: 3} + m_ColorResolvePS: {fileID: 4800000, guid: dd7047092f3c82b40b3a07868f9c4de2, type: 3} + m_ResolveMotionVecPS: {fileID: 4800000, guid: ea18ca9826385e943979c46cf98968cc, type: 3} + m_FXAACS: {fileID: 7200000, guid: 1535d29f35ea86b4282b6ca652002e2a, type: 3} + m_FinalPassPS: {fileID: 4800000, guid: 5ac9ef0c50282754b93c7692488e7ee7, type: 3} + m_ClearBlackPS: {fileID: 4800000, guid: 3330c1503ea8c6d4d9408df3f64227eb, type: 3} + m_SMAAPS: {fileID: 4800000, guid: 9655f4aa89a469c49aceaceabf9bc77b, type: 3} + m_TemporalAntialiasingPS: {fileID: 4800000, guid: 3dd9fd928fdb83743b1f27d15df22179, type: 3} + m_SharpeningCS: {fileID: 7200000, guid: 667941138a753f447bad3bf94052f590, type: 3} + m_LensFlareDataDrivenPS: {fileID: 4800000, guid: 85330b3de0cfebc4ba78b2d61b1a2899, type: 3} + m_LensFlareScreenSpacePS: {fileID: 4800000, guid: 97abfc9f0525e1849b417eaae10f0329, type: 3} + m_LensFlareMergeOcclusionCS: {fileID: 7200000, guid: 07492750f384d9a4da9aaf5d2feeed4a, type: 3} + m_DLSSBiasColorMaskPS: {fileID: 4800000, guid: 017a05924c0b0484ca29717ed0c60343, type: 3} + m_CompositeUIAndOETFApplyPS: {fileID: 4800000, guid: 08b7ad21d2b8e9142b730b22d7355821, type: 3} + m_ContrastAdaptiveSharpenCS: {fileID: 7200000, guid: 560896aec2f412c48995be35551a4ac6, type: 3} + m_EdgeAdaptiveSpatialUpsamplingCS: {fileID: 7200000, guid: f054fa9fe2c85bb42b9489e2f9ffb643, type: 3} + m_VTFeedbackDownsample: {fileID: 7200000, guid: 32d963548086c2c439aeb23a93e9a00a, type: 3} + m_AccumulationCS: {fileID: 7200000, guid: ed80add7a217efa468d137d6f7c668f3, type: 3} + m_BlitAndExposeCS: {fileID: 7200000, guid: 4b9a355e064de034dbfafe4583ba766b, type: 3} + m_AlphaInjectionPS: {fileID: 4800000, guid: 4edd96259a5e8b44c90479928f0cd11e, type: 3} + m_ChromaKeyingPS: {fileID: 4800000, guid: 49feb6b111e82ec4eb6d3d08e4b6903e, type: 3} + m_CustomClearPS: {fileID: 4800000, guid: 9cef3686fa32c8840947ed99b561195c, type: 3} + - rid: 5747374308318511113 + type: {class: DiffusionProfileDefaultSettings, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_Version: 0 + m_AutoRegisterDiffusionProfiles: 0 + - rid: 5747374308318511114 + type: {class: VolumetricCloudsRuntimeResources, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_VolumetricCloudsCS: {fileID: 7200000, guid: f911a8577fa9a4546a6b255bcf888baf, type: 3} + m_VolumetricCloudsTraceCS: {fileID: 7200000, guid: 66eaa9becc91a8646a88c15375af8b86, type: 3} + m_VolumetricCloudsTraceShadowsCS: {fileID: 7200000, guid: f350c5c3b41fd1b408aac9076f96610e, type: 3} + m_VolumetricCloudsShadowFilterCS: {fileID: 7200000, guid: 771ea9a52996c024095906ac37a8a71f, type: 3} + m_VolumetricCloudMapGeneratorCS: {fileID: 7200000, guid: 6b22771f0aa98744cb09f455a5a818cb, type: 3} + m_VolumetricCloudsCombinePS: {fileID: 4800000, guid: 12f1a69ddf916f042ae6ce8a994506f3, type: 3} + m_CloudLutRainAO: {fileID: 2800000, guid: e0bcfddf26ed5584ba3d8b94d3200114, type: 3} + m_WorleyNoise128RGBA: {fileID: 11700000, guid: 1fe54a721d0e2504e89f121c723404a8, type: 3} + m_WorleyNoise32RGB: {fileID: 11700000, guid: ec156c314a242914dbb706f73ad78cf2, type: 3} + m_PerlinNoise32RGB: {fileID: 11700000, guid: d1aae012f8a4f23478471851f17ff915, type: 3} + - rid: 5747374308318511115 + type: {class: HDRenderPipelineRuntimeMaterials, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_PBRSkyMaterial: {fileID: -876546973899608171, guid: 02532cbb810fb404db49da84f1efe41e, type: 3} + m_AreaLightMaterial: {fileID: 2100000, guid: ef5f65c980e25304098a95e28f3bd20b, type: 2} + m_AreaLightCookieMaterial: {fileID: 2100000, guid: 78c6825c5d9c3664f9879ae8609618c7, type: 2} + - rid: 5747374308318511116 + type: {class: AnalyticDerivativeSettings, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_Version: 0 + m_AnalyticDerivativeEmulation: 0 + m_AnalyticDerivativeDebugOutput: 0 + - rid: 5747374308318511117 + type: {class: SpecularFadeSettings, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_Version: 0 + m_SpecularFade: 0 + - rid: 5747374308318511118 + type: {class: HDRPDefaultVolumeProfileSettings, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_Version: 0 + m_VolumeProfile: {fileID: 11400000, guid: 14b392ee213d25a48b1feddbd9f5a9be, type: 2} + - rid: 5747374308318511119 + type: {class: WaterSystemRuntimeResources, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_WaterMaterial: {fileID: -876546973899608171, guid: 3fda5e465882bec4d8e64161b681806c, type: 3} + m_WaterExclusionMaterial: {fileID: 2100000, guid: 1e520c84f7fd17c46af5586f6632155c, type: 2} + m_WaterDecalMaterial: {fileID: -876546973899608171, guid: 7e2c0d424490bfc4698c37245b8c63ed, type: 3} + m_WaterSimulationCS: {fileID: 7200000, guid: 32ac7f445960a854595586a600c24034, type: 3} + m_FourierTransformCS: {fileID: 7200000, guid: bc2ee21836a0b5147900ef35a6e1f508, type: 3} + m_WaterEvaluationCS: {fileID: 7200000, guid: c24e765a2bbaace4d9a0ecec600e1967, type: 3} + m_WaterPS: {fileID: -6465566751694194690, guid: 3fda5e465882bec4d8e64161b681806c, type: 3} + m_WaterLightingCS: {fileID: 7200000, guid: 05d00ad19f202ee4891fdaa90d6d1b23, type: 3} + m_WaterLineCS: {fileID: 7200000, guid: 1e7e38362b5026d44ab4f3ff4a612026, type: 3} + m_WaterCausticsPS: {fileID: 4800000, guid: 020d64d10886f754e91664d240248c13, type: 3} + m_WaterDecalPS: {fileID: 4800000, guid: cf863cbd7bbd44a43b414caed214ba29, type: 3} + m_WaterDeformationCS: {fileID: 7200000, guid: 9b8063fa5834d4243bfca8c68a92d9f1, type: 3} + m_WaterFoamCS: {fileID: 7200000, guid: 0d16d14b783e65f4d81dbcece2bd0ef9, type: 3} + m_WaterDecalMigrationShader: {fileID: -6465566751694194690, guid: 9f1661ed5b4d6ee4685ad5683b09a903, type: 3} + m_FoamMask: {fileID: 2800000, guid: ca1d72d84c34dba4390eab4c86e62f62, type: 3} + - rid: 5747374308318511120 + type: {class: HDRenderingLayersLimitSettings, ns: UnityEditor.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Editor} + data: + m_Version: 0 + - rid: 5747374308318511121 + type: {class: RenderGraphGlobalSettings, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} + data: + m_version: 0 + m_EnableCompilationCaching: 1 + m_EnableValidityChecks: 1 + - rid: 5747374308318511122 + type: {class: RenderGraphUtilsResources, ns: UnityEngine.Rendering.RenderGraphModule.Util, asm: Unity.RenderPipelines.Core.Runtime} + data: + m_Version: 0 + m_CoreCopyPS: {fileID: 4800000, guid: 12dc59547ea167a4ab435097dd0f9add, type: 3} + - rid: 5747374308318511123 + type: {class: ProbeVolumeDebugResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} + data: + m_Version: 1 + probeVolumeDebugShader: {fileID: 4800000, guid: 3b21275fd12d65f49babb5286f040f2d, type: 3} + probeVolumeFragmentationDebugShader: {fileID: 4800000, guid: 3a80877c579b9144ebdcc6d923bca303, type: 3} + probeVolumeSamplingDebugShader: {fileID: 4800000, guid: bf54e6528c79a224e96346799064c393, type: 3} + probeVolumeOffsetDebugShader: {fileID: 4800000, guid: db8bd7436dc2c5f4c92655307d198381, type: 3} + probeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 20be25aac4e22ee49a7db76fb3df6de2, type: 3} + numbersDisplayTex: {fileID: 2800000, guid: 73fe53b428c5b3440b7e87ee830b608a, type: 3} + - rid: 5747374308318511124 + type: {class: ProbeVolumeRuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} + data: + m_Version: 1 + probeVolumeBlendStatesCS: {fileID: 7200000, guid: a3f7b8c99de28a94684cb1daebeccf5d, type: 3} + probeVolumeUploadDataCS: {fileID: 7200000, guid: 0951de5992461754fa73650732c4954c, type: 3} + probeVolumeUploadDataL2CS: {fileID: 7200000, guid: 6196f34ed825db14b81fb3eb0ea8d931, type: 3} + - rid: 5747374308318511125 + type: {class: ProbeVolumeBakingResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} + data: + m_Version: 1 + dilationShader: {fileID: 7200000, guid: 6bb382f7de370af41b775f54182e491d, type: 3} + subdivideSceneCS: {fileID: 7200000, guid: bb86f1f0af829fd45b2ebddda1245c22, type: 3} + voxelizeSceneShader: {fileID: 4800000, guid: c8b6a681c7b4e2e4785ffab093907f9e, type: 3} + traceVirtualOffsetCS: {fileID: -6772857160820960102, guid: ff2cbab5da58bf04d82c5f34037ed123, type: 3} + traceVirtualOffsetRT: {fileID: -5126288278712620388, guid: ff2cbab5da58bf04d82c5f34037ed123, type: 3} + skyOcclusionCS: {fileID: -6772857160820960102, guid: 5a2a534753fbdb44e96c3c78b5a6999d, type: 3} + skyOcclusionRT: {fileID: -5126288278712620388, guid: 5a2a534753fbdb44e96c3c78b5a6999d, type: 3} + renderingLayerCS: {fileID: -6772857160820960102, guid: 94a070d33e408384bafc1dea4a565df9, type: 3} + renderingLayerRT: {fileID: -5126288278712620388, guid: 94a070d33e408384bafc1dea4a565df9, type: 3} + - rid: 5747374308318511126 + type: {class: STP/RuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} + data: + m_setupCS: {fileID: 7200000, guid: 33be2e9a5506b2843bdb2bdff9cad5e1, type: 3} + m_preTaaCS: {fileID: 7200000, guid: a679dba8ec4d9ce45884a270b0e22dda, type: 3} + m_taaCS: {fileID: 7200000, guid: 3923900e2b41b5e47bc25bfdcbcdc9e6, type: 3} + - rid: 5747374308318511127 + type: {class: ProbeVolumeGlobalSettings, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} + data: + m_Version: 1 + m_ProbeVolumeDisableStreamingAssets: 0 + - rid: 5747374308318511128 + type: {class: ShaderStrippingSetting, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} + data: + m_Version: 0 + m_ExportShaderVariants: 1 + m_ShaderVariantLogLevel: 0 + m_StripRuntimeDebugShaders: 0 - rid: 8556427327610290176 - type: {class: HDRenderPipelineRuntimeAssets, ns: UnityEngine.Rendering.HighDefinition, - asm: Unity.RenderPipelines.HighDefinition.Runtime} - data: - m_DefaultDiffusionProfile: {fileID: 11400000, guid: 2b7005ba3a4d8474b8cdc34141ad766e, - type: 2} - m_EmissiveCylinderMesh: {fileID: 2534964839176971238, guid: accb6d90f0d50fe4ca0f68159b4323de, - type: 3} - m_EmissiveQuadMesh: {fileID: 4300000, guid: 1d5a8595286f94f4bb54171d49f473c3, - type: 3} + type: {class: HDRenderPipelineRuntimeAssets, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_DefaultDiffusionProfile: {fileID: 11400000, guid: 2b7005ba3a4d8474b8cdc34141ad766e, type: 2} + m_ComputeMaterialLibrary: {fileID: 11400000, guid: 833ab0ec618db411699ea8cb1a221d0d, type: 2} + m_EmissiveCylinderMesh: {fileID: 2534964839176971238, guid: accb6d90f0d50fe4ca0f68159b4323de, type: 3} + m_EmissiveQuadMesh: {fileID: 4300000, guid: 1d5a8595286f94f4bb54171d49f473c3, type: 3} m_SphereMesh: {fileID: 4300000, guid: 9e0af751bc36ea146940ba245193e28c, type: 3} - m_ProbeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 20be25aac4e22ee49a7db76fb3df6de2, - type: 3} - rid: 8556427327610290177 - type: {class: HDRenderPipelineEditorTextures, ns: UnityEngine.Rendering.HighDefinition, - asm: Unity.RenderPipelines.HighDefinition.Runtime} + type: {class: HDRenderPipelineEditorTextures, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} data: m_MoonAlbedo: {fileID: 2800000, guid: cce9f0cf7e606e547a7317aedb4ad6d9, type: 3} - rid: 8556427327610290178 - type: {class: HDRPRayTracingResources, ns: UnityEngine.Rendering.HighDefinition, - asm: Unity.RenderPipelines.HighDefinition.Runtime} - data: - m_ReflectionRayTracingRT: {fileID: 4807578003741378534, guid: 1a500e5079fba734aa90fe92e70ea131, - type: 3} - m_ReflectionRayTracingCS: {fileID: 7200000, guid: 591207652a75a4844a89c0b9f45a61f2, - type: 3} - m_ReflectionBilateralFilterCS: {fileID: 7200000, guid: 07c445e7aa373284a9cc1584ca9b3f84, - type: 3} - m_ShadowRayTracingRT: {fileID: 4807578003741378534, guid: 6f93cb4dc095de14993f8d2baa972d5b, - type: 3} - m_ContactShadowRayTracingRT: {fileID: 4807578003741378534, guid: acaf840af875ab541b8f10069b7444c8, - type: 3} - m_ShadowRayTracingCS: {fileID: 7200000, guid: fc95b5dff16ba594896e211a389c03fc, - type: 3} - m_ShadowFilterCS: {fileID: 7200000, guid: f71fd853a538bf74e9e5a7228fc14dae, - type: 3} - m_ForwardRayTracing: {fileID: 4807578003741378534, guid: d3a89a2d3f73b3e4da6f191e844fe68c, - type: 3} - m_LightClusterBuildCS: {fileID: 7200000, guid: c0625ea908b52854bbf1d456e34026e4, - type: 3} - m_LightClusterDebugS: {fileID: 4800000, guid: c4d81c6e573560444bb1ea11ae4acfcb, - type: 3} - m_LightClusterDebugCS: {fileID: 7200000, guid: d48a3a5496d98a44c89f335934805d10, - type: 3} - m_IndirectDiffuseRayTracingOffRT: {fileID: 4807578003741378534, guid: fbcaf423d9f8e3843b2c046420608293, - type: 3} - m_IndirectDiffuseRayTracingL1RT: {fileID: 4807578003741378534, guid: 653044b9878c5764e818b20399112284, - type: 3} - m_IndirectDiffuseRaytracingL2RT: {fileID: 4807578003741378534, guid: 866a72c4868acec4088b0956b9ca73f9, - type: 3} - m_IndirectDiffuseRayTracingCS: {fileID: 7200000, guid: c5ad968b7cd39114d85dd860b3809087, - type: 3} - m_AoRayTracingRT: {fileID: 4807578003741378534, guid: 82dc8cd069971d2488c502b0f32b94fb, - type: 3} - m_AoRayTracingCS: {fileID: 7200000, guid: 10c05366baf9b0a44a827f3ef890b9e6, - type: 3} - m_SubSurfaceRayTracingRT: {fileID: 4807578003741378534, guid: b29a18f967c92364492508dddf78cff7, - type: 3} - m_SubSurfaceRayTracingCS: {fileID: 7200000, guid: 4e5684a8dba46fe42a47642f9b0a6b89, - type: 3} - m_SimpleDenoiserCS: {fileID: 7200000, guid: 74a980f1da9a4f842996035350fe756c, - type: 3} - m_ReflectionDenoiserCS: {fileID: 7200000, guid: 1b12fb238086d0f49983b4aa72768349, - type: 3} - m_DiffuseShadowDenoiserCS: {fileID: 7200000, guid: 9af806eab5889a74dad838edc9b07d07, - type: 3} - m_ReblurPreBlurCS: {fileID: 7200000, guid: 0be88ddf5240d49468d9159340465bfd, - type: 3} - m_ReblurTemporalAccumulationCS: {fileID: 7200000, guid: 11794ae415a38c747ba65d57d1bb60f9, - type: 3} - m_ReblurMipGenerationCS: {fileID: 7200000, guid: 44195ddb6d9240646847cbf4f38dfa98, - type: 3} - m_ReblurHistoryFixCS: {fileID: 7200000, guid: 4cc204b99166a9c40819bc04927c4feb, - type: 3} - m_ReblurBlurCS: {fileID: 7200000, guid: cff077c60ac76074893014e2f49e3159, - type: 3} - m_ReblurPostBlurCS: {fileID: 7200000, guid: 965700f9b9e0fec4bb31415ae91f0e09, - type: 3} - m_ReblurCopyHistoryCS: {fileID: 7200000, guid: 0d5230c403883b84cbf9d1d3b9e57beb, - type: 3} - m_ReblurTemporalStabilizationCS: {fileID: 7200000, guid: 4feaa605aeff33840b659850ce6bfcc2, - type: 3} - m_GBufferRayTracingRT: {fileID: 4807578003741378534, guid: e4c61a77b91f35845bbb546b848b18e5, - type: 3} - m_DeferredRayTracingCS: {fileID: 7200000, guid: 6e5ef632062bc484f812c7976f450ed1, - type: 3} - m_PathTracingRT: {fileID: 4807578003741378534, guid: c4f4525a058009a409fea974f9ad8d03, - type: 3} - m_PathTracingSkySamplingDataCS: {fileID: 7200000, guid: 8ef71a4b666992544ac5575a0e599a68, - type: 3} - m_RayMarchingCS: {fileID: 7200000, guid: 78d9a89700295a4418d0921bf27e1857, - type: 3} - m_RayBinningCS: {fileID: 7200000, guid: cddcb515ffe9a914893d6d8fc1d85454, - type: 3} - m_CountTracedRaysCS: {fileID: 7200000, guid: e1f3fa867f1dfbd4ab7dd4d39d2b96d8, - type: 3} - m_ReflectionFilterMappingTexture: {fileID: 2800000, guid: 82eec49626a00b047ba86244607816c8, - type: 3} - m_RtasDebugRT: {fileID: 4807578003741378534, guid: 7f98079d20376fd4f8590d58be99ab0d, - type: 3} + type: {class: HDRPRayTracingResources, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_ReflectionRayTracingRT: {fileID: 4807578003741378534, guid: 1a500e5079fba734aa90fe92e70ea131, type: 3} + m_ReflectionRayTracingCS: {fileID: 7200000, guid: 591207652a75a4844a89c0b9f45a61f2, type: 3} + m_ReflectionBilateralFilterCS: {fileID: 7200000, guid: 07c445e7aa373284a9cc1584ca9b3f84, type: 3} + m_ShadowRayTracingRT: {fileID: 4807578003741378534, guid: 6f93cb4dc095de14993f8d2baa972d5b, type: 3} + m_ContactShadowRayTracingRT: {fileID: 4807578003741378534, guid: acaf840af875ab541b8f10069b7444c8, type: 3} + m_ShadowRayTracingCS: {fileID: 7200000, guid: fc95b5dff16ba594896e211a389c03fc, type: 3} + m_ShadowFilterCS: {fileID: 7200000, guid: f71fd853a538bf74e9e5a7228fc14dae, type: 3} + m_ForwardRayTracing: {fileID: 4807578003741378534, guid: d3a89a2d3f73b3e4da6f191e844fe68c, type: 3} + m_LightClusterBuildCS: {fileID: 7200000, guid: c0625ea908b52854bbf1d456e34026e4, type: 3} + m_LightClusterDebugS: {fileID: 4800000, guid: c4d81c6e573560444bb1ea11ae4acfcb, type: 3} + m_LightClusterDebugCS: {fileID: 7200000, guid: d48a3a5496d98a44c89f335934805d10, type: 3} + m_IndirectDiffuseRayTracingOffRT: {fileID: 4807578003741378534, guid: fbcaf423d9f8e3843b2c046420608293, type: 3} + m_IndirectDiffuseRayTracingL1RT: {fileID: 4807578003741378534, guid: 653044b9878c5764e818b20399112284, type: 3} + m_IndirectDiffuseRaytracingL2RT: {fileID: 4807578003741378534, guid: 866a72c4868acec4088b0956b9ca73f9, type: 3} + m_IndirectDiffuseRayTracingCS: {fileID: 7200000, guid: c5ad968b7cd39114d85dd860b3809087, type: 3} + m_AoRayTracingRT: {fileID: 4807578003741378534, guid: 82dc8cd069971d2488c502b0f32b94fb, type: 3} + m_AoRayTracingCS: {fileID: 7200000, guid: 10c05366baf9b0a44a827f3ef890b9e6, type: 3} + m_SubSurfaceRayTracingRT: {fileID: 4807578003741378534, guid: b29a18f967c92364492508dddf78cff7, type: 3} + m_SubSurfaceRayTracingCS: {fileID: 7200000, guid: 4e5684a8dba46fe42a47642f9b0a6b89, type: 3} + m_SimpleDenoiserCS: {fileID: 7200000, guid: 74a980f1da9a4f842996035350fe756c, type: 3} + m_ReflectionDenoiserCS: {fileID: 7200000, guid: 1b12fb238086d0f49983b4aa72768349, type: 3} + m_DiffuseShadowDenoiserCS: {fileID: 7200000, guid: 9af806eab5889a74dad838edc9b07d07, type: 3} + m_ReblurPreBlurCS: {fileID: 7200000, guid: 0be88ddf5240d49468d9159340465bfd, type: 3} + m_ReblurTemporalAccumulationCS: {fileID: 7200000, guid: 11794ae415a38c747ba65d57d1bb60f9, type: 3} + m_ReblurMipGenerationCS: {fileID: 7200000, guid: 44195ddb6d9240646847cbf4f38dfa98, type: 3} + m_ReblurHistoryFixCS: {fileID: 7200000, guid: 4cc204b99166a9c40819bc04927c4feb, type: 3} + m_ReblurBlurCS: {fileID: 7200000, guid: cff077c60ac76074893014e2f49e3159, type: 3} + m_ReblurPostBlurCS: {fileID: 7200000, guid: 965700f9b9e0fec4bb31415ae91f0e09, type: 3} + m_ReblurCopyHistoryCS: {fileID: 7200000, guid: 0d5230c403883b84cbf9d1d3b9e57beb, type: 3} + m_ReblurTemporalStabilizationCS: {fileID: 7200000, guid: 4feaa605aeff33840b659850ce6bfcc2, type: 3} + m_GBufferRayTracingRT: {fileID: 4807578003741378534, guid: e4c61a77b91f35845bbb546b848b18e5, type: 3} + m_DeferredRayTracingCS: {fileID: 7200000, guid: 6e5ef632062bc484f812c7976f450ed1, type: 3} + m_PathTracingRT: {fileID: 4807578003741378534, guid: c4f4525a058009a409fea974f9ad8d03, type: 3} + m_PathTracingSkySamplingDataCS: {fileID: 7200000, guid: 8ef71a4b666992544ac5575a0e599a68, type: 3} + m_RayMarchingCS: {fileID: 7200000, guid: 78d9a89700295a4418d0921bf27e1857, type: 3} + m_RayBinningCS: {fileID: 7200000, guid: cddcb515ffe9a914893d6d8fc1d85454, type: 3} + m_CountTracedRaysCS: {fileID: 7200000, guid: e1f3fa867f1dfbd4ab7dd4d39d2b96d8, type: 3} + m_ReflectionFilterMappingTexture: {fileID: 2800000, guid: 82eec49626a00b047ba86244607816c8, type: 3} + m_RtasDebugRT: {fileID: 4807578003741378534, guid: 7f98079d20376fd4f8590d58be99ab0d, type: 3} - rid: 8556427327610290179 - type: {class: HDRenderPipelineEditorMaterials, ns: UnityEngine.Rendering.HighDefinition, - asm: Unity.RenderPipelines.HighDefinition.Runtime} - data: - m_DefaultMaterial: {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, - type: 2} - m_DefaultParticleMaterial: {fileID: 2100000, guid: b739a3f02ff77bf48b7636e64c3e3b4c, - type: 2} - m_DefaultTerrainMaterial: {fileID: 2100000, guid: 22ff8771d87ef27429e670136399094b, - type: 2} - m_DefaultMirrorMat: {fileID: 2100000, guid: 6b17274157b33bc45b6a40e7d4ff51fe, - type: 2} - m_DefaultDecalMat: {fileID: 2100000, guid: 500e733574922d04ea961553b1b26a63, - type: 2} - m_GUITextureBlit2SRGB: {fileID: 2100000, guid: 6e95c04e4e686554e8bed96ee69f690c, - type: 2} + type: {class: HDRenderPipelineEditorMaterials, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_DefaultMaterial: {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} + m_DefaultParticleMaterial: {fileID: 2100000, guid: b739a3f02ff77bf48b7636e64c3e3b4c, type: 2} + m_DefaultTerrainMaterial: {fileID: 2100000, guid: 22ff8771d87ef27429e670136399094b, type: 2} + m_DefaultMirrorMat: {fileID: 2100000, guid: 6b17274157b33bc45b6a40e7d4ff51fe, type: 2} + m_DefaultDecalMat: {fileID: 2100000, guid: 500e733574922d04ea961553b1b26a63, type: 2} + m_GUITextureBlit2SRGB: {fileID: 2100000, guid: 6e95c04e4e686554e8bed96ee69f690c, type: 2} - rid: 8556427327610290180 - type: {class: HDRenderPipelineRuntimeTextures, ns: UnityEngine.Rendering.HighDefinition, - asm: Unity.RenderPipelines.HighDefinition.Runtime} + type: {class: HDRenderPipelineRuntimeTextures, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} data: - m_DebugFontTex: {fileID: 2800000, guid: a3ad2df0e49aaa341a3b3a80f93b3f66, - type: 3} - m_ColorGradient: {fileID: 2800000, guid: 4ea52e665573c1644bf05dd9b11fd2a4, - type: 3} + m_DebugFontTex: {fileID: 2800000, guid: a3ad2df0e49aaa341a3b3a80f93b3f66, type: 3} + m_ColorGradient: {fileID: 2800000, guid: 4ea52e665573c1644bf05dd9b11fd2a4, type: 3} m_MatcapTex: {fileID: 2800000, guid: e655445a13b501944a2641ea144edda5, type: 3} m_BlueNoise16LTex: - {fileID: 2800000, guid: efa2ea5416a18da46b64f1266464ffc7, type: 3} @@ -415,41 +782,19 @@ MonoBehaviour: - {fileID: 2800000, guid: 7641a2b116fafd64d9c3d6459fdfe801, type: 3} - {fileID: 2800000, guid: c6a5e40e6746fef4fa486e8f620ee8d4, type: 3} - {fileID: 2800000, guid: fd4189357c6dfb94fa2d36afbce72086, type: 3} - m_OwenScrambledRGBATex: {fileID: 2800000, guid: b0fe077c1ee7d80428f3d8dfa28a027d, - type: 3} - m_OwenScrambled256Tex: {fileID: 2800000, guid: 2a205358e67aa9e4a94a128ac9362f4e, - type: 3} - m_ScramblingTex: {fileID: 2800000, guid: bf25cd6288e2c8d43854a61a8496a830, - type: 3} - m_RankingTile1SPP: {fileID: 2800000, guid: f2fe0251f704c4c478a8063775cffedb, - type: 3} - m_ScramblingTile1SPP: {fileID: 2800000, guid: 6185473f62ad3e74da4acac5d482917a, - type: 3} - m_RankingTile8SPP: {fileID: 2800000, guid: af4bd638a4b3eb14781e6441adcdfbb9, - type: 3} - m_ScramblingTile8SPP: {fileID: 2800000, guid: 152f8b933250a7b448fc2d4d301b9944, - type: 3} - m_RankingTile256SPP: {fileID: 2800000, guid: 1e604a266c415cd46b36d97cd9220aa8, - type: 3} - m_ScramblingTile256SPP: {fileID: 2800000, guid: 882fb55d7b3e7c94598a318df9376e32, - type: 3} - m_EyeCausticLUT: {fileID: 11700000, guid: d4ec12283a044584794485916f4142a9, - type: 3} - m_HairAttenuationLUT: {fileID: 11700000, guid: d37662e2b254e594abf839dddc5ab653, - type: 2} - m_HairAzimuthalScatteringLUT: {fileID: 11700000, guid: d217deac7ff61094080126811521ab5b, - type: 2} - m_HairLongitudinalScatteringLUT: {fileID: 11700000, guid: 0da412d38ea6ba3459322abe6984ca9b, - type: 2} - m_CloudLutRainAO: {fileID: 2800000, guid: e0bcfddf26ed5584ba3d8b94d3200114, - type: 3} - m_WorleyNoise128RGBA: {fileID: 11700000, guid: 1fe54a721d0e2504e89f121c723404a8, - type: 3} - m_WorleyNoise32RGB: {fileID: 11700000, guid: ec156c314a242914dbb706f73ad78cf2, - type: 3} - m_PerlinNoise32RGB: {fileID: 11700000, guid: d1aae012f8a4f23478471851f17ff915, - type: 3} - m_FoamMask: {fileID: 2800000, guid: ca1d72d84c34dba4390eab4c86e62f62, type: 3} + m_OwenScrambledRGBATex: {fileID: 2800000, guid: b0fe077c1ee7d80428f3d8dfa28a027d, type: 3} + m_OwenScrambled256Tex: {fileID: 2800000, guid: 2a205358e67aa9e4a94a128ac9362f4e, type: 3} + m_ScramblingTex: {fileID: 2800000, guid: bf25cd6288e2c8d43854a61a8496a830, type: 3} + m_RankingTile1SPP: {fileID: 2800000, guid: f2fe0251f704c4c478a8063775cffedb, type: 3} + m_ScramblingTile1SPP: {fileID: 2800000, guid: 6185473f62ad3e74da4acac5d482917a, type: 3} + m_RankingTile8SPP: {fileID: 2800000, guid: af4bd638a4b3eb14781e6441adcdfbb9, type: 3} + m_ScramblingTile8SPP: {fileID: 2800000, guid: 152f8b933250a7b448fc2d4d301b9944, type: 3} + m_RankingTile256SPP: {fileID: 2800000, guid: 1e604a266c415cd46b36d97cd9220aa8, type: 3} + m_ScramblingTile256SPP: {fileID: 2800000, guid: 882fb55d7b3e7c94598a318df9376e32, type: 3} + m_EyeCausticLUT: {fileID: 11700000, guid: d4ec12283a044584794485916f4142a9, type: 3} + m_HairAttenuationLUT: {fileID: 11700000, guid: d37662e2b254e594abf839dddc5ab653, type: 2} + m_HairAzimuthalScatteringLUT: {fileID: 11700000, guid: d217deac7ff61094080126811521ab5b, type: 2} + m_HairLongitudinalScatteringLUT: {fileID: 11700000, guid: 0da412d38ea6ba3459322abe6984ca9b, type: 2} m_FilmGrainTex: - {fileID: 2800000, guid: 284a1ac236869fa4eacf377d73c7dff8, type: 3} - {fileID: 2800000, guid: bd74961b009b93145a998ae93a5fc186, type: 3} @@ -461,39 +806,32 @@ MonoBehaviour: - {fileID: 2800000, guid: a187955d1d88a954cb32c3c4e5f0aeda, type: 3} - {fileID: 2800000, guid: 3f3cb0f4924d7a241b82a9081875f30d, type: 3} - {fileID: 2800000, guid: a35bdcb2008832646b3c8d2eb11e38a9, type: 3} - m_SMAASearchTex: {fileID: 2800000, guid: dc95d70472e232b438d0fd38651e7ec2, - type: 3} + m_SMAASearchTex: {fileID: 2800000, guid: dc95d70472e232b438d0fd38651e7ec2, type: 3} m_SMAAAreaTex: {fileID: 2800000, guid: 92e0d85ab4eca874098e7fcf6f8f674e, type: 3} - m_DefaultHDRISky: {fileID: 8900000, guid: 8253d41e6e8b11a4cbe77a4f8f82934d, - type: 3} - m_DefaultCloudMap: {fileID: 2800000, guid: 57a33fc2476a01644865bfde5f06e2f4, - type: 3} - m_NumbersDisplayTex: {fileID: 2800000, guid: 73fe53b428c5b3440b7e87ee830b608a, - type: 3} + m_DefaultHDRISky: {fileID: 8900000, guid: 8253d41e6e8b11a4cbe77a4f8f82934d, type: 3} + m_DefaultCloudMap: {fileID: 2800000, guid: 57a33fc2476a01644865bfde5f06e2f4, type: 3} - rid: 8556427327610290181 - type: {class: HDRenderPipelineEditorShaders, ns: UnityEngine.Rendering.HighDefinition, - asm: Unity.RenderPipelines.HighDefinition.Runtime} - data: - m_GpuInlineDebugDrawerLine: {fileID: 4800000, guid: 039c5248164c71b4aa6d780131c1bfaf, - type: 3} - m_AutodeskInteractive: {fileID: 4800000, guid: 7252379db4c18b641b517f2c91bb57e1, - type: 3} - m_AutodeskInteractiveTransparent: {fileID: 4800000, guid: ee2ce0be66f45d9449d71ba9b49c2acd, - type: 3} - m_AutodeskInteractiveMasked: {fileID: 4800000, guid: 29c4adff654862b40a2e9fb2015a42c3, - type: 3} - m_DefaultSpeedTree8Shader: {fileID: -6465566751694194690, guid: 4819724840ee9444f9da841b477038ce, - type: 3} + type: {class: HDRenderPipelineEditorShaders, ns: UnityEngine.Rendering.HighDefinition, asm: Unity.RenderPipelines.HighDefinition.Runtime} + data: + m_GpuInlineDebugDrawerLine: {fileID: 4800000, guid: 039c5248164c71b4aa6d780131c1bfaf, type: 3} + m_AutodeskInteractive: {fileID: 4800000, guid: 7252379db4c18b641b517f2c91bb57e1, type: 3} + m_AutodeskInteractiveTransparent: {fileID: 4800000, guid: ee2ce0be66f45d9449d71ba9b49c2acd, type: 3} + m_AutodeskInteractiveMasked: {fileID: 4800000, guid: 29c4adff654862b40a2e9fb2015a42c3, type: 3} + m_DefaultSpeedTree8Shader: {fileID: -6465566751694194690, guid: 4819724840ee9444f9da841b477038ce, type: 3} + m_DefaultSpeedTree9Shader: {fileID: -6465566751694194690, guid: d81c74dd5f463104ca482aa23ef2c798, type: 3} - rid: 8556427327610290182 type: {class: GPUResidentDrawerResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.GPUDriven.Runtime} data: m_Version: 0 - m_InstanceDataBufferCopyKernels: {fileID: 7200000, guid: f984aeb540ded8b4fbb8a2047ab5b2e2, - type: 3} - m_InstanceDataBufferUploadKernels: {fileID: 7200000, guid: 53864816eb00f2343b60e1a2c5a262ef, - type: 3} - m_TransformUpdaterKernels: {fileID: 7200000, guid: 2a567b9b2733f8d47a700c3c85bed75b, - type: 3} + m_InstanceDataBufferCopyKernels: {fileID: 7200000, guid: f984aeb540ded8b4fbb8a2047ab5b2e2, type: 3} + m_InstanceDataBufferUploadKernels: {fileID: 7200000, guid: 53864816eb00f2343b60e1a2c5a262ef, type: 3} + m_TransformUpdaterKernels: {fileID: 7200000, guid: 2a567b9b2733f8d47a700c3c85bed75b, type: 3} + m_WindDataUpdaterKernels: {fileID: 7200000, guid: fde76746e4fd0ed418c224f6b4084114, type: 3} + m_OccluderDepthPyramidKernels: {fileID: 7200000, guid: 08b2b5fb307b0d249860612774a987da, type: 3} + m_InstanceOcclusionCullingKernels: {fileID: 7200000, guid: f6d223acabc2f974795a5a7864b50e6c, type: 3} + m_OcclusionCullingDebugKernels: {fileID: 7200000, guid: b23e766bcf50ca4438ef186b174557df, type: 3} + m_DebugOcclusionTestPS: {fileID: 4800000, guid: d3f0849180c2d0944bc71060693df100, type: 3} + m_DebugOccluderPS: {fileID: 4800000, guid: b3c92426a88625841ab15ca6a7917248, type: 3} - rid: 8556427327610290183 type: {class: IncludeAdditionalRPAssets, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} data: diff --git a/Templates/com.unity.template.hdrp-blank/Packages/com.unity.template.hdrp-blank/CHANGELOG.md b/Templates/com.unity.template.hdrp-blank/Packages/com.unity.template.hdrp-blank/CHANGELOG.md index be8a1ec3219..9bd0b9bc730 100644 --- a/Templates/com.unity.template.hdrp-blank/Packages/com.unity.template.hdrp-blank/CHANGELOG.md +++ b/Templates/com.unity.template.hdrp-blank/Packages/com.unity.template.hdrp-blank/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project template will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [17.1.0] - 2025-12-23 + +### Changed + +- Upgraded project to 6.0.62f1 LTS +- Set GPU Resident Drawer to Enabled on the RP Assets +- Set the scene to the scene template outdoors. + ## [17.0.7] - 2025-01-27 ### Changed diff --git a/Templates/com.unity.template.hdrp-blank/Packages/com.unity.template.hdrp-blank/ValidationExceptions.json b/Templates/com.unity.template.hdrp-blank/Packages/com.unity.template.hdrp-blank/ValidationExceptions.json index 29831fce5bb..d7be6a49ea4 100644 --- a/Templates/com.unity.template.hdrp-blank/Packages/com.unity.template.hdrp-blank/ValidationExceptions.json +++ b/Templates/com.unity.template.hdrp-blank/Packages/com.unity.template.hdrp-blank/ValidationExceptions.json @@ -2,7 +2,7 @@ "ErrorExceptions": [ { "ValidationTest": "Primed Library Validation", - "PackageVersion": "17.0.7" + "PackageVersion": "17.1.0" } ], "WarningExceptions": [] diff --git a/Templates/com.unity.template.hdrp-blank/Packages/com.unity.template.hdrp-blank/package.json b/Templates/com.unity.template.hdrp-blank/Packages/com.unity.template.hdrp-blank/package.json index 03229708288..1c47d304360 100644 --- a/Templates/com.unity.template.hdrp-blank/Packages/com.unity.template.hdrp-blank/package.json +++ b/Templates/com.unity.template.hdrp-blank/Packages/com.unity.template.hdrp-blank/package.json @@ -1,18 +1,18 @@ { "name": "com.unity.template.hdrp-blank", "displayName":"3D HDRP", - "version": "17.0.7", + "version": "17.1.0", "type": "template", "host": "hub", - "unity": "2023.3", + "unity": "6000.3", "description": "This template includes the settings and assets you need to start creating with the High Definition Render Pipeline (HDRP).", "dependencies": { - "com.unity.collab-proxy": "2.2.0", + "com.unity.collab-proxy": "2.10.0", "com.unity.feature.development": "1.0.2", - "com.unity.render-pipelines.high-definition": "17.0.1", - "com.unity.timeline": "1.8.6", + "com.unity.render-pipelines.high-definition": "17.0.4", + "com.unity.timeline": "1.8.9", "com.unity.ugui": "2.0.0", - "com.unity.visualscripting": "1.9.1", - "com.unity.inputsystem": "1.12.0" + "com.unity.visualscripting": "1.9.7", + "com.unity.inputsystem": "1.14.2" } } diff --git a/Templates/com.unity.template.hdrp-blank/Packages/manifest.json b/Templates/com.unity.template.hdrp-blank/Packages/manifest.json index 19b94f2139a..545b906995c 100644 --- a/Templates/com.unity.template.hdrp-blank/Packages/manifest.json +++ b/Templates/com.unity.template.hdrp-blank/Packages/manifest.json @@ -1,12 +1,13 @@ { "dependencies": { - "com.unity.collab-proxy": "2.2.0", + "com.unity.collab-proxy": "2.10.0", "com.unity.feature.development": "1.0.2", - "com.unity.inputsystem": "1.12.0", - "com.unity.render-pipelines.high-definition": "17.0.1", - "com.unity.timeline": "1.8.6", + "com.unity.inputsystem": "1.14.2", + "com.unity.multiplayer.center": "1.0.0", + "com.unity.render-pipelines.high-definition": "17.0.4", + "com.unity.timeline": "1.8.9", "com.unity.ugui": "2.0.0", - "com.unity.visualscripting": "1.9.1", + "com.unity.visualscripting": "1.9.7", "com.unity.modules.accessibility": "1.0.0" } } diff --git a/Templates/com.unity.template.hdrp-blank/Packages/packages-lock.json b/Templates/com.unity.template.hdrp-blank/Packages/packages-lock.json index cf5e129a5d3..6cf798efa8d 100644 --- a/Templates/com.unity.template.hdrp-blank/Packages/packages-lock.json +++ b/Templates/com.unity.template.hdrp-blank/Packages/packages-lock.json @@ -1,29 +1,32 @@ { "dependencies": { "com.unity.burst": { - "version": "1.8.9", - "depth": 1, + "version": "1.8.25", + "depth": 2, "source": "registry", "dependencies": { - "com.unity.mathematics": "1.2.1" + "com.unity.mathematics": "1.2.1", + "com.unity.modules.jsonserialize": "1.0.0" }, "url": "https://packages.unity.com" }, "com.unity.collab-proxy": { - "version": "2.2.0", + "version": "2.10.0", "depth": 0, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, "com.unity.collections": { - "version": "2.2.0", - "depth": 1, + "version": "2.6.2", + "depth": 2, "source": "registry", "dependencies": { - "com.unity.burst": "1.8.4", - "com.unity.modules.unityanalytics": "1.0.0", - "com.unity.nuget.mono-cecil": "1.11.4" + "com.unity.burst": "1.8.23", + "com.unity.mathematics": "1.3.2", + "com.unity.test-framework": "1.4.6", + "com.unity.nuget.mono-cecil": "1.11.5", + "com.unity.test-framework.performance": "3.0.3" }, "url": "https://packages.unity.com" }, @@ -37,25 +40,24 @@ "com.unity.ext.nunit": { "version": "2.0.5", "depth": 2, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" + "source": "builtin", + "dependencies": {} }, "com.unity.feature.development": { "version": "1.0.2", "depth": 0, "source": "builtin", "dependencies": { - "com.unity.ide.visualstudio": "2.0.22", - "com.unity.ide.rider": "3.0.26", + "com.unity.ide.visualstudio": "2.0.25", + "com.unity.ide.rider": "3.0.38", "com.unity.editorcoroutines": "1.0.0", - "com.unity.performance.profile-analyzer": "1.2.2", - "com.unity.test-framework": "1.3.9", - "com.unity.testtools.codecoverage": "1.2.4" + "com.unity.performance.profile-analyzer": "1.2.3", + "com.unity.test-framework": "1.6.0", + "com.unity.testtools.codecoverage": "1.2.6" } }, "com.unity.ide.rider": { - "version": "3.0.26", + "version": "3.0.38", "depth": 1, "source": "registry", "dependencies": { @@ -64,106 +66,120 @@ "url": "https://packages.unity.com" }, "com.unity.ide.visualstudio": { - "version": "2.0.22", + "version": "2.0.25", "depth": 1, "source": "registry", "dependencies": { - "com.unity.test-framework": "1.1.9" + "com.unity.test-framework": "1.1.31" + }, + "url": "https://packages.unity.com" + }, + "com.unity.inputsystem": { + "version": "1.14.2", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.modules.uielements": "1.0.0" }, "url": "https://packages.unity.com" }, "com.unity.mathematics": { - "version": "1.2.6", - "depth": 1, + "version": "1.3.2", + "depth": 2, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, + "com.unity.multiplayer.center": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.uielements": "1.0.0" + } + }, "com.unity.nuget.mono-cecil": { - "version": "1.11.4", - "depth": 1, + "version": "1.11.5", + "depth": 3, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, "com.unity.performance.profile-analyzer": { - "version": "1.2.2", + "version": "1.2.3", "depth": 1, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, "com.unity.render-pipelines.core": { - "version": "17.0.1", + "version": "17.0.4", "depth": 1, "source": "builtin", "dependencies": { - "com.unity.collections": "2.2.0", - "com.unity.mathematics": "1.2.6", + "com.unity.burst": "1.8.20", + "com.unity.mathematics": "1.3.2", "com.unity.ugui": "2.0.0", + "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.0" + "com.unity.rendering.light-transport": "1.0.1" } }, "com.unity.render-pipelines.high-definition": { - "version": "17.0.1", + "version": "17.0.4", "depth": 0, "source": "builtin", "dependencies": { - "com.unity.mathematics": "1.2.4", - "com.unity.collections": "2.2.0", - "com.unity.burst": "1.8.9", "com.unity.modules.video": "1.0.0", "com.unity.modules.animation": "1.0.0", "com.unity.modules.imageconversion": "1.0.0", - "com.unity.modules.terrain": "1.0.0", - "com.unity.render-pipelines.core": "17.0.1", - "com.unity.shadergraph": "17.0.1", - "com.unity.visualeffectgraph": "17.0.1", - "com.unity.render-pipelines.high-definition-config": "17.0.1" + "com.unity.render-pipelines.core": "17.0.4", + "com.unity.shadergraph": "17.0.4", + "com.unity.visualeffectgraph": "17.0.4", + "com.unity.render-pipelines.high-definition-config": "17.0.4" } }, "com.unity.render-pipelines.high-definition-config": { - "version": "17.0.1", + "version": "17.0.4", "depth": 1, "source": "builtin", "dependencies": { - "com.unity.render-pipelines.core": "17.0.1" + "com.unity.render-pipelines.core": "17.0.4" } }, "com.unity.rendering.light-transport": { - "version": "1.0.0", + "version": "1.0.1", "depth": 2, "source": "builtin", "dependencies": { "com.unity.collections": "2.2.0", "com.unity.mathematics": "1.2.4", - "com.unity.render-pipelines.core": "17.0.0" + "com.unity.modules.terrain": "1.0.0" } }, "com.unity.searcher": { - "version": "4.9.2", + "version": "4.9.3", "depth": 2, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, "com.unity.settings-manager": { - "version": "2.0.1", + "version": "2.1.0", "depth": 2, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, "com.unity.shadergraph": { - "version": "17.0.1", + "version": "17.0.4", "depth": 1, "source": "builtin", "dependencies": { - "com.unity.render-pipelines.core": "17.0.1", - "com.unity.searcher": "4.9.2" + "com.unity.render-pipelines.core": "17.0.4", + "com.unity.searcher": "4.9.3" } }, "com.unity.template.hdrp-blank": { @@ -171,27 +187,37 @@ "depth": 0, "source": "embedded", "dependencies": { - "com.unity.collab-proxy": "2.0.0", - "com.unity.feature.development": "1.0.1", - "com.unity.render-pipelines.high-definition": "16.0.0", - "com.unity.timeline": "1.7.3", + "com.unity.collab-proxy": "2.2.0", + "com.unity.feature.development": "1.0.2", + "com.unity.render-pipelines.high-definition": "17.0.1", + "com.unity.timeline": "1.8.6", "com.unity.ugui": "2.0.0", - "com.unity.visualscripting": "1.8.0" + "com.unity.visualscripting": "1.9.1", + "com.unity.inputsystem": "1.12.0" } }, "com.unity.test-framework": { - "version": "1.3.9", + "version": "1.6.0", "depth": 1, - "source": "registry", + "source": "builtin", "dependencies": { "com.unity.ext.nunit": "2.0.3", "com.unity.modules.imgui": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0" + } + }, + "com.unity.test-framework.performance": { + "version": "3.2.0", + "depth": 3, + "source": "registry", + "dependencies": { + "com.unity.test-framework": "1.1.33", + "com.unity.modules.jsonserialize": "1.0.0" }, "url": "https://packages.unity.com" }, "com.unity.testtools.codecoverage": { - "version": "1.2.4", + "version": "1.2.6", "depth": 1, "source": "registry", "dependencies": { @@ -201,13 +227,13 @@ "url": "https://packages.unity.com" }, "com.unity.timeline": { - "version": "1.8.6", + "version": "1.8.9", "depth": 0, "source": "registry", "dependencies": { + "com.unity.modules.audio": "1.0.0", "com.unity.modules.director": "1.0.0", "com.unity.modules.animation": "1.0.0", - "com.unity.modules.audio": "1.0.0", "com.unity.modules.particlesystem": "1.0.0" }, "url": "https://packages.unity.com" @@ -222,16 +248,16 @@ } }, "com.unity.visualeffectgraph": { - "version": "17.0.1", + "version": "17.0.4", "depth": 1, "source": "builtin", "dependencies": { - "com.unity.shadergraph": "17.0.1", - "com.unity.render-pipelines.core": "17.0.1" + "com.unity.shadergraph": "17.0.4", + "com.unity.render-pipelines.core": "17.0.4" } }, "com.unity.visualscripting": { - "version": "1.9.1", + "version": "1.9.7", "depth": 0, "source": "registry", "dependencies": { @@ -267,6 +293,12 @@ "com.unity.modules.animation": "1.0.0" } }, + "com.unity.modules.hierarchycore": { + "version": "1.0.0", + "depth": 2, + "source": "builtin", + "dependencies": {} + }, "com.unity.modules.imageconversion": { "version": "1.0.0", "depth": 1, @@ -299,7 +331,7 @@ }, "com.unity.modules.terrain": { "version": "1.0.0", - "depth": 1, + "depth": 2, "source": "builtin", "dependencies": {} }, @@ -309,13 +341,15 @@ "source": "builtin", "dependencies": {} }, - "com.unity.modules.unityanalytics": { + "com.unity.modules.uielements": { "version": "1.0.0", - "depth": 2, + "depth": 1, "source": "builtin", "dependencies": { - "com.unity.modules.unitywebrequest": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0" + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.hierarchycore": "1.0.0" } }, "com.unity.modules.unitywebrequest": { diff --git a/Templates/com.unity.template.hdrp-blank/ProjectSettings/EditorBuildSettings.asset b/Templates/com.unity.template.hdrp-blank/ProjectSettings/EditorBuildSettings.asset index c174af5886e..f08d036c5a9 100644 --- a/Templates/com.unity.template.hdrp-blank/ProjectSettings/EditorBuildSettings.asset +++ b/Templates/com.unity.template.hdrp-blank/ProjectSettings/EditorBuildSettings.asset @@ -9,6 +9,5 @@ EditorBuildSettings: path: Assets/OutdoorsScene.unity guid: 8124e5870f4fd4c779e7a5f994e84ad1 m_configObjects: - com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 35845fe01580c41289b024647b1d1c53, - type: 3} + com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 35845fe01580c41289b024647b1d1c53, type: 3} m_UseUCBPForAssetBundles: 0 diff --git a/Templates/com.unity.template.hdrp-blank/ProjectSettings/GraphicsSettings.asset b/Templates/com.unity.template.hdrp-blank/ProjectSettings/GraphicsSettings.asset index 7eb023df4c6..b94499ad16e 100644 --- a/Templates/com.unity.template.hdrp-blank/ProjectSettings/GraphicsSettings.asset +++ b/Templates/com.unity.template.hdrp-blank/ProjectSettings/GraphicsSettings.asset @@ -37,7 +37,7 @@ GraphicsSettings: m_PreloadedShaders: [] m_PreloadShadersBatchTimeLimit: -1 m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_CustomRenderPipeline: {fileID: 0} + m_CustomRenderPipeline: {fileID: 11400000, guid: 36dd385e759c96147b6463dcd1149c11, type: 2} m_TransparencySortMode: 0 m_TransparencySortAxis: {x: 0, y: 0, z: 1} m_DefaultRenderingPath: 1 @@ -46,7 +46,7 @@ GraphicsSettings: m_LightmapStripping: 0 m_FogStripping: 0 m_InstancingStripping: 0 - m_BrgStripping: 0 + m_BrgStripping: 2 m_LightmapKeepPlain: 1 m_LightmapKeepDirCombined: 1 m_LightmapKeepDynamicPlain: 1 diff --git a/Templates/com.unity.template.hdrp-blank/ProjectSettings/ProjectVersion.txt b/Templates/com.unity.template.hdrp-blank/ProjectSettings/ProjectVersion.txt index ea2e59508a3..3cf1ecd9ccf 100644 --- a/Templates/com.unity.template.hdrp-blank/ProjectSettings/ProjectVersion.txt +++ b/Templates/com.unity.template.hdrp-blank/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2023.3.0a14 -m_EditorVersionWithRevision: 2023.3.0a14 (57dcdb3b018e) +m_EditorVersion: 6000.0.62f1 +m_EditorVersionWithRevision: 6000.0.62f1 (f99f05b3e950) diff --git a/Templates/com.unity.template.hdrp-blank/ProjectSettings/TagManager.asset b/Templates/com.unity.template.hdrp-blank/ProjectSettings/TagManager.asset index 1c92a7840ec..e79656c7ec7 100644 --- a/Templates/com.unity.template.hdrp-blank/ProjectSettings/TagManager.asset +++ b/Templates/com.unity.template.hdrp-blank/ProjectSettings/TagManager.asset @@ -2,7 +2,7 @@ %TAG !u! tag:unity3d.com,2011: --- !u!78 &1 TagManager: - serializedVersion: 2 + serializedVersion: 3 tags: [] layers: - Default @@ -41,3 +41,20 @@ TagManager: - name: Default uniqueID: 0 locked: 0 + m_RenderingLayers: + - Default + - Light Layer 1 + - Light Layer 2 + - Light Layer 3 + - Light Layer 4 + - Light Layer 5 + - Light Layer 6 + - Light Layer 7 + - Decal Layer default + - Decal Layer 1 + - Decal Layer 2 + - Decal Layer 3 + - Decal Layer 4 + - Decal Layer 5 + - Decal Layer 6 + - Decal Layer 7 diff --git a/Templates/com.unity.template.hdrp-blank/ProjectSettings/VFXManager.asset b/Templates/com.unity.template.hdrp-blank/ProjectSettings/VFXManager.asset index 386912e3110..f99437bb70f 100644 --- a/Templates/com.unity.template.hdrp-blank/ProjectSettings/VFXManager.asset +++ b/Templates/com.unity.template.hdrp-blank/ProjectSettings/VFXManager.asset @@ -14,6 +14,6 @@ VFXManager: m_MaxScrubTime: 30 m_MaxCapacity: 100000000 m_CompiledVersion: 7 - m_RuntimeVersion: 36 + m_RuntimeVersion: 38 m_RuntimeResources: {fileID: 11400000, guid: bc10b42afe3813544bffd38ae2cd893d, type: 2} m_BatchEmptyLifetime: 300 From f43acc7875a568db6c28bfa684ff042e1a87566f Mon Sep 17 00:00:00 2001 From: Yvain Raeymaekers Date: Mon, 19 Jan 2026 22:47:33 +0000 Subject: [PATCH 32/43] [UUM-131900] Fix urtshader compilation errors appearing when switching to PS5 build profile --- .../ProbeVolume/DynamicGI/DynamicGISkyOcclusion.urtshader | 2 +- .../RenderingLayerMask/TraceRenderingLayerMask.urtshader | 1 + .../ProbeVolume/VirtualOffset/TraceVirtualOffset.urtshader | 2 +- .../Editor/UnifiedRayTracing/TraceTransparentRays.urtshader | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/DynamicGI/DynamicGISkyOcclusion.urtshader b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/DynamicGI/DynamicGISkyOcclusion.urtshader index ce153c3c74a..c149aa3d06b 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/DynamicGI/DynamicGISkyOcclusion.urtshader +++ b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/DynamicGI/DynamicGISkyOcclusion.urtshader @@ -1,4 +1,4 @@ -#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal webgpu +#pragma only_renderers d3d11 xboxone xboxseries vulkan metal webgpu #define UNIFIED_RT_GROUP_SIZE_X 64 #define UNIFIED_RT_GROUP_SIZE_Y 1 diff --git a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/RenderingLayerMask/TraceRenderingLayerMask.urtshader b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/RenderingLayerMask/TraceRenderingLayerMask.urtshader index f8ff98e3171..98d6b31bb14 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/RenderingLayerMask/TraceRenderingLayerMask.urtshader +++ b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/RenderingLayerMask/TraceRenderingLayerMask.urtshader @@ -1,3 +1,4 @@ +#pragma only_renderers d3d11 xboxone xboxseries vulkan metal webgpu #define UNIFIED_RT_GROUP_SIZE_X 64 #define UNIFIED_RT_GROUP_SIZE_Y 1 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 90e95a176ff..c340f1bb9c6 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 @@ -1,4 +1,4 @@ -#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal webgpu switch switch2 +#pragma only_renderers d3d11 xboxone xboxseries vulkan metal webgpu #define UNIFIED_RT_GROUP_SIZE_X 64 #define UNIFIED_RT_GROUP_SIZE_Y 1 diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/UnifiedRayTracing/TraceTransparentRays.urtshader b/Packages/com.unity.render-pipelines.core/Tests/Editor/UnifiedRayTracing/TraceTransparentRays.urtshader index 0dcc4bcdd3a..e48955c6954 100644 --- a/Packages/com.unity.render-pipelines.core/Tests/Editor/UnifiedRayTracing/TraceTransparentRays.urtshader +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/UnifiedRayTracing/TraceTransparentRays.urtshader @@ -1,3 +1,4 @@ +#pragma only_renderers d3d11 xboxone xboxseries vulkan metal webgpu #define UNIFIED_RT_GROUP_SIZE_X 16 #define UNIFIED_RT_GROUP_SIZE_Y 8 #define UNIFIED_RT_PAYLOAD RayPayload From f0004a61d899eec7865504af996218ded17a4a4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20V=C3=A1zquez?= Date: Mon, 19 Jan 2026 22:47:33 +0000 Subject: [PATCH 33/43] [Render Pipeline Converter] BiRP to URP 2D : Adding readonly materials converter workflow. --- ...erialConverter.MaterialReferenceChanger.cs | 1 + ...BuiltInToURP2DReadonlyMaterialConverter.cs | 44 +++++ ...InToURP2DReadonlyMaterialConverter.cs.meta | 2 + .../URP3DToURP2DReadonlyMaterialConverter.cs | 83 ++++++++++ ...3DToURP2DReadonlyMaterialConverter.cs.meta | 2 + .../Editor/Converter/Converters.cs | 2 +- ...BuiltInToURP3DReadonlyMaterialConverter.cs | 15 +- .../UniversalRenderPipelineEditorMaterials.cs | 10 ++ .../Tools/Converters/ConvertersTests.cs | 2 +- .../ReadonlyMaterialConverterTests.cs | 156 ++++++++++++------ 10 files changed, 259 insertions(+), 58 deletions(-) create mode 100644 Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/BuiltInToURP2DReadonlyMaterialConverter.cs create mode 100644 Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/BuiltInToURP2DReadonlyMaterialConverter.cs.meta create mode 100644 Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/URP3DToURP2DReadonlyMaterialConverter.cs create mode 100644 Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/URP3DToURP2DReadonlyMaterialConverter.cs.meta diff --git a/Packages/com.unity.render-pipelines.core/Editor-PrivateShared/Tools/Converter/ReadonlyMaterialConverter/ReadonlyMaterialConverter.MaterialReferenceChanger.cs b/Packages/com.unity.render-pipelines.core/Editor-PrivateShared/Tools/Converter/ReadonlyMaterialConverter/ReadonlyMaterialConverter.MaterialReferenceChanger.cs index 7c9a20ac876..abbb14bddbe 100644 --- a/Packages/com.unity.render-pipelines.core/Editor-PrivateShared/Tools/Converter/ReadonlyMaterialConverter/ReadonlyMaterialConverter.MaterialReferenceChanger.cs +++ b/Packages/com.unity.render-pipelines.core/Editor-PrivateShared/Tools/Converter/ReadonlyMaterialConverter/ReadonlyMaterialConverter.MaterialReferenceChanger.cs @@ -117,6 +117,7 @@ internal bool ReassignGameObjectMaterials(GameObject go, StringBuilder errors) catch (Exception ex) { errors.Append($"{ex.Message} while trying to reassign materials from {component}."); + ok = false; } } } diff --git a/Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/BuiltInToURP2DReadonlyMaterialConverter.cs b/Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/BuiltInToURP2DReadonlyMaterialConverter.cs new file mode 100644 index 00000000000..8d804a82a16 --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/BuiltInToURP2DReadonlyMaterialConverter.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using UnityEditor.Rendering.Converter; +using UnityEngine; +using UnityEngine.Categorization; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; + +namespace UnityEditor.Rendering.Universal +{ + [Serializable] + [PipelineConverter("Built-in", "Universal Render Pipeline (2D Renderer)")] + [ElementInfo(Name = "Material Reference Converter", + Order = 100, + Description = "Converts references to Built-In readonly materials to URP (2D) readonly materials.")] + internal class BuiltInToURP2DReadonlyMaterialConverter : ReadonlyMaterialConverter + { + public override bool isEnabled + { + get + { + if (GraphicsSettings.currentRenderPipeline is not UniversalRenderPipelineAsset urpAsset) + return false; + + return urpAsset.scriptableRenderer is Renderer2D; + } + } + + public override string isDisabledMessage => "Converter requires URP with a Renderer 2D. Convert your project to URP to use this converter."; + + protected override Dictionary> materialMappings + { + get + { + return new() + { + ["Default-Material"] = () => GraphicsSettings.GetRenderPipelineSettings().defaultMesh2DLitMaterial, + ["Sprites-Default"] = () => GraphicsSettings.GetRenderPipelineSettings().defaultLitMaterial, + ["Sprites-Mask"] = () => GraphicsSettings.GetRenderPipelineSettings().defaultMaskMaterial, + }; + } + } + } +} diff --git a/Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/BuiltInToURP2DReadonlyMaterialConverter.cs.meta b/Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/BuiltInToURP2DReadonlyMaterialConverter.cs.meta new file mode 100644 index 00000000000..4746317ee87 --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/BuiltInToURP2DReadonlyMaterialConverter.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 06094ba9171a2b2449746e516915ac1e \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/URP3DToURP2DReadonlyMaterialConverter.cs b/Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/URP3DToURP2DReadonlyMaterialConverter.cs new file mode 100644 index 00000000000..d9541076889 --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/URP3DToURP2DReadonlyMaterialConverter.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using UnityEditor.Rendering.Converter; +using UnityEngine; +using UnityEngine.Categorization; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; + +namespace UnityEditor.Rendering.Universal +{ + [Serializable] + [PipelineConverter("Universal Render Pipeline (Universal Renderer)", "Universal Render Pipeline (2D Renderer)")] + [ElementInfo(Name = "Material Reference Converter", + Order = 100, + Description = "Converts references to URP Lit and Simple Lit readonly material to Mesh 2D Lit material.")] + internal class URP3DToURP2DReadonlyMaterialConverter : ReadonlyMaterialConverter + { + private List<(string query, string description)> m_ContextSearchQueriesAndIds; + private Dictionary> m_MaterialMappings; + + public override bool isEnabled + { + get + { + if (GraphicsSettings.currentRenderPipeline is not UniversalRenderPipelineAsset urpAsset) + return false; + return urpAsset.scriptableRenderer is Renderer2D; + } + } + + public override string isDisabledMessage => "Converter requires URP with a Renderer 2D. Convert your project to URP to use this converter."; + + private bool m_Initialized = false; + + private void InitializeIfNeeded() + { + if (m_Initialized) + return; + + m_Initialized = true; + + var urpMaterials = GraphicsSettings.GetRenderPipelineSettings(); + var lit = urpMaterials.defaultMaterial; + var simpleLit = urpMaterials.simpleLitMaterial; + + // -t:RenderPipelineGlobalSettings is to avoid adding the Global Settings as they reference the URP Lit and Simple Lit materials + // We do not want to modify them as part of this conversion, because they must keep referencing the URP 3D materials. + const string formattedId = "p: ref=<$object:{0},UnityEngine.Object$> -t:RenderPipelineGlobalSettings"; + + m_ContextSearchQueriesAndIds = new List<(string query, string description)>() + { + (string.Format(formattedId, GlobalObjectId.GetGlobalObjectIdSlow(lit)), "URP Lit is being referenced"), + (string.Format(formattedId, GlobalObjectId.GetGlobalObjectIdSlow(simpleLit)), "URP Simple Lit is being referenced") + }; + + Func mesh2DLitMaterial = () => GraphicsSettings.GetRenderPipelineSettings().defaultMesh2DLitMaterial; + + m_MaterialMappings = new Dictionary>() + { + ["Lit"] = mesh2DLitMaterial, + ["SimpleLit"] = mesh2DLitMaterial + }; + } + + protected override List<(string query, string description)> contextSearchQueriesAndIds + { + get + { + InitializeIfNeeded(); + return m_ContextSearchQueriesAndIds; + } + } + + protected override Dictionary> materialMappings + { + get + { + InitializeIfNeeded(); + return m_MaterialMappings; + } + } + } +} diff --git a/Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/URP3DToURP2DReadonlyMaterialConverter.cs.meta b/Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/URP3DToURP2DReadonlyMaterialConverter.cs.meta new file mode 100644 index 00000000000..d2709559a0f --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Editor/2D/Converter/URP3DToURP2DReadonlyMaterialConverter.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 5baecaac191c29b4588b13e6c63bc1b0 \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Editor/Converter/Converters.cs b/Packages/com.unity.render-pipelines.universal/Editor/Converter/Converters.cs index ed9999a22c9..4348fe604fb 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/Converter/Converters.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/Converter/Converters.cs @@ -101,7 +101,7 @@ public enum ConverterId /// /// Use this for 2D material conversion /// - [BatchModeConverterInfo(ConverterContainerId.BuiltInToURP2D, typeof(BuiltInToURP2DMaterialUpgrader))] + [BatchModeConverterInfo(ConverterContainerId.BuiltInToURP2D, typeof(BuiltInToURP2DReadonlyMaterialConverter))] ReadonlyMaterial2D, /// diff --git a/Packages/com.unity.render-pipelines.universal/Editor/Tools/Converters/BuiltInToURP3DReadonlyMaterialConverter.cs b/Packages/com.unity.render-pipelines.universal/Editor/Tools/Converters/BuiltInToURP3DReadonlyMaterialConverter.cs index a8b41cef7bd..31d5adbf405 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/Tools/Converters/BuiltInToURP3DReadonlyMaterialConverter.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/Tools/Converters/BuiltInToURP3DReadonlyMaterialConverter.cs @@ -12,11 +12,20 @@ namespace UnityEditor.Rendering.Universal [PipelineConverter("Built-in", "Universal Render Pipeline (Universal Renderer)")] [ElementInfo(Name = "Material Reference Converter", Order = 100, - Description = "Converts references to Built-In readonly materials to URP readonly materials. This will create temporarily a .index file and that can take a long time.")] + Description = "Converts references to Built-In readonly materials to URP readonly materials.")] internal class BuiltInToURP3DReadonlyMaterialConverter : ReadonlyMaterialConverter { - public override bool isEnabled => GraphicsSettings.currentRenderPipeline is UniversalRenderPipelineAsset; - public override string isDisabledMessage => "Converter requires URP. Convert your project to URP to use this converter."; + public override bool isEnabled + { + get + { + if (GraphicsSettings.currentRenderPipeline is not UniversalRenderPipelineAsset urpAsset) + return false; + + return urpAsset.scriptableRenderer is UniversalRenderer; + } + } + public override string isDisabledMessage => "Converter requires URP with an Universal Renderer. Convert your project to URP to use this converter."; protected override Dictionary> materialMappings { diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/RenderPipelineResources/UniversalRenderPipelineEditorMaterials.cs b/Packages/com.unity.render-pipelines.universal/Runtime/RenderPipelineResources/UniversalRenderPipelineEditorMaterials.cs index 0e6eb9ff33e..09babd41b0a 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/RenderPipelineResources/UniversalRenderPipelineEditorMaterials.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/RenderPipelineResources/UniversalRenderPipelineEditorMaterials.cs @@ -20,6 +20,16 @@ public virtual Material defaultMaterial set => this.SetValueAndNotify(ref m_DefaultMaterial, value); } + [SerializeField] + [ResourcePath("Runtime/Materials/SimpleLit.mat")] + private Material m_SimpleLitMaterial; + + public virtual Material simpleLitMaterial + { + get => m_SimpleLitMaterial; + set => this.SetValueAndNotify(ref m_SimpleLitMaterial, value); + } + // This is the URP default material for new particle systems, is the closest match to the built-in shader. [SerializeField] [ResourcePath("Runtime/Materials/ParticlesUnlit.mat")] diff --git a/Packages/com.unity.render-pipelines.universal/Tests/Editor/Tools/Converters/ConvertersTests.cs b/Packages/com.unity.render-pipelines.universal/Tests/Editor/Tools/Converters/ConvertersTests.cs index 32fc5870318..7d8cfb1ee2c 100644 --- a/Packages/com.unity.render-pipelines.universal/Tests/Editor/Tools/Converters/ConvertersTests.cs +++ b/Packages/com.unity.render-pipelines.universal/Tests/Editor/Tools/Converters/ConvertersTests.cs @@ -112,7 +112,7 @@ public static IEnumerable TestCases() ConverterFilter.Exclusive, new List { - typeof(BuiltInToURP2DMaterialUpgrader), + typeof(BuiltInToURP2DReadonlyMaterialConverter), } ).SetName("BuiltInToURP2D - When Using Exclusive filter with no converters. The filter returns everything"); diff --git a/Packages/com.unity.render-pipelines.universal/Tests/Editor/Tools/Converters/ReadonlyMaterialConverter/ReadonlyMaterialConverterTests.cs b/Packages/com.unity.render-pipelines.universal/Tests/Editor/Tools/Converters/ReadonlyMaterialConverter/ReadonlyMaterialConverterTests.cs index 6a258a4d2c5..d5b21a0aa60 100644 --- a/Packages/com.unity.render-pipelines.universal/Tests/Editor/Tools/Converters/ReadonlyMaterialConverter/ReadonlyMaterialConverterTests.cs +++ b/Packages/com.unity.render-pipelines.universal/Tests/Editor/Tools/Converters/ReadonlyMaterialConverter/ReadonlyMaterialConverterTests.cs @@ -1,10 +1,8 @@ using NUnit.Framework; using UnityEditor.Rendering.Converter; -using UnityEditor.SceneManagement; using UnityEngine; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; -using UnityEngine.SceneManagement; namespace UnityEditor.Rendering.Universal.Tools { @@ -12,45 +10,46 @@ namespace UnityEditor.Rendering.Universal.Tools [Category("Graphics Tools")] class ReadonlyMaterialConverterTests { - const string k_PrefabPath = "Assets/ReadonlyMaterialConverterTests/"; + const string k_BasePrefabPath = "Assets/ReadonlyMaterialConverterTests/"; GameObject m_GO; MeshRenderer m_MeshRenderer; - BuiltInToURP3DReadonlyMaterialConverter m_Converter; + string m_CurrentTestAssetPath; public static GameObject CreatePrefabWithMeshRenderer(Material[] materials, string assetPath) { - // Create a temporary GameObject - var go = new GameObject("CreatePrefabWithMeshRenderer_GO"); + var go = new GameObject("TestPrefab"); try { - // Add components var mf = go.AddComponent(); var mr = go.AddComponent(); mr.sharedMaterials = materials; - string localPath = assetPath + go.name + ".prefab"; - CoreUtils.EnsureFolderTreeInAssetFilePath(localPath); + CoreUtils.EnsureFolderTreeInAssetFilePath(assetPath); - // Save as prefab - var prefab = PrefabUtility.SaveAsPrefabAsset(go, localPath, out bool success); + var prefab = PrefabUtility.SaveAsPrefabAsset(go, assetPath, out bool success); if (!success || prefab == null) { Debug.LogError("Failed to save prefab at: " + assetPath); return null; } - AssetDatabase.ImportAsset(localPath); + AssetDatabase.ImportAsset(assetPath); AssetDatabase.SaveAssets(); return prefab; } + catch (System.Exception ex) + { + Debug.LogException(ex); + } finally { - // Cleanup temporary instance UnityEngine.Object.DestroyImmediate(go); } + + return null; } [OneTimeSetUp] @@ -59,76 +58,127 @@ public void OneTimeSetup() var urpAsset = GraphicsSettings.currentRenderPipeline as UniversalRenderPipelineAsset; if (urpAsset == null) Assert.Ignore("Project without URP. Skipping test"); + } - var universalRenderer = urpAsset.scriptableRenderer as UniversalRenderer; - if (universalRenderer == null) - Assert.Ignore("Project without URP - Universal Renderer. Skipping test"); + [TearDown] + public void Teardown() + { + if (!string.IsNullOrEmpty(m_CurrentTestAssetPath)) + { + // Delete the specific prefab file + if (AssetDatabase.LoadAssetAtPath(m_CurrentTestAssetPath) != null) + { + AssetDatabase.DeleteAsset(m_CurrentTestAssetPath); + } + } + m_CurrentTestAssetPath = null; } - [SetUp] - public void Setup() + [OneTimeTearDown] + public void OneTimeTearDown() { - m_Converter = new BuiltInToURP3DReadonlyMaterialConverter(); + // Clean up the entire test folder + if (AssetDatabase.IsValidFolder(k_BasePrefabPath.TrimEnd('/'))) + { + AssetDatabase.DeleteAsset(k_BasePrefabPath.TrimEnd('/')); + } + } - var materials = m_Converter.mappings.GetBuiltInMaterials(); + private void SetupTestForConverter(ReadonlyMaterialConverter converter, string testName) + { + var materials = converter.mappings.GetBuiltInMaterials(); Assume.That(materials.Length > 0, "There are no mapping materials"); - m_GO = CreatePrefabWithMeshRenderer(materials, k_PrefabPath); + // Create unique asset path for this specific test + m_CurrentTestAssetPath = k_BasePrefabPath + testName + ".prefab"; + + m_GO = CreatePrefabWithMeshRenderer(materials, m_CurrentTestAssetPath); m_MeshRenderer = m_GO.GetComponent(); - Assert.AreEqual(m_Converter.mappings.count, m_MeshRenderer.sharedMaterials.Length, "ReadonlyMaterialMap - Lengths are different"); + + Assert.AreEqual(converter.mappings.count, m_MeshRenderer.sharedMaterials.Length, + "ReadonlyMaterialMap - Lengths are different"); int i = 0; - foreach (var key in m_Converter.mappings.Keys) + foreach (var key in converter.mappings.Keys) { - Assert.AreEqual(key, m_MeshRenderer.sharedMaterials[i].name, "ReadonlyMaterialMap - Order has changed"); + Assert.AreEqual(key, m_MeshRenderer.sharedMaterials[i].name, + "ReadonlyMaterialMap - Order has changed"); ++i; } } - [TearDown] - public void Teardown() - { - AssetDatabase.DeleteAsset(k_PrefabPath); - } - - private void CheckMaterials(Material[] actual) + private void CheckMaterialsAfterConversion(ReadonlyMaterialConverter converter, Material[] actual) { int i = 0; - var materials = m_Converter.mappings.GetBuiltInMaterials(); - foreach (var key in m_Converter.mappings.Keys) + var materials = converter.mappings.GetBuiltInMaterials(); + foreach (var key in converter.mappings.Keys) { - Assert.IsTrue(m_Converter.mappings.TryGetMappingMaterial(materials[i], out var expected)); - CheckMaterials(expected, actual[i]); + Assert.IsTrue(converter.mappings.TryGetMappingMaterial(materials[i], out var expected)); + Assert.AreEqual(expected, actual[i], "The material was not changed"); ++i; } } - private void CheckMaterials(Material expected, Material actual) + private void RunConverterTest(ReadonlyMaterialConverter converter, string testName) { - Assert.AreEqual(expected, actual, "The material was not changed"); - } + SetupTestForConverter(converter, testName); - [Test] - [Timeout(5 * 60 * 1000)] - public void ReassignGameObjectMaterials_Succeeds_WhenMaterialCanBeSet() - { - var materialConverter = new BuiltInToURP3DReadonlyMaterialConverter(); var gid = GlobalObjectId.GetGlobalObjectIdSlow(m_GO); - var assetItem = new RenderPipelineConverterAssetItem(gid, AssetDatabase.GetAssetPath(m_GO)); - materialConverter.assets.Add(assetItem); + converter.assets.Add(assetItem); - Assert.IsNull(materialConverter.m_MaterialReferenceChanger, "MaterialReferenceChanger should be null before BeforeConvert"); - materialConverter.BeforeConvert(); - Assert.IsNotNull(materialConverter.m_MaterialReferenceChanger, "MaterialReferenceChanger should NOT be null after BeforeConvert"); - var status = materialConverter.Convert(assetItem, out var message); - materialConverter.AfterConvert(); - Assert.IsNull(materialConverter.m_MaterialReferenceChanger, "MaterialReferenceChanger should be null after AfterConvert"); + Assert.IsNull(converter.m_MaterialReferenceChanger, + "MaterialReferenceChanger should be null before BeforeConvert"); + + converter.BeforeConvert(); + + Assert.IsNotNull(converter.m_MaterialReferenceChanger, + "MaterialReferenceChanger should NOT be null after BeforeConvert"); + + var status = converter.Convert(assetItem, out var message); + + converter.AfterConvert(); + + Assert.IsNull(converter.m_MaterialReferenceChanger, + "MaterialReferenceChanger should be null after AfterConvert"); Assert.AreEqual(Status.Success, status); Assert.IsTrue(string.IsNullOrEmpty(message), $"Message should be empty. Message: {message}"); - CheckMaterials(m_MeshRenderer.sharedMaterials); + + CheckMaterialsAfterConversion(converter, m_MeshRenderer.sharedMaterials); + } + + [Test] + public void BuiltInToURP3D_ReassignMaterials_Succeeds() + { + var urpAsset = GraphicsSettings.currentRenderPipeline as UniversalRenderPipelineAsset; + if (urpAsset.scriptableRenderer is not UniversalRenderer) + Assert.Ignore("Requires UniversalRenderer. Skipping test"); + + var converter = new BuiltInToURP3DReadonlyMaterialConverter(); + RunConverterTest(converter, nameof(BuiltInToURP3D_ReassignMaterials_Succeeds)); } - } + [Test] + public void URP3DToURP2D_ReassignMaterials_Succeeds() + { + var urpAsset = GraphicsSettings.currentRenderPipeline as UniversalRenderPipelineAsset; + if (urpAsset.scriptableRenderer is not Renderer2D) + Assert.Ignore("Requires Renderer2D. Skipping test"); + + var converter = new URP3DToURP2DReadonlyMaterialConverter(); + RunConverterTest(converter, nameof(URP3DToURP2D_ReassignMaterials_Succeeds)); + } + + [Test] + public void BuiltInToURP2D_ReassignMaterials_Succeeds() + { + var urpAsset = GraphicsSettings.currentRenderPipeline as UniversalRenderPipelineAsset; + if (urpAsset.scriptableRenderer is not Renderer2D) + Assert.Ignore("Requires Renderer2D. Skipping test"); + + var converter = new BuiltInToURP2DReadonlyMaterialConverter(); + RunConverterTest(converter, nameof(BuiltInToURP2D_ReassignMaterials_Succeeds)); + } + } } From e712a77cf90ba46f6b840d4448828352d64f560c Mon Sep 17 00:00:00 2001 From: Raquel Peces Date: Wed, 21 Jan 2026 19:42:10 +0000 Subject: [PATCH 34/43] Create a dummy color for binding when MSAA samples mismatch in depth copy pass --- .../Runtime/Passes/CopyDepthPass.cs | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CopyDepthPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CopyDepthPass.cs index 6cee6184b08..c099a942569 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CopyDepthPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/CopyDepthPass.cs @@ -132,7 +132,7 @@ private static void ExecutePass(RasterCommandBuffer cmd, PassData passData, RTHa copyDepthMaterial.SetTexture(ShaderConstants._CameraDepthAttachment, source); copyDepthMaterial.SetFloat(ShaderConstants._ZWriteShaderHandle, passData.copyToDepth ? 1.0f : 0.0f); - Blitter.BlitTexture(cmd, source, scaleBias, copyDepthMaterial, 0); + Blitter.BlitTexture(cmd, source, scaleBias, copyDepthMaterial, 0); } /// @@ -176,7 +176,7 @@ public void Render(RenderGraph renderGraph, TextureHandle destination, TextureHa var canSampleMSAADepth = sourceDesc.bindTextureMS && SystemInfo.supportsMultisampledTextures != 0; Debug.Assert(!hasMSAA || canUseResolvedDepth || canSampleMSAADepth || !dstHasDepthFormat - , "Can't copy depth to destiation with depth format due to MSAA and platform/API limitations: no resolved depth resource (bindMS), depth resolve unsupported, and MSAA depth sampling unsupported."); + , "Can't copy depth to destination with depth format due to MSAA and platform/API limitations: no resolved depth resource (bindMS), depth resolve unsupported, and MSAA depth sampling unsupported."); // Having a different pass name than profilingSampler.name is bad practice but this method was public before we cleaned up this naming using (var builder = renderGraph.AddRasterRenderPass(passName, out var passData, profilingSampler)) @@ -238,8 +238,34 @@ public void Render(RenderGraph renderGraph, TextureHandle destination, TextureHa // binding a dummy color target as a workaround to an OSX issue in Editor scene view (UUM-47698). // Also required for preview camera rendering for grid drawn with builtin RP (UUM-55171). // Also required for render gizmos (UUM-91335). + // When MSAA is enabled with Dbuffer can cause sample count mismatches between active color and depth target; create a dummy color target to resolve. (UUM-131330) if (cameraData.isSceneViewCamera || cameraData.isPreviewCamera || UnityEditor.Handles.ShouldRenderGizmos()) - builder.SetRenderAttachment(resourceData.activeColorTexture, 0); + { + // get info for the active color + var activeColorInfo = renderGraph.GetRenderTargetInfo(resourceData.activeColorTexture); + + // destination depth info (the texture we created earlier) + var destInfo = renderGraph.GetRenderTargetInfo(destination); + + // if samples mismatch, create a dummy color RT with dest's samples + if (activeColorInfo.msaaSamples != destInfo.msaaSamples) + { + TextureHandle dummyColor = renderGraph.CreateTexture(new TextureDesc(activeColorInfo.width, activeColorInfo.height, false, true) + { + name = "Copy Depth Editor Dummy Color", + slices = activeColorInfo.volumeDepth, + format = activeColorInfo.format, + msaaSamples = (MSAASamples)destInfo.msaaSamples, // match the depth target + clearBuffer = false, + bindTextureMS = activeColorInfo.bindMS + }); + builder.SetRenderAttachment(dummyColor, 0); + } + else + { + builder.SetRenderAttachment(resourceData.activeColorTexture, 0); + } + } #endif } else From 8e6dcb54b912a3572341d1881df8fcea908ef398 Mon Sep 17 00:00:00 2001 From: Alexandra Russell Date: Wed, 21 Jan 2026 23:50:04 +0000 Subject: [PATCH 35/43] Rename "Effects" to "Visual Effects" in menus --- .../Documentation~/VisualEffectComponent.md | 2 +- .../Editor/VFXAssetEditorUtility.cs | 3 ++- .../PropertyBinding/Implementation/VFXAudioSpectrumBinder.cs | 2 +- .../PropertyBinding/Implementation/VFXEnabledBinder.cs | 2 +- .../Implementation/VFXHierarchyAttributeMapBinder.cs | 2 +- .../PropertyBinding/Implementation/VFXInputAxisBinder.cs | 2 +- .../PropertyBinding/Implementation/VFXInputButtonBinder.cs | 2 +- .../PropertyBinding/Implementation/VFXInputKeyBinder.cs | 2 +- .../PropertyBinding/Implementation/VFXInputMouseBinder.cs | 2 +- .../PropertyBinding/Implementation/VFXInputTouchBinder.cs | 2 +- .../Utilities/PropertyBinding/Implementation/VFXLightBinder.cs | 2 +- .../Implementation/VFXMultiplePositionBinder.cs | 2 +- .../Utilities/PropertyBinding/Implementation/VFXPlaneBinder.cs | 2 +- .../PropertyBinding/Implementation/VFXPositionBinder.cs | 2 +- .../Implementation/VFXPreviousPositionBinder.cs | 2 +- .../PropertyBinding/Implementation/VFXRaycastBinder.cs | 2 +- .../PropertyBinding/Implementation/VFXSphereBinder.cs | 2 +- .../PropertyBinding/Implementation/VFXTerrainBinder.cs | 2 +- .../PropertyBinding/Implementation/VFXTransformBinder.cs | 2 +- .../PropertyBinding/Implementation/VFXUIDropdownBinder.cs | 2 +- .../PropertyBinding/Implementation/VFXUISliderBinder.cs | 2 +- .../PropertyBinding/Implementation/VFXUIToggleBinder.cs | 2 +- .../PropertyBinding/Implementation/VFXVelocityBinder.cs | 2 +- 23 files changed, 24 insertions(+), 23 deletions(-) diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/VisualEffectComponent.md b/Packages/com.unity.visualeffectgraph/Documentation~/VisualEffectComponent.md index a519e584655..8ab23990b42 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/VisualEffectComponent.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/VisualEffectComponent.md @@ -6,7 +6,7 @@ The Visual Effect Component creates an instance of a Visual Effect in the scene, To create a Visual Effect: -1. Add the Visual Effect component using the **Add Component** menu in the Inspector or navigate toi **Component > Effects > Visual Effect** +1. Add the Visual Effect component using the **Add Component** menu in the Inspector or navigate to **Component > Visual Effects > Visual Effect** 2. Click the **New** Button, next to the Asset Template property Field. 3. Save the new Visual Effect Graph asset. diff --git a/Packages/com.unity.visualeffectgraph/Editor/VFXAssetEditorUtility.cs b/Packages/com.unity.visualeffectgraph/Editor/VFXAssetEditorUtility.cs index 08aa1dcdcd0..0000bb4538a 100644 --- a/Packages/com.unity.visualeffectgraph/Editor/VFXAssetEditorUtility.cs +++ b/Packages/com.unity.visualeffectgraph/Editor/VFXAssetEditorUtility.cs @@ -2,6 +2,7 @@ using UnityEngine; using UnityEditor.VFX; using UnityEngine.VFX; +using UnityEngine.Rendering; using UnityEditor.ProjectWindowCallback; using UnityObject = UnityEngine.Object; @@ -57,7 +58,7 @@ static VisualEffectAssetEditorUtility() public const string editorResourcesFolder = "Editor/UIResources"; public static string editorResourcesPath => VisualEffectGraphPackageInfo.assetPackagePath + "/" + editorResourcesFolder; - [MenuItem("GameObject/Visual Effects/Visual Effect", priority = 12)] + [MenuItem("GameObject/Visual Effects/Visual Effect", priority = CoreUtils.Sections.section1)] public static void CreateVisualEffectGameObject(MenuCommand menuCommand) { var parent = menuCommand.context as GameObject; diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXAudioSpectrumBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXAudioSpectrumBinder.cs index 8170491d420..eff1d23c569 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXAudioSpectrumBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXAudioSpectrumBinder.cs @@ -4,7 +4,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Audio Spectrum Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Audio Spectrum Binder")] [VFXBinder("Audio/Audio Spectrum to AttributeMap")] class VFXAudioSpectrumBinder : VFXBinderBase { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXEnabledBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXEnabledBinder.cs index 7233caa6473..424db7c9d58 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXEnabledBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXEnabledBinder.cs @@ -2,7 +2,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Enabled Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Enabled Binder")] [VFXBinder("GameObject/Enabled")] class VFXEnabledBinder : VFXBinderBase { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXHierarchyAttributeMapBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXHierarchyAttributeMapBinder.cs index 93918caebc3..af57dfb16bc 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXHierarchyAttributeMapBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXHierarchyAttributeMapBinder.cs @@ -3,7 +3,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Hierarchy to Attribute Map Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Hierarchy to Attribute Map Binder")] [VFXBinder("Point Cache/Hierarchy to Attribute Map")] class VFXHierarchyAttributeMapBinder : VFXBinderBase { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputAxisBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputAxisBinder.cs index 7db38cab421..5e10a6c1721 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputAxisBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputAxisBinder.cs @@ -2,7 +2,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Input Axis Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Input Axis Binder")] [VFXBinder("Input/Axis")] class VFXInputAxisBinder : VFXBinderBase { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputButtonBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputButtonBinder.cs index a66620a64bc..beef07751a3 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputButtonBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputButtonBinder.cs @@ -2,7 +2,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Input Button Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Input Button Binder")] [VFXBinder("Input/Button")] class VFXInputButtonBinder : VFXBinderBase { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputKeyBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputKeyBinder.cs index 460eeb6f082..207de0d14a6 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputKeyBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputKeyBinder.cs @@ -2,7 +2,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Input Key Press Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Input Key Press Binder")] [VFXBinder("Input/Key")] class VFXInputKeyBinder : VFXBinderBase { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputMouseBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputMouseBinder.cs index 65932075f49..ef113cd5649 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputMouseBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputMouseBinder.cs @@ -7,7 +7,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Input Mouse Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Input Mouse Binder")] [VFXBinder("Input/Mouse")] class VFXInputMouseBinder : VFXBinderBase { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputTouchBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputTouchBinder.cs index d27a5a46398..c2c4081e257 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputTouchBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXInputTouchBinder.cs @@ -8,7 +8,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Input Touch Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Input Touch Binder")] [VFXBinder("Input/Touch")] class VFXInputTouchBinder : VFXBinderBase { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXLightBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXLightBinder.cs index 6dfaed8dd54..140c9aea4b8 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXLightBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXLightBinder.cs @@ -2,7 +2,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Light Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Light Binder")] [VFXBinder("Utility/Light")] class VFXLightBinder : VFXBinderBase { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXMultiplePositionBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXMultiplePositionBinder.cs index 8f78846203c..6284e914e2a 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXMultiplePositionBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXMultiplePositionBinder.cs @@ -3,7 +3,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Multiple Position Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Multiple Position Binder")] [VFXBinder("Point Cache/Multiple Position Binder")] class VFXMultiplePositionBinder : VFXBinderBase { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXPlaneBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXPlaneBinder.cs index fcbfc6e59c4..8b1995c6817 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXPlaneBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXPlaneBinder.cs @@ -6,7 +6,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Plane Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Plane Binder")] [VFXBinder("Utility/Plane")] class VFXPlaneBinder : VFXSpaceableBinder { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXPositionBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXPositionBinder.cs index b71412826b8..f8b51e59669 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXPositionBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXPositionBinder.cs @@ -2,7 +2,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Position Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Position Binder")] [VFXBinder("Transform/Position")] class VFXPositionBinder : VFXSpaceableBinder { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXPreviousPositionBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXPreviousPositionBinder.cs index 79780099a29..299c2a123cf 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXPreviousPositionBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXPreviousPositionBinder.cs @@ -2,7 +2,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Previous Position Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Previous Position Binder")] [VFXBinder("Transform/Position (Previous)")] class VFXPreviousPositionBinder : VFXSpaceableBinder { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXRaycastBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXRaycastBinder.cs index 2ae9f55ccae..0d8093194b7 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXRaycastBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXRaycastBinder.cs @@ -3,7 +3,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Raycast Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Raycast Binder")] [VFXBinder("Physics/Raycast")] class VFXRaycastBinder : VFXBinderBase { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXSphereBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXSphereBinder.cs index a574925f65a..52338bbf9e6 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXSphereBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXSphereBinder.cs @@ -3,7 +3,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Sphere Collider Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Sphere Collider Binder")] [VFXBinder("Collider/Sphere")] class VFXSphereBinder : VFXSpaceableBinder { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXTerrainBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXTerrainBinder.cs index d66b5a5db2e..29e447a5764 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXTerrainBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXTerrainBinder.cs @@ -3,7 +3,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Terrain Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Terrain Binder")] [VFXBinder("Utility/Terrain")] class VFXTerrainBinder : VFXBinderBase { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXTransformBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXTransformBinder.cs index ac4af4515a4..c577c88e6a6 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXTransformBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXTransformBinder.cs @@ -2,7 +2,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Transform Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Transform Binder")] [VFXBinder("Transform/Transform")] class VFXTransformBinder : VFXSpaceableBinder { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXUIDropdownBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXUIDropdownBinder.cs index fea7604773f..a2a105bca25 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXUIDropdownBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXUIDropdownBinder.cs @@ -4,7 +4,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/UI Dropdown Binder")] + [AddComponentMenu("Visual Effects/Property Binders/UI Dropdown Binder")] [VFXBinder("UI/Dropdown")] class VFXUIDropdownBinder : VFXBinderBase { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXUISliderBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXUISliderBinder.cs index 60502efa06c..ffa33279ddc 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXUISliderBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXUISliderBinder.cs @@ -4,7 +4,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/UI Slider Binder")] + [AddComponentMenu("Visual Effects/Property Binders/UI Slider Binder")] [VFXBinder("UI/Slider")] class VFXUISliderBinder : VFXBinderBase { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXUIToggleBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXUIToggleBinder.cs index cbaa5955aa8..868a813bd14 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXUIToggleBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXUIToggleBinder.cs @@ -4,7 +4,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/UI Toggle Binder")] + [AddComponentMenu("Visual Effects/Property Binders/UI Toggle Binder")] [VFXBinder("UI/Toggle")] class VFXUIToggleBinder : VFXBinderBase { diff --git a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXVelocityBinder.cs b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXVelocityBinder.cs index ddb54366bff..9b377598ba0 100644 --- a/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXVelocityBinder.cs +++ b/Packages/com.unity.visualeffectgraph/Runtime/Utilities/PropertyBinding/Implementation/VFXVelocityBinder.cs @@ -2,7 +2,7 @@ namespace UnityEngine.VFX.Utility { - [AddComponentMenu("VFX/Property Binders/Velocity Binder")] + [AddComponentMenu("Visual Effects/Property Binders/Velocity Binder")] [VFXBinder("Transform/Velocity")] class VFXVelocityBinder : VFXSpaceableBinder { From 499cc6285a878b1e845a410ad462852e98749078 Mon Sep 17 00:00:00 2001 From: Adrian Smith Date: Wed, 21 Jan 2026 23:50:16 +0000 Subject: [PATCH 36/43] Fix for shaders to be compliant with HLSL 2021 --- .../Runtime/Lighting/SurfaceCache/PatchUtil.hlsl | 4 ++-- .../Runtime/Lighting/SurfaceCache/VectorLogic.hlsl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/PatchUtil.hlsl b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/PatchUtil.hlsl index da06c04ae78..5fd44592bcc 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/PatchUtil.hlsl +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/PatchUtil.hlsl @@ -100,7 +100,7 @@ namespace PatchUtil float2 SphereToSquare(float3 n) { n /= (abs(n.x) + abs(n.y) + abs(n.z)); - n.xy = n.z >= 0.0 ? n.xy : OctWrap(n.xy); + n.xy = VECTOR_LOGIC_SELECT(n.z >= 0.0, n.xy, OctWrap(n.xy)); n.xy = n.xy * 0.5 + 0.5; return n.xy; } @@ -152,7 +152,7 @@ namespace PatchUtil uint3 SignedIntegerModulo(int3 x, uint modulus) { const uint3 remainder = uint3(abs(x)) % modulus; - return VECTOR_LOGIC_SELECT(x < 0 && remainder != 0, modulus - remainder, remainder); + return VECTOR_LOGIC_SELECT(VECTOR_LOGIC_AND(x < 0, remainder != 0), modulus - remainder, remainder); } uint3 ConvertVolumeSpaceToStorageSpace(uint3 posVolSpace, uint spatialResolution, int3 cascadeOffset) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/VectorLogic.hlsl b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/VectorLogic.hlsl index 9c95cd462d3..4186a810511 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/VectorLogic.hlsl +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/SurfaceCache/VectorLogic.hlsl @@ -1,7 +1,7 @@ #ifndef VECTOR_LOGIC #define VECTOR_LOGIC -#if defined(XBOX) +#if defined(SHADER_API_GAMECORE) #define USE_HLSL2021_VECTOR_LOGIC_INTRINSICS #endif @@ -9,7 +9,7 @@ #define VECTOR_LOGIC_AND(x, y) and(x, y) #define VECTOR_LOGIC_OR(x, y) or(x, y) -#define VECTOR_LOGIC_SELECT(condition, trueValue, falseValue) select(condition, trueValue, falseValue) +#define VECTOR_LOGIC_SELECT(condition, trueValue, falseValue) select((condition), (trueValue), (falseValue)) #else From 9d8fe6c2cc42230de0dd8d7ad4d5421914b50072 Mon Sep 17 00:00:00 2001 From: Angela Dematte Date: Wed, 21 Jan 2026 23:50:19 +0000 Subject: [PATCH 37/43] Disable unstable tests --- .../HDRP_DXR_Tests/Assets/Tests/HDRP_DXR_Graphics_Tests.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Tests/SRPTests/Projects/HDRP_DXR_Tests/Assets/Tests/HDRP_DXR_Graphics_Tests.cs b/Tests/SRPTests/Projects/HDRP_DXR_Tests/Assets/Tests/HDRP_DXR_Graphics_Tests.cs index 8e573d83e61..6e0a9f80b21 100644 --- a/Tests/SRPTests/Projects/HDRP_DXR_Tests/Assets/Tests/HDRP_DXR_Graphics_Tests.cs +++ b/Tests/SRPTests/Projects/HDRP_DXR_Tests/Assets/Tests/HDRP_DXR_Graphics_Tests.cs @@ -30,6 +30,11 @@ public class HDRP_Graphics_Tests "1000_RaytracingQualityKeyword_MaterialQuality_Indirect", "Strict Mode not supported" )] + [IgnoreGraphicsTest( + "10001_TerrainReflectionPerf", + "Unstable: https://jira.unity3d.com/browse/UUM-132736", + runtimePlatforms: new RuntimePlatform[] { RuntimePlatform.GameCoreXboxSeries } + )] [IgnoreGraphicsTest( "10004_TerrainPathTracing|10004_TerrainPathTracing_NoDecalSurfaceGradient|5001_PathTracing|5001_PathTracing_Denoised_Intel|5001_PathTracing_Denoised_Optix|5002_PathTracing_GI|5003_PathTracing_transparency|5004_PathTracing_arealight|5005_PathTracing_Fog|5006_PathTracing_DoFVolume|5007_PathTracing_Materials_SG_Lit|5007_PathTracing_Materials_SG_Unlit|5007_PathTracing_Materials_StackLit|5008_PathTracing_NormalMapping|5009_PathTracing_FabricMaterial|501_RecursiveRendering|501_RecursiveRenderingTransparent|5010_PathTracingAlpha|5011_PathTracing_ShadowMatte|5012_PathTracing_Transmission|5013_PathTracing_ShadowFlags|5014_PathTracing_DoubleSidedOverride|5015_PathTracing_DoFCamera|5016_PathTracingTiledRendering|5017_PathTracing_Decals|505_RecursiveRenderingFog|506_RecursiveRenderingTransparentLayer|507_RecursiveRenderingDecal|5019_PathTracing_AmbientOcclusion|5018_PathTracing_MaterialOverrides|5021_PathTracing_Depth_2|5022_PathTracing_Depth_3|5020_PathTracing_Depth_1|5023_PathTracing_MeshInstancing_SG_Lit|5026_PathTracing_BoxLight", "Unsupported", From 14bf887a1b22da8f15e9879172905ea4ce331027 Mon Sep 17 00:00:00 2001 From: Justin Schwartz Date: Thu, 22 Jan 2026 03:19:19 +0000 Subject: [PATCH 38/43] [HDRP] Fixed GPU crash on Switch 2 when using FPTL --- .../Lighting/LightLoop/lightlistbuild.compute | 474 +++++++++--------- .../Runtime/Material/Lit/Lit.shader | 5 + 2 files changed, 247 insertions(+), 232 deletions(-) diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute index 22c77ccbbdb..9d5f151d8f7 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute @@ -24,10 +24,12 @@ #pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch switch2 +#define DIV_ROUND_UP(N, D) (((N) + ((D) - 1)) / (D)) // No division by 0 checks + #define FINE_PRUNING_ENABLED #define PERFORM_SPHERICAL_INTERSECTION_TESTS -#define LIGHT_FPTL_VISIBILITY_DWORD_COUNTS (((SHADEROPTIONS_FPTLMAX_LIGHT_COUNT+1) + 31)/32) +#define LIGHT_FPTL_VISIBILITY_DWORD_COUNTS DIV_ROUND_UP(SHADEROPTIONS_FPTLMAX_LIGHT_COUNT + 1, 32) StructuredBuffer g_vBoundsBuffer : register( t1 ); StructuredBuffer _LightVolumeData : register(t2); @@ -43,7 +45,10 @@ StructuredBuffer g_vBigTileLightList : register( t4 ); // don't sup #define NR_THREADS 64 // default to 64 threads per group on other platforms.. #endif -#define PIXEL_PER_THREAD ((TILE_SIZE_FPTL*TILE_SIZE_FPTL) / NR_THREADS) // 8 or 4 +#define PIXEL_PER_THREAD ((TILE_SIZE_FPTL*TILE_SIZE_FPTL) / NR_THREADS) // 8 or 4 +#if !(PIXEL_PER_THREAD == 4 || PIXEL_PER_THREAD == 8) +#error "Invalid Pixels per Thread. Should be 4 or 8." +#endif // output buffer RWStructuredBuffer g_vLightList : register( u0 ); // don't support RWBuffer yet in unity @@ -51,9 +56,9 @@ RWStructuredBuffer g_vLightList : register( u0 ); // don't sup #define CATEGORY_LIST_SIZE LIGHTCATEGORY_COUNT #define MAX_NR_VISIBLE_LIGHTS 4096 // correspond to m_MaxLightsOnScreen in LightLoop.cs -groupshared unsigned int ldsTilePassList[MAX_NR_VISIBLE_LIGHTS/32]; -groupshared unsigned int coarseList[LIGHT_LIST_MAX_COARSE_ENTRIES]; -groupshared unsigned int prunedList[LIGHT_LIST_MAX_COARSE_ENTRIES]; // temporarily support room for all 64 while in LDS +groupshared uint ldsTilePassList[MAX_NR_VISIBLE_LIGHTS/32]; +groupshared uint coarseList[LIGHT_LIST_MAX_COARSE_ENTRIES]; +groupshared uint prunedList[LIGHT_LIST_MAX_COARSE_ENTRIES]; // temporarily support room for all 64 while in LDS groupshared uint ldsZMin; groupshared uint ldsZMax; @@ -61,9 +66,9 @@ groupshared uint lightOffs; #ifdef FINE_PRUNING_ENABLED groupshared uint ldsDoesLightIntersect[LIGHT_FPTL_VISIBILITY_DWORD_COUNTS]; #endif -groupshared int ldsNrLightsFinal; +groupshared uint ldsNrLightsFinal; -groupshared int ldsCategoryListCount[CATEGORY_LIST_SIZE]; +groupshared uint ldsCategoryListCount[CATEGORY_LIST_SIZE]; #ifdef PERFORM_SPHERICAL_INTERSECTION_TESTS groupshared uint lightOffsSph; @@ -74,7 +79,6 @@ groupshared uint ldsFeatureFlags; RWStructuredBuffer g_TileFeatureFlags; #endif - float GetLinearDepth(float2 pixXY, float zDptBufSpace) // 0 is near 1 is far { float4x4 g_mInvScrProjection = g_mInvScrProjectionArr[unity_StereoEyeIndex]; @@ -88,15 +92,15 @@ float GetLinearDepth(float2 pixXY, float zDptBufSpace) // 0 is near 1 is far float m22 = g_mInvScrProjection[2].z, m23 = g_mInvScrProjection[2].w; float m32 = g_mInvScrProjection[3].z, m33 = g_mInvScrProjection[3].w; - return (m22*zDptBufSpace+m23) / (m32*zDptBufSpace+m33); -#endif + return (m22 * zDptBufSpace + m23) / (m32 * zDptBufSpace + m33); +#endif // USE_OBLIQUE_MODE } float3 GetViewPosFromLinDepth(float2 v2ScrPos, float fLinDepth) { float4x4 g_mScrProjection = g_mScrProjectionArr[unity_StereoEyeIndex]; - bool isOrthographic = g_isOrthographic!=0; + bool isOrthographic = g_isOrthographic != 0; float fSx = g_mScrProjection[0].x; float fSy = g_mScrProjection[1].y; float fCx = isOrthographic ? g_mScrProjection[0].w : g_mScrProjection[0].z; @@ -106,12 +110,12 @@ float3 GetViewPosFromLinDepth(float2 v2ScrPos, float fLinDepth) bool useLeftHandVersion = true; #else bool useLeftHandVersion = isOrthographic; -#endif +#endif // USE_LEFT_HAND_CAMERA_SPACE float s = useLeftHandVersion ? 1 : (-1); - float2 p = float2( (s*v2ScrPos.x-fCx)/fSx, (s*v2ScrPos.y-fCy)/fSy); + float2 p = float2((s * v2ScrPos.x - fCx) / fSx, (s * v2ScrPos.y - fCy) / fSy); - return float3(isOrthographic ? p.xy : (fLinDepth*p.xy), fLinDepth); + return float3(isOrthographic ? p.xy : (fLinDepth * p.xy), fLinDepth); } float GetOnePixDiagWorldDistAtDepthOne() @@ -120,74 +124,85 @@ float GetOnePixDiagWorldDistAtDepthOne() float fSx = g_mScrProjection[0].x; float fSy = g_mScrProjection[1].y; - return length( float2(1.0/fSx,1.0/fSy) ); + return length(float2(1.0 / fSx, 1.0 / fSy)); } #ifdef PERFORM_SPHERICAL_INTERSECTION_TESTS -int SphericalIntersectionTests(uint threadID, int iNrCoarseLights, float2 screenCoordinate); -#endif +int SphericalIntersectionTests(uint threadID, uint iNrCoarseLights, float2 screenCoordinate); +#endif // PERFORM_SPHERICAL_INTERSECTION_TESTS #ifdef FINE_PRUNING_ENABLED #if PIXEL_PER_THREAD == 4 -void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float4 vLinDepths); +void FinePruneLights(uint threadID, uint iNrCoarseLights, uint2 viTilLL, float4 vLinDepths); #else -void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float vLinDepths[PIXEL_PER_THREAD]); -#endif +void FinePruneLights(uint threadID, uint iNrCoarseLights, uint2 viTilLL, float vLinDepths[PIXEL_PER_THREAD]); #endif +#endif // FINE_PRUNING_ENABLED #ifdef USE_TWO_PASS_TILED_LIGHTING uint FetchBigTileLightIndex(uint lightStart, uint lightOffset) { - const uint lightOffsetPlusOne = lightOffset + 1; // Add +1 as first slot is reserved to store number of light + uint lightOffsetPlusOne = lightOffset + 1; // Add +1 as first slot is reserved to store number of light // Light index are store on 16bit - return (g_vBigTileLightList[MAX_NR_BIG_TILE_LIGHTS_PLUS_ONE * lightStart / 2 + (lightOffsetPlusOne >> 1)] >> ((lightOffsetPlusOne & 1) * 16)) & 0xffff; + return ((g_vBigTileLightList[MAX_NR_BIG_TILE_LIGHTS_PLUS_ONE * lightStart / 2u + (lightOffsetPlusOne >> 1)] >> ((lightOffsetPlusOne & 1u) * 16u))) & 0xFFFFu; } -#endif +#endif // USE_TWO_PASS_TILED_LIGHTING + +groupshared uint2 viDimensionsMinusOne; // (g_viDimensions.x - 1, g_viDimensions.y - 1) +groupshared uint nrTilesX; +groupshared uint nrTilesY; [numthreads(NR_THREADS, 1, 1)] void TileLightListGen(uint3 dispatchThreadId : SV_DispatchThreadID, uint threadID : SV_GroupIndex, uint3 u3GroupID : SV_GroupID) { UNITY_XR_ASSIGN_VIEW_INDEX(dispatchThreadId.z); uint2 tileIDX = u3GroupID.xy; - uint t=threadID; - int i; + uint t = threadID; + uint i; - UNITY_UNROLLX(LIGHT_LIST_MAX_COARSE_ENTRIES) - for(i=t; i LIGHT_LIST_MAX_COARSE_ENTRIES; // Uniform runtime branch + bool lightSortRequired = g_iNrVisibLights > LIGHT_LIST_MAX_COARSE_ENTRIES; // Uniform runtime branch if (lightSortRequired) { - UNITY_UNROLLX((MAX_NR_VISIBLE_LIGHTS/32) / NR_THREADS) - for(i=t; i PLATFORM_LANE_COUNT GroupMemoryBarrierWithGroupSync(); #endif - - uint2 viTilLL = 16*tileIDX; + uint2 viTilLL = 16u * tileIDX; // establish min and max depth first - float dpt_mi=asfloat(uFltMax), dpt_ma=0.0; + float dpt_mi = asfloat(uFltMax); + float dpt_ma = 0.0; #if PIXEL_PER_THREAD == 4 @@ -197,14 +212,14 @@ void TileLightListGen(uint3 dispatchThreadId : SV_DispatchThreadID, uint threadI #endif { // Fetch depths and calculate min/max - UNITY_UNROLL + UNITY_UNROLLX(PIXEL_PER_THREAD) for(i = 0; i < PIXEL_PER_THREAD; i++) { - int idx = i * NR_THREADS + t; - uint2 uCrd = min( uint2(viTilLL.x+(idx&0xf), viTilLL.y+(idx>>4)), uint2(iWidth-1, iHeight-1) ); - const float fDepth = FetchDepth(uCrd); - vLinDepths[i] = GetLinearDepth(uCrd+float2(0.5,0.5), fDepth); - if(fDepth> 4)), viDimensionsMinusOne); + float fDepth = FetchDepth(uCrd); + vLinDepths[i] = GetLinearDepth(uCrd + float2(0.5,0.5), fDepth); + if (fDepth < VIEWPORT_SCALE_Z) // if not skydome { dpt_mi = min(fDepth, dpt_mi); dpt_ma = max(fDepth, dpt_ma); @@ -215,72 +230,79 @@ void TileLightListGen(uint3 dispatchThreadId : SV_DispatchThreadID, uint threadI InterlockedMin(ldsZMin, asuint(dpt_mi)); // For some platforms we always need GroupMemoryBarrierWithGroupSync() otherwise results are incorrect. - // Reason is under investigation, related discussions: - // https://unity.slack.com/archives/C02C8FWPNHE/p1704321597295329 - // https://unity.slack.com/archives/G3JUQKYV8/p1705081617447289 + // Reason is under investigation, related discussions: + // https://unity.slack.com/archives/C02C8FWPNHE/p1704321597295329 + // https://unity.slack.com/archives/G3JUQKYV8/p1705081617447289 #if NR_THREADS > PLATFORM_LANE_COUNT || defined(SHADER_API_SWITCH) || defined(SHADER_API_SWITCH2) GroupMemoryBarrierWithGroupSync(); #endif } + // the lower left and upper right corners of the tile's bounding box to test each light's bounding box against + float3 vTileLL = float3(viTilLL.x / (float)g_viDimensions.x, viTilLL.y / (float)g_viDimensions.y, asfloat(ldsZMin)); + float3 vTileUR = float3((viTilLL.x + 16) / (float)g_viDimensions.x, (viTilLL.y + 16) / (float)g_viDimensions.y, asfloat(ldsZMax)); + vTileUR.xy = min(vTileUR.xy, float2(1.0, 1.0)).xy; - float3 vTileLL = float3(viTilLL.x/(float) iWidth, viTilLL.y/(float) iHeight, asfloat(ldsZMin)); - float3 vTileUR = float3((viTilLL.x+16)/(float) iWidth, (viTilLL.y+16)/(float) iHeight, asfloat(ldsZMax)); - vTileUR.xy = min(vTileUR.xy,float2(1.0,1.0)).xy; - + // number of lights processed using AABB + uint nrLightsProc; // build coarse list using AABB #ifdef USE_TWO_PASS_TILED_LIGHTING - const uint log2BigTileToTileRatio = firstbithigh(64) - firstbithigh(16); - - int NrBigTilesX = (nrTilesX + ((1 << log2BigTileToTileRatio) -1 )) >> log2BigTileToTileRatio; - int NrBigTilesY = (nrTilesY + ((1 << log2BigTileToTileRatio) - 1)) >> log2BigTileToTileRatio; - const int bigTileBase = unity_StereoEyeIndex * NrBigTilesX * NrBigTilesY; - const uint bigTileIdx = bigTileBase + (tileIDX.y>>log2BigTileToTileRatio)*NrBigTilesX + (tileIDX.x>>log2BigTileToTileRatio); // map the idx to 64x64 tiles - int nrBigTileLights = g_vBigTileLightList[MAX_NR_BIG_TILE_LIGHTS_PLUS_ONE * bigTileIdx / 2 + 0] & 0xFFFF; - for(int l0=(int) t; l0<(int) nrBigTileLights; l0 += NR_THREADS) + const uint log2BigTileToTileRatio = 6 - 4; // firstbithigh(64) - firstbithigh(16) + + uint NrBigTilesX = (nrTilesX + ((1 << log2BigTileToTileRatio) - 1)) >> log2BigTileToTileRatio; + uint NrBigTilesY = (nrTilesY + ((1 << log2BigTileToTileRatio) - 1)) >> log2BigTileToTileRatio; + uint bigTileBase = unity_StereoEyeIndex * NrBigTilesX * NrBigTilesY; + uint bigTileIdx = bigTileBase + (tileIDX.y >> log2BigTileToTileRatio) * NrBigTilesX + (tileIDX.x >> log2BigTileToTileRatio); // map the idx to 64x64 tiles + uint nrBigTileLights = g_vBigTileLightList[MAX_NR_BIG_TILE_LIGHTS_PLUS_ONE * bigTileIdx / 2u + 0u] & 0xFFFFu; + nrLightsProc = nrBigTileLights; + for (uint l0 = t; l0 < nrBigTileLights; l0 += NR_THREADS) { - int l = FetchBigTileLightIndex(bigTileIdx, l0); + uint l = FetchBigTileLightIndex(bigTileIdx, l0); #else - for(int l=(int) t; l<(int) g_iNrVisibLights; l += NR_THREADS) + nrLightsProc = (uint)g_iNrVisibLights; + for (uint l = t; l < (uint)g_iNrVisibLights; l += NR_THREADS) { -#endif - const ScreenSpaceBoundsIndices boundsIndices = GenerateScreenSpaceBoundsIndices(l, g_iNrVisibLights, unity_StereoEyeIndex); - const float3 vMi = g_vBoundsBuffer[boundsIndices.min].xyz; - const float3 vMa = g_vBoundsBuffer[boundsIndices.max].xyz; +#endif // USE_TWO_PASS_TILED_LIGHTING + ScreenSpaceBoundsIndices boundsIndices = GenerateScreenSpaceBoundsIndices(l, (uint)g_iNrVisibLights, unity_StereoEyeIndex); + float3 vMi = g_vBoundsBuffer[boundsIndices.min].xyz; + float3 vMa = g_vBoundsBuffer[boundsIndices.max].xyz; - if( all(vMa>vTileLL) && all(vMi vTileLL) && all(vMi < vTileUR)) { - unsigned int uInc = 1; - unsigned int uIndex; - unsigned int ul = l; - InterlockedAdd(lightOffs, uInc, uIndex); + uint uIndex; + InterlockedAdd(lightOffs, 1u, uIndex); if (lightSortRequired) - InterlockedOr(ldsTilePassList[ul >> 5], 1u << (ul & (32 - 1))); // ldsTilePassList[ul/32] |= 1u << (ul % 32); + { + InterlockedOr(ldsTilePassList[l >> 5], 1u << (l & (32 - 1))); // ldsTilePassList[l/32] |= 1u << (l % 32); + } else - if(uIndex PLATFORM_LANE_COUNT GroupMemoryBarrierWithGroupSync(); #endif + // Ascending sort to prevent unpredictable light list when the number of visible lights is greater than the coarse entries. - if(t==0) + if (t == 0) { - int c=0; - for (int ii = 0; ii < MAX_NR_VISIBLE_LIGHTS/32 && c < LIGHT_LIST_MAX_COARSE_ENTRIES; ii++) + uint c = 0; + for (uint ii = 0; ii < MAX_NR_VISIBLE_LIGHTS/32 && c < LIGHT_LIST_MAX_COARSE_ENTRIES; ii++) { - unsigned int mask = ldsTilePassList[ii]; + uint mask = ldsTilePassList[ii]; while (mask != 0u && c < LIGHT_LIST_MAX_COARSE_ENTRIES) { - unsigned int l = firstbitlow(mask); + uint l = firstbitlow(mask); mask &= ~(1u << l); coarseList[c++] = ii * 32 + l; } @@ -292,17 +314,19 @@ void TileLightListGen(uint3 dispatchThreadId : SV_DispatchThreadID, uint threadI GroupMemoryBarrierWithGroupSync(); #endif - int iNrCoarseLights = min(lightOffs,LIGHT_LIST_MAX_COARSE_ENTRIES); + uint iNrCoarseLights = min(lightOffs, LIGHT_LIST_MAX_COARSE_ENTRIES); #ifdef PERFORM_SPHERICAL_INTERSECTION_TESTS - iNrCoarseLights = SphericalIntersectionTests( t, iNrCoarseLights, float2(min(viTilLL.xy+uint2(16/2,16/2), uint2(iWidth-1, iHeight-1))) ); -#endif + iNrCoarseLights = SphericalIntersectionTests(t, iNrCoarseLights, float2(min(viTilLL.xy + uint2(16 / 2, 16 / 2), viDimensionsMinusOne))); +#endif // PERFORM_SPHERICAL_INTERSECTION_TESTS #ifndef FINE_PRUNING_ENABLED { - UNITY_UNROLL - for(i=t; i PLATFORM_LANE_COUNT GroupMemoryBarrierWithGroupSync(); #endif - - int nrLightsCombinedList = min(ldsNrLightsFinal,LIGHT_LIST_MAX_COARSE_ENTRIES); - for(i=t; i>1; - for(int l=(int) t; l<(int) nrDWords; l += NR_THREADS) + uint nrDWords = ((nrLightsFinalClamped + 1) + 1) >> 1; + for (uint l = t; l < nrDWords; l += NR_THREADS) { // We remap the prunedList index to the original LightData / EnvLightData indices - uint uLow = l==0 ? nrLightsFinalClamped : prunedList[max(0,2 * l - 1 + localOffs)] - shiftIndex[category]; + uint uLow = l == 0 ? nrLightsFinalClamped : prunedList[max(0, 2 * (int)l - 1 + (int)localOffs)] - shiftIndex[category]; uint uHigh = prunedList[2 * l + 0 + localOffs] - shiftIndex[category]; - g_vLightList[LIGHT_DWORD_PER_FPTL_TILE*offs + l] = (uLow&0xffff) | (uHigh<<16); + g_vLightList[LIGHT_DWORD_PER_FPTL_TILE * offs + l] = (uLow & 0xFFFFu) | (uHigh << 16); } localOffs += nrLightsFinal; - offs += (nrTilesX*nrTilesY); + offs += (nrTilesX * nrTilesY); } } #ifdef PERFORM_SPHERICAL_INTERSECTION_TESTS -int SphericalIntersectionTests(uint threadID, int iNrCoarseLights, float2 screenCoordinate) +int SphericalIntersectionTests(uint threadID, uint iNrCoarseLights, float2 screenCoordinate) { - if(threadID==0) lightOffsSph = 0; + if (threadID == 0) lightOffsSph = 0; // make a copy of coarseList in prunedList. - int l; - for(l=threadID; l PLATFORM_LANE_COUNT GroupMemoryBarrierWithGroupSync(); #endif #if USE_LEFT_HAND_CAMERA_SPACE - float3 V = GetViewPosFromLinDepth( screenCoordinate, 1.0); + float3 V = GetViewPosFromLinDepth(screenCoordinate, 1.0); #else - float3 V = GetViewPosFromLinDepth( screenCoordinate, -1.0); -#endif + float3 V = GetViewPosFromLinDepth(screenCoordinate, -1.0); +#endif // USE_LEFT_HAND_CAMERA_SPACE float onePixDiagDist = GetOnePixDiagWorldDistAtDepthOne(); - float halfTileSizeAtZDistOne = 8*onePixDiagDist; // scale by half a tile + float halfTileSizeAtZDistOne = 8 * onePixDiagDist; // scale by half a tile - for(l=threadID; l> 3); - volumeType = (int)(data & 0x7); + coarseIndex = (uint)(data >> 3); + volumeType = (uint)(data & 0x7u); +#endif // USE_SPLIT_LIGHT_VOLUME_CACHE } // initializes ldsNrLightsFinal with the number of accepted lights. // all accepted entries delivered in prunedList[]. #if PIXEL_PER_THREAD == 4 -void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float4 vLinDepths) // keep float4 vectorization when possible, as shader compiler may generate bad code for array of floats. +void FinePruneLights(uint threadID, uint iNrCoarseLights, uint2 viTilLL, float4 vLinDepths) // keep float4 vectorization when possible, as shader compiler may generate bad code for array of floats. #else -void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float vLinDepths[PIXEL_PER_THREAD]) +void FinePruneLights(uint threadID, uint iNrCoarseLights, uint2 viTilLL, float vLinDepths[PIXEL_PER_THREAD]) #endif { uint t = threadID; - uint iWidth = g_viDimensions.x; - uint iHeight = g_viDimensions.y; uint uLightsFlags[LIGHT_FPTL_VISIBILITY_DWORD_COUNTS]; { - [unroll(LIGHT_FPTL_VISIBILITY_DWORD_COUNTS)] + UNITY_UNROLLX(LIGHT_FPTL_VISIBILITY_DWORD_COUNTS) for (uint ii = 0; ii < LIGHT_FPTL_VISIBILITY_DWORD_COUNTS; ++ii) + { uLightsFlags[ii] = 0u; + } } - int l=0; - // need this outer loop even on xb1 and ps4 since direct lights and - // reflection lights are kept in separate regions. - { - #define MAX_FINE_PRUNE_LOOP_CNT (((SHADEROPTIONS_FPTLMAX_LIGHT_COUNT+1) + NR_THREADS - 1)/NR_THREADS) - [unroll(MAX_FINE_PRUNE_LOOP_CNT)] - for (uint it = 0; it < MAX_FINE_PRUNE_LOOP_CNT; ++it) + for (uint i = t; i < iNrCoarseLights; i += NR_THREADS) { - uint i = t + it * NR_THREADS; - if (i < (uint)iNrCoarseLights) - { - int idxCoarse = GetCoarseLightIndex((int)i, iNrCoarseLights); - int uLightVolume = (int)_LightVolumeData[idxCoarse].lightVolume; - StoreLightVolumeCache(i, idxCoarse, uLightVolume); - } + uint idxCoarse = GetCoarseLightIndex(i, iNrCoarseLights); + uint uLightVolume = (uint)_LightVolumeData[idxCoarse].lightVolume; + StoreLightVolumeCache(i, idxCoarse, uLightVolume); } } -#if NR_THREADS > PLATFORM_LANE_COUNT +#if NR_THREADS > PLATFORM_LANE_COUNT || defined(SHADER_API_SWITCH) || defined(SHADER_API_SWITCH2) GroupMemoryBarrierWithGroupSync(); #endif //When using LDS to cache the volume data, this produces the best most optimal code. //Doing a manual loop like the one below adds an extra cost of .1 ms on ps4 if we use LDS. - for (; l < iNrCoarseLights; ++l) + for (uint l = 0; l < iNrCoarseLights; ++l) { - int idxCoarse; - int uLightVolume; + uint idxCoarse; + uint uLightVolume; LoadLightVolumeCache(l, idxCoarse, uLightVolume); - // WARNING: we use here a uint for lightValid because there is a bug with the unity vulkan compiler. - // If this is a bool, the second dword of uLightsFlags never gets written to, which causes light tile artifacts - // on tiles that have more than 32 lights. - uint lightValid = 0; + bool lightValid = false; if (uLightVolume == LIGHTVOLUMETYPE_CONE) { LightVolumeData lightData = _LightVolumeData[idxCoarse]; - const bool bIsSpotDisc = true; // (lightData.flags&IS_CIRCULAR_SPOT_SHAPE) != 0; - for(int i=0; i>4)), uint2(iWidth-1, iHeight-1)); + uint2 uPixLoc = min(uint2(viTilLL.x + (idx & 0xFu), viTilLL.y + (idx >> 4)), viDimensionsMinusOne); float3 vVPos = GetViewPosFromLinDepth(uPixLoc + float2(0.5,0.5), vLinDepths[i]); // check pixel float3 fromLight = vVPos-lightData.lightPos.xyz; float distSq = dot(fromLight,fromLight); - const float fSclProj = dot(fromLight, lightData.lightAxisZ.xyz); // spotDir = lightData.lightAxisZ.xyz + float fSclProj = dot(fromLight, lightData.lightAxisZ.xyz); // spotDir = lightData.lightAxisZ.xyz float2 V = abs( float2( dot(fromLight, lightData.lightAxisX.xyz), dot(fromLight, lightData.lightAxisY.xyz) ) ); float fDist2D = bIsSpotDisc ? length(V) : max(V.x,V.y); - bool validInPixel = all( float2(lightData.radiusSq, fSclProj) > float2(distSq, fDist2D*lightData.cotan) ); + bool validInPixel = all( float2(lightData.radiusSq, fSclProj) > float2(distSq, fDist2D * lightData.cotan) ); #ifdef PLATFORM_SUPPORTS_WAVE_INTRINSICS //a wave is on the same tile, and the loop is uniform for the wave. // thus we early out if at least 1 thread in the wave passed this light, saving some ALU. lightValid = WaveActiveAnyTrue(validInPixel); #else lightValid = validInPixel; -#endif +#endif // PLATFORM_SUPPORTS_WAVE_INTRINSICS if (lightValid) break; } @@ -547,11 +582,11 @@ void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float vL else if (uLightVolume == LIGHTVOLUMETYPE_SPHERE) { LightVolumeData lightData = _LightVolumeData[idxCoarse]; - for(int i=0; i>4)), uint2(iWidth-1, iHeight-1)); + uint2 uPixLoc = min(uint2(viTilLL.x + (idx & 0xFu), viTilLL.y + (idx >> 4)), viDimensionsMinusOne); float3 vVPos = GetViewPosFromLinDepth(uPixLoc + float2(0.5,0.5), vLinDepths[i]); // check pixel @@ -564,7 +599,7 @@ void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float vL lightValid = WaveActiveAnyTrue(validInPixel); #else lightValid = validInPixel; -#endif +#endif // PLATFORM_SUPPORTS_WAVE_INTRINSICS if (lightValid) break; } @@ -572,11 +607,11 @@ void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float vL else if (uLightVolume == LIGHTVOLUMETYPE_BOX) { LightVolumeData lightData = _LightVolumeData[idxCoarse]; - for(int i=0; i>4)), uint2(iWidth-1, iHeight-1)); + uint2 uPixLoc = min(uint2(viTilLL.x + (idx & 0xFu), viTilLL.y + (idx >> 4)), viDimensionsMinusOne); float3 vVPos = GetViewPosFromLinDepth(uPixLoc + float2(0.5,0.5), vLinDepths[i]); // check pixel @@ -589,7 +624,7 @@ void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float vL lightValid = WaveActiveAnyTrue(validInPixel); #else lightValid = validInPixel; -#endif +#endif // PLATFORM_SUPPORTS_WAVE_INTRINSICS if (lightValid) break; } @@ -599,22 +634,24 @@ void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float vL // Imlicit division by 32, to pick the correct array index. // E.g 37th light devided by 32 = 1.15 (rounded to 1), so we pick uLightsFlags[1] (which represents the lights from 32 to 64). - uLightsFlags[l >> 5] |= lightValid << (l&31); + uLightsFlags[l >> 5] |= lightValid ? 1u << (l & 31u) : 0u; } // Merge results from all threads into shared memory. // `InterlockedOr` performs a bitwise OR between `ldsDoesLightIntersect` and `uLightsFlags`. // This allows multiple threads to update `ldsDoesLightIntersect` without collision. { - [unroll(LIGHT_FPTL_VISIBILITY_DWORD_COUNTS)] + UNITY_UNROLLX(LIGHT_FPTL_VISIBILITY_DWORD_COUNTS) for (uint ii = 0; ii < LIGHT_FPTL_VISIBILITY_DWORD_COUNTS; ++ii) + { InterlockedOr(ldsDoesLightIntersect[ii], uLightsFlags[ii]); + } } // For some platforms we always need GroupMemoryBarrierWithGroupSync() otherwise results are incorrect. - // Reason is under investigation, related discussions: - // https://unity.slack.com/archives/C02C8FWPNHE/p1704321597295329 - // https://unity.slack.com/archives/G3JUQKYV8/p1705081617447289 + // Reason is under investigation, related discussions: + // https://unity.slack.com/archives/C02C8FWPNHE/p1704321597295329 + // https://unity.slack.com/archives/G3JUQKYV8/p1705081617447289 #if NR_THREADS > PLATFORM_LANE_COUNT || defined(SHADER_API_SWITCH) || defined(SHADER_API_SWITCH2) GroupMemoryBarrierWithGroupSync(); #endif @@ -624,56 +661,29 @@ void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float vL if (t == 0) ldsNrLightsFinal = 0; - // Split the job into multiple passes to ensure all lights are processed even if NR_THREADS is smaller than SHADEROPTIONS_FPTLMAX_LIGHT_COUNT. - // A thread will possibly processes many lights. - #define MAX_LIGHT_WRITE_LOOP_CNT (((SHADEROPTIONS_FPTLMAX_LIGHT_COUNT+1) + NR_THREADS - 1)/NR_THREADS) - [unroll(MAX_LIGHT_WRITE_LOOP_CNT)] - for (uint it = 0; it < MAX_LIGHT_WRITE_LOOP_CNT; ++it) + // Retrieve the light index for the current thread and current iteration. + for (uint lightIndex = t; lightIndex < iNrCoarseLights; lightIndex += NR_THREADS) { - // Retrieve the light index for the current thread and current iteration. - uint lightIndex = t + it * NR_THREADS; - // Check if the mask of the current light is valid (intersection with the tile). uint lightsMask = ldsDoesLightIntersect[lightIndex >> 5]; // Select only the current light bit i in the block of 32. - uint localMask = (1u << (lightIndex & 31)); + uint localMask = (1u << (lightIndex & 31u)); // If the thread index is in the light list and the mask is valid. - if (lightIndex < (uint)iNrCoarseLights && (localMask & lightsMask) != 0u) + if ((localMask & lightsMask) != 0u) { - // ldsDoesLightIntersect[k] contains the valid lights for each block of 32 lights. - // We sum the number of enabled bits (countbits()) in all blocks before the block i. - // backOffset represents the number of valid lights before the block where i is located. - uint backOffset = 0; - [unroll(LIGHT_FPTL_VISIBILITY_DWORD_COUNTS)] - for (uint k = 0u; k < LIGHT_FPTL_VISIBILITY_DWORD_COUNTS; ++k) - if (k < (lightIndex >> 5)) - backOffset += countbits(ldsDoesLightIntersect[k]); - - // Count the number of valid lights (set bits) in the current 32-bit block before the current lightIndex. - uint lightsInActualBlock = countbits((localMask - 1u) & lightsMask); - - // Determine the index of the current light by calculating how many lights were stored before it. - // This ensures that lights are packed correctly without gaps. - uint uIndex = backOffset + lightsInActualBlock; - - // Ensure the computed index does not exceed the max allowed light entries. - if (uIndex < LIGHT_LIST_MAX_COARSE_ENTRIES) - { - // InterlockedAdd ensures atomic and ordered writing to prunedList, preventing threads from overwriting each other's values. - // Increment ldsNrLightsFinal (represents the total number of lights for the tile). - unsigned int uInc = 1; - unsigned int finalPrunedLightIndex; - InterlockedAdd(ldsNrLightsFinal, uInc, finalPrunedLightIndex); - - // Add the light to the prune list. If the index varies due to desynchronization (e.g without the previous InterlockedAdd), - // it can causes flickering (mostly seen on Metal and Apple GPUs). - if (finalPrunedLightIndex < LIGHT_LIST_MAX_COARSE_ENTRIES) - prunedList[finalPrunedLightIndex] = coarseList[lightIndex]; - } + // InterlockedAdd ensures atomic and ordered writing to prunedList, preventing threads from overwriting each other's values. + // Increment ldsNrLightsFinal (represents the total number of lights for the tile). + uint finalPrunedLightIndex; + InterlockedAdd(ldsNrLightsFinal, 1u, finalPrunedLightIndex); + + // Add the light to the prune list. If the index varies due to desynchronization (e.g without the previous InterlockedAdd), + // it can causes flickering (mostly seen on Metal and Apple GPUs). + if (finalPrunedLightIndex < LIGHT_LIST_MAX_COARSE_ENTRIES) + prunedList[finalPrunedLightIndex] = coarseList[lightIndex]; } } } } -#endif +#endif // FINE_PRUNING_ENABLED diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader b/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader index a1d73f1f002..82d63c22218 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/Lit.shader @@ -144,6 +144,7 @@ Shader "HDRP/Lit" [Enum(UnityEngine.Rendering.HighDefinition.OpaqueCullMode)] _OpaqueCullMode("_OpaqueCullMode", Int) = 2 // Back culling by default [HideInInspector] _ZTestDepthEqualForOpaque("_ZTestDepthEqualForOpaque", Int) = 4 // Less equal [HideInInspector] _ZTestGBuffer("_ZTestGBuffer", Int) = 4 + [HideInInspector] _ZClip("_ZClip", Float) = 1.0 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTestTransparent("Transparent ZTest", Int) = 4 // Less equal [ToggleUI] _EnableFogOnTransparent("Enable Fog", Float) = 1.0 @@ -911,6 +912,8 @@ Shader "HDRP/Lit" #pragma shader_feature_local _DISABLE_SSR_TRANSPARENT #pragma shader_feature_local_fragment _ _REFRACTION_PLANE _REFRACTION_SPHERE _REFRACTION_THIN + #pragma switch2_extended_structured_buffer_bindings + #ifndef SHADER_STAGE_FRAGMENT #define SHADOW_LOW #endif @@ -1043,6 +1046,8 @@ Shader "HDRP/Lit" #pragma shader_feature_local _ADD_PRECOMPUTED_VELOCITY + #pragma switch2_extended_structured_buffer_bindings + #ifndef SHADER_STAGE_FRAGMENT #define SHADOW_LOW #ifndef USE_FPTL_LIGHTLIST From 5754d42347112bb789222a3a7e00c48877acca29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Carr=C3=A8re?= Date: Thu, 22 Jan 2026 08:43:54 +0000 Subject: [PATCH 39/43] docg-8262: Fix typo --- .../Documentation~/Shader-Graph-Sample-UGUI-Shaders.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-UGUI-Shaders.md b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-UGUI-Shaders.md index da576e96f05..e77ef30e74f 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-UGUI-Shaders.md +++ b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-UGUI-Shaders.md @@ -24,7 +24,7 @@ We have two main objectives with this sample set: Documentation for this set of samples is broken into the following pages: * [Getting started](Shader-Graph-Sample-UGUI-Shaders-Getting-Started.md) -* [Custom UI componenents](Shader-Graph-Sample-UGUI-Shaders-Custom-UI-components.md) +* [Custom UI components](Shader-Graph-Sample-UGUI-Shaders-Custom-UI-components.md) * [Custom nodes](Shader-Graph-Sample-UGUI-Shaders-Custom-nodes.md) * [Subgraph nodes](Shader-Graph-Sample-UGUI-Shaders-Subgraph-nodes.md) * [Examples](Shader-Graph-Sample-UGUI-Shaders-Examples.md) From 62bc2e5418fa8e5715a65abfa2f68fb367f38b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolaj=20Z=C3=B8llner?= Date: Thu, 22 Jan 2026 15:58:46 +0000 Subject: [PATCH 40/43] Reenabled apv baking test - APV_WhenBakingTwice_MustBakeBoth --- .../Editor/PathTracing/BakeInputToWorldConversion.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Packages/com.unity.render-pipelines.core/Editor/PathTracing/BakeInputToWorldConversion.cs b/Packages/com.unity.render-pipelines.core/Editor/PathTracing/BakeInputToWorldConversion.cs index b83ba215aa6..ff5ba7c9097 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/PathTracing/BakeInputToWorldConversion.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/PathTracing/BakeInputToWorldConversion.cs @@ -418,7 +418,6 @@ internal static void ConvertInstancesAndMeshes( else LightmapIntegrationHelpers.ComputeUVBounds(meshes[i].uv2, out uvBoundsSizes[i], out uvBoundsOffsets[i]); } - Debug.Assert(meshes.Length == bakeInput.meshData.Length); // Baking specific settings RenderedGameObjectsFilter filter = RenderedGameObjectsFilter.OnlyStatic; From bcc40b7362033206759dd0f2f59f9321f0e1e18c Mon Sep 17 00:00:00 2001 From: Justin Schwartz Date: Thu, 22 Jan 2026 15:58:46 +0000 Subject: [PATCH 41/43] [HDRP] Added Missing `_BentNormalMapOS` Texture Declaration --- .../Runtime/Material/Lit/LitProperties.hlsl | 1 + 1 file changed, 1 insertion(+) diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl b/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl index 6ad0723ef7a..2c17ee4f896 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/LitProperties.hlsl @@ -85,6 +85,7 @@ SAMPLER(sampler_CoatMaskMap); PROP_DECL_TEX2D(_BaseColorMap); PROP_DECL_TEX2D(_MaskMap); PROP_DECL_TEX2D(_BentNormalMap); +PROP_DECL_TEX2D(_BentNormalMapOS); PROP_DECL_TEX2D(_NormalMap); PROP_DECL_TEX2D(_NormalMapOS); PROP_DECL_TEX2D(_DetailMap); From cdb87a84ef05f90196f8e60f932b7593e494eba0 Mon Sep 17 00:00:00 2001 From: Kirill Titov Date: Thu, 22 Jan 2026 20:52:32 +0000 Subject: [PATCH 42/43] Partially revert a PR #81816 and register debug data when in build process --- .../Runtime/Debugging/DebugDisplaySettingsUI.cs | 4 ---- .../Runtime/Debug/DebugDisplay.cs | 7 +------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsUI.cs b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsUI.cs index 726a3c34701..bb29b4cf382 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsUI.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsUI.cs @@ -32,10 +32,6 @@ private void Reset() /// to be registered public void RegisterDebug(IDebugDisplaySettings settings) { -#if UNITY_EDITOR - if (UnityEditor.BuildPipeline.isBuildingPlayer) - return; -#endif DebugManager debugManager = DebugManager.instance; List panels = new List(); diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs index 7ded743ff74..b891cd00db2 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs @@ -2125,11 +2125,6 @@ void UnregisterRenderingDebug() internal void RegisterDebug() { -#if UNITY_EDITOR - if (UnityEditor.BuildPipeline.isBuildingPlayer) - return; -#endif - RegisterMaterialDebug(); RegisterLightingDebug(); RegisterRenderingDebug(); @@ -2149,7 +2144,7 @@ void UnregisterDebugItems(string panelName, DebugUI.Widget[] items) { if (items == null || items.Length == 0) return; - + var panel = DebugManager.instance.GetPanel(panelName); if (panel != null) panel.children.Remove(items); From df3511ef37097600ef2be9f3b5743e2791ef19ae Mon Sep 17 00:00:00 2001 From: Arttu Peltonen Date: Thu, 22 Jan 2026 20:52:34 +0000 Subject: [PATCH 43/43] Fix SampleDependencyImporter errors when opening/closing the window rapidly --- .../SampleDependencyImporter.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Packages/com.unity.render-pipelines.core/Editor/SampleDependencyImportSystem/SampleDependencyImporter.cs b/Packages/com.unity.render-pipelines.core/Editor/SampleDependencyImportSystem/SampleDependencyImporter.cs index 2c2fad2aeb9..fcc9fb36d9a 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/SampleDependencyImportSystem/SampleDependencyImporter.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/SampleDependencyImportSystem/SampleDependencyImporter.cs @@ -48,7 +48,7 @@ VisualElement panelRoot { get { - _panelRoot ??= injectingElement.panel.visualTree; + _panelRoot ??= injectingElement?.panel?.visualTree; return _panelRoot; } } @@ -82,11 +82,11 @@ VisualElement IPackageManagerExtension.CreateExtensionUI() void RefreshSampleButtons() { - if (injectingElement == null || m_PackageInfo == null || m_SampleList == null) + if (injectingElement == null || m_PackageInfo == null || m_SampleList == null || panelRoot == null) return; // Call refresh of samples and button injection when switching to the "Samples" tab. - if (samplesButton == null ) + if (samplesButton == null) { samplesButton = panelRoot.Q