diff --git a/Packages/com.unity.render-pipelines.core/Editor/Deprecated.cs b/Packages/com.unity.render-pipelines.core/Editor/Deprecated.cs
index cea5bdd6..e2431b6e 100644
--- a/Packages/com.unity.render-pipelines.core/Editor/Deprecated.cs
+++ b/Packages/com.unity.render-pipelines.core/Editor/Deprecated.cs
@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
+using UnityEngine.UIElements;
namespace UnityEditor.Rendering
{
@@ -182,7 +183,28 @@ namespace UnityEditor.Rendering
}
}
+ public abstract partial class DefaultVolumeProfileSettingsPropertyDrawer
+ {
+ ///
+ /// Context menu implementation for Default Volume Profile.
+ ///
+ /// Default Volume Profile Settings type
+ /// Render Pipeline type
+ [Obsolete("Use DefaultVolumeProfileSettingsPropertyDrawer.DefaultVolumeProfileSettingsContextMenu2 instead #from(6000.0)")]
+ public abstract class DefaultVolumeProfileSettingsContextMenu : IRenderPipelineGraphicsSettingsContextMenu
+ where TSetting : class, IDefaultVolumeProfileSettings
+ where TRenderPipeline : RenderPipeline
+ {
+ ///
+ /// Path where new Default Volume Profile will be created.
+ ///
+ [Obsolete("Not used anymore. #from(6000.0)")]
+ protected abstract string defaultVolumeProfilePath { get; }
+ [Obsolete("Not used anymore. #from(6000.0)")]
+ void IRenderPipelineGraphicsSettingsContextMenu.PopulateContextMenu(TSetting setting, PropertyDrawer property, ref GenericMenu menu){ }
+ }
+ }
///
/// Builtin Drawer for Maskfield Debug Items.
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 b126b6cf..45851c6f 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
@@ -1419,11 +1419,14 @@ namespace UnityEngine.Rendering
if (m_BakingSet.hasDilation)
{
// This subsequent block needs to happen AFTER we call WriteBakingCells.
- // Otherwise in cases where we change the spacing between probes, we end up loading cells with a certain layout in ForceSHBand
+ // Otherwise, in cases where we change the spacing between probes, we end up loading cells with a certain layout in ForceSHBand
// And then we unload cells using the wrong layout in PerformDilation (after WriteBakingCells updates the baking set object) which leads to a broken internal state.
// Don't use Disk streaming to avoid having to wait for it when doing dilation.
probeRefVolume.ForceNoDiskStreaming(true);
+ // Increase the memory budget to make sure we can fit the current cell and all its neighbors when doing dilation.
+ var prevMemoryBudget = probeRefVolume.memoryBudget;
+ probeRefVolume.ForceMemoryBudget(ProbeVolumeTextureMemoryBudget.MemoryBudgetHigh);
// Force maximum sh bands to perform baking, we need to store what sh bands was selected from the settings as we need to restore it after.
var prevSHBands = probeRefVolume.shBands;
probeRefVolume.ForceSHBand(ProbeVolumeSHBands.SphericalHarmonicsL2);
@@ -1434,8 +1437,9 @@ namespace UnityEngine.Rendering
using (new BakingCompleteProfiling(BakingCompleteProfiling.Stages.PerformDilation))
PerformDilation();
- // Need to restore the original state
+ // Restore the original state.
probeRefVolume.ForceNoDiskStreaming(false);
+ probeRefVolume.ForceMemoryBudget(prevMemoryBudget);
probeRefVolume.ForceSHBand(prevSHBands);
}
else
diff --git a/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.SidePanel.cs b/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.SidePanel.cs
index 8ae75375..bd77c36e 100644
--- a/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.SidePanel.cs
+++ b/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.SidePanel.cs
@@ -18,6 +18,14 @@ namespace UnityEditor.Rendering
"Compute Pass"
};
+ static readonly string[] k_PassTypeNamesNotMergedMessage =
+ {
+ "This is a Legacy Render Pass. Only Raster Render Passes can be merged.",
+ "This is an Unsafe Render Pass. Only Raster Render Passes can be merged.",
+ "Pass merging was disabled.",
+ "This is a Compute Pass. Only Raster Render Passes can be merged."
+ };
+
static partial class Names
{
public const string kPanelContainer = "panel-container";
@@ -370,8 +378,7 @@ namespace UnityEditor.Rendering
else
{
CreateTextElement(passItem, "Pass break reasoning", Classes.kSubHeaderText);
- var msg = $"This is a {k_PassTypeNames[(int) firstPassData.type]}. Only Raster Render Passes can be merged.";
- msg = msg.Replace("a Unsafe", "an Unsafe");
+ string msg = k_PassTypeNamesNotMergedMessage[(int)firstPassData.type];
CreateTextElement(passItem, msg);
}
diff --git a/Packages/com.unity.render-pipelines.core/Editor/Settings/PropertyDrawers/DefaultVolumeProfileSettingsPropertyDrawer.cs b/Packages/com.unity.render-pipelines.core/Editor/Settings/PropertyDrawers/DefaultVolumeProfileSettingsPropertyDrawer.cs
index b030fc73..bd307155 100644
--- a/Packages/com.unity.render-pipelines.core/Editor/Settings/PropertyDrawers/DefaultVolumeProfileSettingsPropertyDrawer.cs
+++ b/Packages/com.unity.render-pipelines.core/Editor/Settings/PropertyDrawers/DefaultVolumeProfileSettingsPropertyDrawer.cs
@@ -8,7 +8,7 @@ namespace UnityEditor.Rendering
///
/// Base implementation for drawing Default Volume Profile UI in Graphics Settings.
///
- public abstract class DefaultVolumeProfileSettingsPropertyDrawer : PropertyDrawer
+ public abstract partial class DefaultVolumeProfileSettingsPropertyDrawer : PropertyDrawer
{
// UUM-77758: Due to how PropertyDrawers are created and cached, there is no way to retrieve them reliably
// later. We know that only one DefaultVolumeProfile exists at any given time, so we can access it through
@@ -118,7 +118,7 @@ namespace UnityEditor.Rendering
///
/// Default Volume Profile Settings type
/// Render Pipeline type
- public abstract class DefaultVolumeProfileSettingsContextMenu : IRenderPipelineGraphicsSettingsContextMenu
+ public abstract class DefaultVolumeProfileSettingsContextMenu2 : IRenderPipelineGraphicsSettingsContextMenu2
where TSetting : class, IDefaultVolumeProfileSettings
where TRenderPipeline : RenderPipeline
{
@@ -127,7 +127,7 @@ namespace UnityEditor.Rendering
///
protected abstract string defaultVolumeProfilePath { get; }
- void IRenderPipelineGraphicsSettingsContextMenu.PopulateContextMenu(TSetting setting, PropertyDrawer _, ref GenericMenu menu)
+ void IRenderPipelineGraphicsSettingsContextMenu2.PopulateContextMenu(TSetting setting, SerializedProperty _, ref GenericMenu menu)
{
bool canCreateNewAsset = RenderPipelineManager.currentPipeline is TRenderPipeline;
VolumeProfileUtils.AddVolumeProfileContextMenuItems(ref menu,
diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Common/CoreUnsafeUtils.cs b/Packages/com.unity.render-pipelines.core/Runtime/Common/CoreUnsafeUtils.cs
index 0d39e81d..35dbc628 100644
--- a/Packages/com.unity.render-pipelines.core/Runtime/Common/CoreUnsafeUtils.cs
+++ b/Packages/com.unity.render-pipelines.core/Runtime/Common/CoreUnsafeUtils.cs
@@ -69,12 +69,18 @@ namespace UnityEngine.Rendering
}
///
- /// Pop an element of the queue.
+ /// Try to pop an element of the queue.
///
/// Output result string.
- /// True if an element was succesfuly poped.
+ /// True if an element was successfully popped.
public bool TryPop(out string v)
{
+ if (m_ReadCursor + sizeof(int) >= m_BufferEnd)
+ {
+ v = null;
+ return false;
+ }
+
var size = *(int*)m_ReadCursor;
if (size != 0)
{
@@ -84,7 +90,7 @@ namespace UnityEngine.Rendering
return true;
}
- v = default;
+ v = null;
return false;
}
diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Common/DynamicArray.cs b/Packages/com.unity.render-pipelines.core/Runtime/Common/DynamicArray.cs
index 764d44b0..cfbdae31 100644
--- a/Packages/com.unity.render-pipelines.core/Runtime/Common/DynamicArray.cs
+++ b/Packages/com.unity.render-pipelines.core/Runtime/Common/DynamicArray.cs
@@ -685,8 +685,7 @@ namespace UnityEngine.Rendering
}
}
- // C# SUCKS
- // Had to copy paste because it's apparently impossible to pass a sort delegate where T is Comparable, otherwise some boxing happens and allocates...
+ // A copy/paste because it's apparently impossible to pass a sort delegate where T is Comparable, otherwise some boxing happens and allocates...
// So two identical versions of the function, one with delegate but no Comparable and the other with just the comparable.
static int Partition(Span data, int left, int right, DynamicArray.SortComparer comparer) where T : new()
{
diff --git a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/GPUResidentBatcher.cs b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/GPUResidentBatcher.cs
index dfc25d40..2a3c5227 100644
--- a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/GPUResidentBatcher.cs
+++ b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/GPUResidentBatcher.cs
@@ -196,12 +196,7 @@ namespace UnityEngine.Rendering
Profiler.BeginSample("InstanceCullingBatcher.BuildBatch");
{
- m_InstanceCullingBatcher.BuildBatch(
- instances,
- rendererData.materialID,
- rendererData.meshID,
- rendererData, true);
-
+ m_InstanceCullingBatcher.BuildBatch(instances, rendererData, true);
}
Profiler.EndSample();
@@ -234,15 +229,11 @@ namespace UnityEngine.Rendering
Profiler.BeginSample("InstanceCullingBatcher.BuildBatch");
{
- m_InstanceCullingBatcher.BuildBatch(
- instances.AsArray(),
- rendererData.materialID,
- rendererData.meshID,
- rendererData, false);
- instances.Dispose();
+ m_InstanceCullingBatcher.BuildBatch(instances.AsArray(), rendererData, false);
}
Profiler.EndSample();
+ instances.Dispose();
}
Profiler.EndSample();
}
diff --git a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/GPUResidentDrawer.cs b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/GPUResidentDrawer.cs
index aabf6728..96e3591e 100644
--- a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/GPUResidentDrawer.cs
+++ b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/GPUResidentDrawer.cs
@@ -567,7 +567,7 @@ namespace UnityEngine.Rendering
var lodGroupTransformData = m_Dispatcher.GetTransformChangesAndClear(TransformTrackingType.GlobalTRS, Allocator.TempJob);
var lodGroupData = m_Dispatcher.GetTypeChangesAndClear(Allocator.TempJob, noScriptingArray: true);
var meshDataSorted = m_Dispatcher.GetTypeChangesAndClear(Allocator.TempJob, sortByInstanceID: true, noScriptingArray: true);
- var materialData = m_Dispatcher.GetTypeChangesAndClear(Allocator.TempJob);
+ var materialData = m_Dispatcher.GetTypeChangesAndClear(Allocator.TempJob, noScriptingArray: true);
var rendererData = m_Dispatcher.GetTypeChangesAndClear(Allocator.TempJob, noScriptingArray: true);
Profiler.EndSample();
@@ -597,8 +597,8 @@ namespace UnityEngine.Rendering
ProcessRenderers(rendererData, unsupportedRenderers.AsArray());
Profiler.EndSample();
- Profiler.BeginSample("GPUResidentDrawer.ProcessRendererMaterialChanges");
- ProcessRendererMaterialChanges(rendererData.changedID, supportedChangedMaterials.AsArray(), supportedChangedPackedMaterialDatas.AsArray());
+ Profiler.BeginSample("GPUResidentDrawer.ProcessRendererMaterialAndMeshChanges");
+ ProcessRendererMaterialAndMeshChanges(rendererData.changedID, supportedChangedMaterials.AsArray(), supportedChangedPackedMaterialDatas.AsArray(), meshDataSorted.changedID);
Profiler.EndSample();
lodGroupTransformData.Dispose();
@@ -655,9 +655,9 @@ namespace UnityEngine.Rendering
m_BatchersContext.TransformLODGroups(transformedID);
}
- private void ProcessRendererMaterialChanges(NativeArray excludedRenderers, NativeArray changedMaterials, NativeArray changedPackedMaterialDatas)
+ private void ProcessRendererMaterialAndMeshChanges(NativeArray excludedRenderers, NativeArray changedMaterials, NativeArray changedPackedMaterialDatas, NativeArray changedMeshes)
{
- if (changedMaterials.Length == 0)
+ if (changedMaterials.Length == 0 && changedMeshes.Length == 0)
return;
Profiler.BeginSample("GPUResidentDrawer.GetMaterialsWithChangedPackedMaterial");
@@ -669,7 +669,7 @@ namespace UnityEngine.Rendering
Profiler.EndSample();
- if (filteredMaterials.Count == 0)
+ if (filteredMaterials.Count == 0 && changedMeshes.Length == 0)
{
filteredMaterials.Dispose();
updatePackedMaterialCacheJob.Complete();
@@ -679,14 +679,14 @@ namespace UnityEngine.Rendering
var sortedExcludedRenderers = new NativeArray(excludedRenderers, Allocator.TempJob);
if (sortedExcludedRenderers.Length > 0)
{
- Profiler.BeginSample("ProcessRendererMaterialChanges.Sort");
+ Profiler.BeginSample("ProcessRendererMaterialAndMeshChanges.Sort");
sortedExcludedRenderers.ParallelSort().Complete();
Profiler.EndSample();
}
- Profiler.BeginSample("GPUResidentDrawer.FindRenderersFromMaterials");
+ Profiler.BeginSample("GPUResidentDrawer.FindRenderersFromMaterialsOrMeshes");
- NativeList renderersWithChangedMaterials = FindRenderersFromMaterials(sortedExcludedRenderers, filteredMaterials, Allocator.TempJob);
+ var (renderersWithChangedMaterials, renderersWithChangedMeshes) = FindRenderersFromMaterialsOrMeshes(sortedExcludedRenderers, filteredMaterials, changedMeshes, Allocator.TempJob);
filteredMaterials.Dispose();
Profiler.EndSample();
@@ -694,22 +694,35 @@ namespace UnityEngine.Rendering
sortedExcludedRenderers.Dispose();
updatePackedMaterialCacheJob.Complete();
- if (renderersWithChangedMaterials.Length == 0)
+ if (renderersWithChangedMaterials.Length == 0 && renderersWithChangedMeshes.Length == 0)
{
renderersWithChangedMaterials.Dispose();
+ renderersWithChangedMeshes.Dispose();
return;
}
Profiler.BeginSample("GPUResidentDrawer.UpdateRenderers");
{
- var materialChangedInstances = new NativeArray(renderersWithChangedMaterials.Length, Allocator.TempJob, NativeArrayOptions.UninitializedMemory);
- ScheduleQueryRendererGroupInstancesJob(renderersWithChangedMaterials.AsArray(), materialChangedInstances).Complete();
+ var changedMaterialsCount = renderersWithChangedMaterials.Length;
+ var changedMeshesCount = renderersWithChangedMeshes.Length;
+ var totalCount = changedMaterialsCount + changedMeshesCount;
- m_Batcher.DestroyDrawInstances(materialChangedInstances);
- materialChangedInstances.Dispose();
+ var changedInstances = new NativeArray(totalCount, Allocator.TempJob, NativeArrayOptions.UninitializedMemory);
+ var changedRenderers = new NativeArray(totalCount, Allocator.TempJob, NativeArrayOptions.UninitializedMemory);
+
+ NativeArray.Copy(renderersWithChangedMaterials.AsArray(), changedRenderers, changedMaterialsCount);
+ NativeArray.Copy(renderersWithChangedMeshes.AsArray(), changedRenderers.GetSubArray(changedMaterialsCount, changedMeshesCount), changedMeshesCount);
+
+ ScheduleQueryRendererGroupInstancesJob(changedRenderers, changedInstances).Complete();
+
+ m_Batcher.DestroyDrawInstances(changedInstances);
m_Batcher.UpdateRenderers(renderersWithChangedMaterials.AsArray(), true);
+ m_Batcher.UpdateRenderers(renderersWithChangedMeshes.AsArray(), false);
+ changedInstances.Dispose();
+ changedRenderers.Dispose();
renderersWithChangedMaterials.Dispose();
+ renderersWithChangedMeshes.Dispose();
}
Profiler.EndSample();
}
@@ -858,22 +871,26 @@ namespace UnityEngine.Rendering
return filteredMaterials;
}
- private NativeList FindRenderersFromMaterials(NativeArray sortedExcludeRenderers, NativeHashSet materials, Allocator rendererListAllocator)
+ private (NativeList renderersWithMaterials, NativeList renderersWithMeshes) FindRenderersFromMaterialsOrMeshes(NativeArray sortedExcludeRenderers, NativeHashSet materials, NativeArray meshes, Allocator rendererListAllocator)
{
var sharedInstanceData = m_BatchersContext.sharedInstanceData;
- NativeList renderers = new NativeList(sharedInstanceData.rendererGroupIDs.Length, rendererListAllocator);
+ NativeList renderersWithMaterials = new NativeList(sharedInstanceData.rendererGroupIDs.Length, rendererListAllocator);
+ NativeList renderersWithMeshes = new NativeList(sharedInstanceData.rendererGroupIDs.Length, rendererListAllocator);
- var jobHandle = new FindRenderersFromMaterialJob
+ var jobHandle = new FindRenderersFromMaterialOrMeshJob
{
materialIDs = materials.AsReadOnly(),
materialIDArrays = sharedInstanceData.materialIDArrays,
+ meshIDs = meshes.AsReadOnly(),
+ meshIDArray = sharedInstanceData.meshIDs,
rendererGroupIDs = sharedInstanceData.rendererGroupIDs,
sortedExcludeRendererIDs = sortedExcludeRenderers.AsReadOnly(),
- selectedRenderGroups = renderers.AsParallelWriter(),
- }.ScheduleBatch(sharedInstanceData.rendererGroupIDs.Length, FindRenderersFromMaterialJob.k_BatchSize);
+ selectedRenderGroupsForMaterials = renderersWithMaterials.AsParallelWriter(),
+ selectedRenderGroupsForMeshes = renderersWithMeshes.AsParallelWriter()
+ }.ScheduleBatch(sharedInstanceData.rendererGroupIDs.Length, FindRenderersFromMaterialOrMeshJob.k_BatchSize);
jobHandle.Complete();
- return renderers;
+ return (renderersWithMaterials, renderersWithMeshes);
}
[BurstCompile(DisableSafetyChecks = true, OptimizeFor = OptimizeFor.Performance)]
@@ -950,22 +967,29 @@ namespace UnityEngine.Rendering
}
[BurstCompile(DisableSafetyChecks = true, OptimizeFor = OptimizeFor.Performance)]
- private unsafe struct FindRenderersFromMaterialJob : IJobParallelForBatch
+ private unsafe struct FindRenderersFromMaterialOrMeshJob : IJobParallelForBatch
{
public const int k_BatchSize = 128;
[ReadOnly] public NativeHashSet.ReadOnly materialIDs;
[ReadOnly] public NativeArray.ReadOnly materialIDArrays;
+ [ReadOnly] public NativeArray.ReadOnly meshIDs;
+ [ReadOnly] public NativeArray.ReadOnly meshIDArray;
[ReadOnly] public NativeArray.ReadOnly rendererGroupIDs;
[ReadOnly] public NativeArray.ReadOnly sortedExcludeRendererIDs;
- [WriteOnly] public NativeList.ParallelWriter selectedRenderGroups;
+ [WriteOnly] public NativeList.ParallelWriter selectedRenderGroupsForMaterials;
+ [WriteOnly] public NativeList.ParallelWriter selectedRenderGroupsForMeshes;
public void Execute(int startIndex, int count)
{
- int* renderersToAddPtr = stackalloc int[k_BatchSize];
- var renderersToAdd = new UnsafeList(renderersToAddPtr, k_BatchSize);
- renderersToAdd.Length = 0;
+ int* renderersToAddForMaterialsPtr = stackalloc int[k_BatchSize];
+ var renderersToAddForMaterials = new UnsafeList(renderersToAddForMaterialsPtr, k_BatchSize);
+ renderersToAddForMaterials.Length = 0;
+
+ int* renderersToAddForMeshesPtr = stackalloc int[k_BatchSize];
+ var renderersToAddForMeshes = new UnsafeList(renderersToAddForMeshesPtr, k_BatchSize);
+ renderersToAddForMeshes.Length = 0;
for (int index = 0; index < count; index++)
{
@@ -976,20 +1000,33 @@ namespace UnityEngine.Rendering
if (sortedExcludeRendererIDs.BinarySearch(rendererID) >= 0)
continue;
- var rendererMaterials = materialIDArrays[rendererIndex];
-
- for (int materialIndex = 0; materialIndex < rendererMaterials.Length; materialIndex++)
{
- var materialID = rendererMaterials[materialIndex];
- if (materialIDs.Contains(materialID))
+ var meshID = meshIDArray[rendererIndex];
+ if (meshIDs.Contains(meshID))
{
- renderersToAdd.AddNoResize(rendererID);
- break;
+ renderersToAddForMeshes.AddNoResize(rendererID);
+ // We can skip the material check if we found a mesh match since at this point
+ // the renderer is already added and will be processed by the mesh branch
+ continue;
+ }
+ }
+ {
+ var rendererMaterials = materialIDArrays[rendererIndex];
+
+ for (int materialIndex = 0; materialIndex < rendererMaterials.Length; materialIndex++)
+ {
+ var materialID = rendererMaterials[materialIndex];
+ if (materialIDs.Contains(materialID))
+ {
+ renderersToAddForMaterials.AddNoResize(rendererID);
+ break;
+ }
}
}
}
- selectedRenderGroups.AddRangeNoResize(renderersToAddPtr, renderersToAdd.Length);
+ selectedRenderGroupsForMaterials.AddRangeNoResize(renderersToAddForMaterialsPtr, renderersToAddForMaterials.Length);
+ selectedRenderGroupsForMeshes.AddRangeNoResize(renderersToAddForMeshesPtr, renderersToAddForMeshes.Length);
}
}
diff --git a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCullingBatcher.cs b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCullingBatcher.cs
index ff4cd2a3..75378aee 100644
--- a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCullingBatcher.cs
+++ b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCullingBatcher.cs
@@ -8,11 +8,6 @@ using Unity.Collections.LowLevel.Unsafe;
using Unity.Burst;
using UnityEngine.Profiling;
-[assembly: RegisterGenericJobType(typeof(UnityEngine.Rendering.RegisterNewInstancesJob))]
-[assembly: RegisterGenericJobType(typeof(UnityEngine.Rendering.RegisterNewInstancesJob))]
-[assembly: RegisterGenericJobType(typeof(UnityEngine.Rendering.FindNonRegisteredInstancesJob))]
-[assembly: RegisterGenericJobType(typeof(UnityEngine.Rendering.FindNonRegisteredInstancesJob))]
-
namespace UnityEngine.Rendering
{
internal delegate void OnCullingCompleteCallback(JobHandle jobHandle, in BatchCullingContext cullingContext, in BatchCullingOutput cullingOutput);
@@ -191,48 +186,109 @@ namespace UnityEngine.Rendering
}
[BurstCompile(DisableSafetyChecks = true, OptimizeFor = OptimizeFor.Performance)]
- internal struct FindNonRegisteredInstancesJob : IJobParallelForBatch where T : unmanaged
+ internal struct FindNonRegisteredMeshesJob : IJobParallelForBatch
{
public const int k_BatchSize = 128;
[ReadOnly] public NativeArray instanceIDs;
- [ReadOnly] public NativeParallelHashMap hashMap;
+ [ReadOnly] public NativeParallelHashMap hashMap;
[WriteOnly] public NativeList.ParallelWriter outInstancesWriter;
public unsafe void Execute(int startIndex, int count)
{
- int* notFoundinstanceIDs = stackalloc int[k_BatchSize];
- int length = 0;
+ int* notFoundinstanceIDsPtr = stackalloc int[k_BatchSize];
+ var notFoundinstanceIDs = new UnsafeList(notFoundinstanceIDsPtr, k_BatchSize);
+
+ notFoundinstanceIDs.Length = 0;
for (int i = startIndex; i < startIndex + count; ++i)
{
int instanceID = instanceIDs[i];
if (!hashMap.ContainsKey(instanceID))
- notFoundinstanceIDs[length++] = instanceID;
+ notFoundinstanceIDs.AddNoResize(instanceID);
}
- outInstancesWriter.AddRangeNoResize(notFoundinstanceIDs, length);
+ outInstancesWriter.AddRangeNoResize(notFoundinstanceIDsPtr, notFoundinstanceIDs.Length);
}
}
[BurstCompile(DisableSafetyChecks = true, OptimizeFor = OptimizeFor.Performance)]
- internal struct RegisterNewInstancesJob : IJobParallelFor where T : unmanaged
+ internal struct FindNonRegisteredMaterialsJob : IJobParallelForBatch
{
public const int k_BatchSize = 128;
[ReadOnly] public NativeArray instanceIDs;
- [ReadOnly] public NativeArray batchIDs;
+ [ReadOnly] public NativeArray packedMaterialDatas;
+ [ReadOnly] public NativeParallelHashMap hashMap;
- [WriteOnly] public NativeParallelHashMap.ParallelWriter hashMap;
+ [WriteOnly] public NativeList.ParallelWriter outInstancesWriter;
+ [WriteOnly] public NativeList.ParallelWriter outPackedMaterialDatasWriter;
- public unsafe void Execute(int index)
+ public unsafe void Execute(int startIndex, int count)
+ {
+ int* notFoundinstanceIDsPtr = stackalloc int[k_BatchSize];
+ var notFoundinstanceIDs = new UnsafeList(notFoundinstanceIDsPtr, k_BatchSize);
+
+ GPUDrivenPackedMaterialData* notFoundPackedMaterialDatasPtr = stackalloc GPUDrivenPackedMaterialData[k_BatchSize];
+ var notFoundPackedMaterialDatas = new UnsafeList(notFoundPackedMaterialDatasPtr, k_BatchSize);
+
+ notFoundinstanceIDs.Length = 0;
+ notFoundPackedMaterialDatas.Length = 0;
+
+ for (int i = startIndex; i < startIndex + count; ++i)
+ {
+ int instanceID = instanceIDs[i];
+
+ if (!hashMap.ContainsKey(instanceID))
+ {
+ notFoundinstanceIDs.AddNoResize(instanceID);
+ notFoundPackedMaterialDatas.AddNoResize(packedMaterialDatas[i]);
+ }
+ }
+
+ outInstancesWriter.AddRangeNoResize(notFoundinstanceIDsPtr, notFoundinstanceIDs.Length);
+ outPackedMaterialDatasWriter.AddRangeNoResize(notFoundPackedMaterialDatasPtr, notFoundPackedMaterialDatas.Length);
+ }
+ }
+
+ [BurstCompile(DisableSafetyChecks = true, OptimizeFor = OptimizeFor.Performance)]
+ internal struct RegisterNewMeshesJob : IJobParallelFor
+ {
+ public const int k_BatchSize = 128;
+
+ [ReadOnly] public NativeArray instanceIDs;
+ [ReadOnly] public NativeArray batchIDs;
+
+ [WriteOnly] public NativeParallelHashMap.ParallelWriter hashMap;
+
+ public void Execute(int index)
{
hashMap.TryAdd(instanceIDs[index], batchIDs[index]);
}
}
+ [BurstCompile(DisableSafetyChecks = true, OptimizeFor = OptimizeFor.Performance)]
+ internal struct RegisterNewMaterialsJob : IJobParallelFor
+ {
+ public const int k_BatchSize = 128;
+
+ [ReadOnly] public NativeArray instanceIDs;
+ [ReadOnly] public NativeArray packedMaterialDatas;
+ [ReadOnly] public NativeArray batchIDs;
+
+ [WriteOnly] public NativeParallelHashMap.ParallelWriter batchMaterialHashMap;
+ [WriteOnly] public NativeParallelHashMap.ParallelWriter packedMaterialHashMap;
+
+ public void Execute(int index)
+ {
+ var instanceID = instanceIDs[index];
+ batchMaterialHashMap.TryAdd(instanceID, batchIDs[index]);
+ packedMaterialHashMap.TryAdd(instanceID, packedMaterialDatas[index]);
+ }
+ }
+
[BurstCompile(DisableSafetyChecks = true, OptimizeFor = OptimizeFor.Performance)]
internal struct RemoveDrawInstanceIndicesJob : IJob
{
@@ -468,7 +524,7 @@ namespace UnityEngine.Rendering
{
var materialID = rendererData.materialID[materialIndex];
bool isFound = packedMaterialDataHash.TryGetValue(materialID, out packedMaterialData);
- Assert.IsTrue(isFound);
+ Assert.IsTrue(isFound, "Packed material data not found.");
}
supportsIndirect &= packedMaterialData.isIndirectSupported;
@@ -1011,41 +1067,45 @@ namespace UnityEngine.Rendering
private void RegisterBatchMeshes(NativeArray meshIDs)
{
var newMeshIDs = new NativeList(meshIDs.Length, Allocator.TempJob);
- new FindNonRegisteredInstancesJob
+ new FindNonRegisteredMeshesJob
{
instanceIDs = meshIDs,
hashMap = m_BatchMeshHash,
outInstancesWriter = newMeshIDs.AsParallelWriter()
}
- .ScheduleBatch(meshIDs.Length, FindNonRegisteredInstancesJob.k_BatchSize).Complete();
+ .ScheduleBatch(meshIDs.Length, FindNonRegisteredMeshesJob.k_BatchSize).Complete();
var newBatchMeshIDs = new NativeArray(newMeshIDs.Length, Allocator.TempJob, NativeArrayOptions.UninitializedMemory);
m_BRG.RegisterMeshes(newMeshIDs.AsArray(), newBatchMeshIDs);
int totalMeshesNum = m_BatchMeshHash.Count() + newBatchMeshIDs.Length;
m_BatchMeshHash.Capacity = Math.Max(m_BatchMeshHash.Capacity, Mathf.CeilToInt(totalMeshesNum / 1023.0f) * 1024);
- new RegisterNewInstancesJob
+ new RegisterNewMeshesJob
{
instanceIDs = newMeshIDs.AsArray(),
batchIDs = newBatchMeshIDs,
hashMap = m_BatchMeshHash.AsParallelWriter()
}
- .Schedule(newMeshIDs.Length, RegisterNewInstancesJob.k_BatchSize).Complete();
+ .Schedule(newMeshIDs.Length, RegisterNewMeshesJob.k_BatchSize).Complete();
newMeshIDs.Dispose();
newBatchMeshIDs.Dispose();
}
- private void RegisterBatchMaterials(in NativeArray usedMaterialIDs)
+ private void RegisterBatchMaterials(in NativeArray usedMaterialIDs, in NativeArray usedPackedMaterialDatas)
{
+ Debug.Assert(usedMaterialIDs.Length == usedPackedMaterialDatas.Length, "Each material ID should correspond to one packed material data.");
var newMaterialIDs = new NativeList(usedMaterialIDs.Length, Allocator.TempJob);
- new FindNonRegisteredInstancesJob
+ var newPackedMaterialDatas = new NativeList(usedMaterialIDs.Length, Allocator.TempJob);
+ new FindNonRegisteredMaterialsJob
{
instanceIDs = usedMaterialIDs,
+ packedMaterialDatas = usedPackedMaterialDatas,
hashMap = m_BatchMaterialHash,
- outInstancesWriter = newMaterialIDs.AsParallelWriter()
+ outInstancesWriter = newMaterialIDs.AsParallelWriter(),
+ outPackedMaterialDatasWriter = newPackedMaterialDatas.AsParallelWriter()
}
- .ScheduleBatch(usedMaterialIDs.Length, FindNonRegisteredInstancesJob.k_BatchSize).Complete();
+ .ScheduleBatch(usedMaterialIDs.Length, FindNonRegisteredMaterialsJob.k_BatchSize).Complete();
var newBatchMaterialIDs = new NativeArray(newMaterialIDs.Length, Allocator.TempJob, NativeArrayOptions.UninitializedMemory);
m_BRG.RegisterMaterials(newMaterialIDs.AsArray(), newBatchMaterialIDs);
@@ -1054,15 +1114,18 @@ namespace UnityEngine.Rendering
m_BatchMaterialHash.Capacity = Math.Max(m_BatchMaterialHash.Capacity, Mathf.CeilToInt(totalMaterialsNum / 1023.0f) * 1024);
m_PackedMaterialHash.Capacity = m_BatchMaterialHash.Capacity;
- new RegisterNewInstancesJob
+ new RegisterNewMaterialsJob
{
instanceIDs = newMaterialIDs.AsArray(),
+ packedMaterialDatas = newPackedMaterialDatas.AsArray(),
batchIDs = newBatchMaterialIDs,
- hashMap = m_BatchMaterialHash.AsParallelWriter()
+ batchMaterialHashMap = m_BatchMaterialHash.AsParallelWriter(),
+ packedMaterialHashMap = m_PackedMaterialHash.AsParallelWriter()
}
- .Schedule(newMaterialIDs.Length, RegisterNewInstancesJob.k_BatchSize).Complete();
+ .Schedule(newMaterialIDs.Length, RegisterNewMaterialsJob.k_BatchSize).Complete();
newMaterialIDs.Dispose();
+ newPackedMaterialDatas.Dispose();
newBatchMaterialIDs.Dispose();
}
@@ -1078,15 +1141,13 @@ namespace UnityEngine.Rendering
public void BuildBatch(
NativeArray instances,
- NativeArray usedMaterialIDs,
- NativeArray usedMeshIDs,
in GPUDrivenRendererGroupData rendererData,
bool registerMaterialsAndMeshes)
{
if (registerMaterialsAndMeshes)
{
- RegisterBatchMaterials(usedMaterialIDs);
- RegisterBatchMeshes(usedMeshIDs);
+ RegisterBatchMaterials(rendererData.materialID, rendererData.packedMaterialData);
+ RegisterBatchMeshes(rendererData.meshID);
}
new CreateDrawBatchesJob
diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeBrickPool.cs b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeBrickPool.cs
index 3a3ef283..e6e254f5 100644
--- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeBrickPool.cs
+++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeBrickPool.cs
@@ -281,6 +281,7 @@ namespace UnityEngine.Rendering
if (!ignoreErrorLog)
Debug.LogError("Cannot allocate more brick chunks, probe volume brick pool is full.");
+ Deallocate(outAllocations);
outAllocations.Clear();
return false; // failure case, pool is full
}
diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeReferenceVolume.cs b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeReferenceVolume.cs
index b3b2882a..71906191 100644
--- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeReferenceVolume.cs
+++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeReferenceVolume.cs
@@ -1078,6 +1078,11 @@ namespace UnityEngine.Rendering
m_VertexSampling = value;
}
+ internal void ForceMemoryBudget(ProbeVolumeTextureMemoryBudget budget)
+ {
+ m_MemoryBudget = budget;
+ }
+
// This is used for steps such as dilation that require the maximum order allowed to be loaded at all times. Should really never be used as a general purpose function.
internal void ForceSHBand(ProbeVolumeSHBands shBands)
{
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 c3d6ec3d..a563ae62 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
@@ -99,6 +99,9 @@ namespace UnityEngine.Rendering.RenderGraphModule.NativeRenderPassCompiler
case PassBreakReason.DifferentShadingRateStates:
message += $"{prevPassName} uses different shading rate states than {passName}.";
break;
+ case PassBreakReason.PassMergingDisabled:
+ message += "The pass merging is disabled.";
+ break;
default:
throw new ArgumentOutOfRangeException();
}
diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blitter.cs b/Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blitter.cs
index 56644868..70d72e3b 100644
--- a/Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blitter.cs
+++ b/Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blitter.cs
@@ -712,6 +712,42 @@ namespace UnityEngine.Rendering
BlitTexture(cmd.m_WrappedCommandBuffer, source, scaleBias, material, pass);
}
+ ///
+ /// Adds in a a command to copy a texture identified by its into
+ /// the currently bound render target's color buffer, using a user material and specific shader pass.
+ ///
+ ///
+ /// The source texture will be bound to the "_BlitTexture" shader property.
+ /// The scaleBias parameter controls the rectangle of pixels in the source texture to copy by manipulating
+ /// the source texture coordinates. The X and Y coordinates store the scaling factor to apply to these texture
+ /// coordinates, while the Z and W coordinates store the texture coordinate offsets. The operation will always
+ /// write to the full destination render target rectangle.
+ ///
+ /// Command Buffer used for recording the action.
+ /// RTHandle of the source texture to copy from.
+ /// Scale and bias for sampling the source texture.
+ /// The material to use for writing to the destination target.
+ /// The index of the pass to use in the material's shader.
+ ///
+ ///
+ ///
+ public static void BlitTexture(UnsafeCommandBuffer cmd, RTHandle source, Vector4 scaleBias, Material material, int pass)
+ {
+ BlitTexture(cmd.m_WrappedCommandBuffer, source, scaleBias, material, pass);
+ }
+
///
/// Adds in a a command to copy a texture identified by its into
/// the currently bound render target's color buffer, using a user material and specific shader pass.
diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/FixedBufferStringQueueTests.cs b/Packages/com.unity.render-pipelines.core/Tests/Editor/FixedBufferStringQueueTests.cs
index 5064885e..94ca1e77 100644
--- a/Packages/com.unity.render-pipelines.core/Tests/Editor/FixedBufferStringQueueTests.cs
+++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/FixedBufferStringQueueTests.cs
@@ -36,6 +36,31 @@ namespace UnityEngine.Rendering.Tests
Assert.False(buffer.TryPush("amet, consectetur adipiscing"));
Assert.AreEqual(1, buffer.Count);
+
+ Assert.True(buffer.TryPop(out string v) && v == "Lorem ipsum dolor sit");
+ Assert.False(buffer.TryPop(out v) && v == null);
+ }
+
+ [Test]
+ public void PushAndPopOutOfBufferRange_StringSizeNotDivisibleBy4()
+ {
+ // UUM-104687: Buffer is created with size of 32 bytes. The test fills the first 30 bytes with a string,
+ // so 2 bytes are left over in the buffer. After we pop the string out, we check that the next TryPop
+ // doesn't try to read out of bounds when trying to read the string length.
+
+ const int bufferLength = 32;
+ const int bytesToFill = bufferLength - 2;
+ const int bytesForString = bytesToFill - sizeof(int);
+ const int numCharacters = bytesForString / sizeof(char);
+
+ string testValue = new string('a', numCharacters);
+
+ byte* bufferStart = stackalloc byte[bufferLength];
+ CoreUnsafeUtils.FixedBufferStringQueue buffer = new CoreUnsafeUtils.FixedBufferStringQueue(bufferStart, bufferLength);
+
+ Assume.That(buffer.TryPush(testValue));
+ Assume.That(buffer.TryPop(out string v));
+ Assert.False(buffer.TryPop(out v));
}
[Test]
@@ -58,5 +83,6 @@ namespace UnityEngine.Rendering.Tests
Assert.True(buffer.TryPop(out string v) && v == "elit, sed do eiusmod");
Assert.True(buffer.TryPop(out v) && v == "tempor incididunt ut labore");
}
+
}
}
diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/GPUDriven/GPUDrivenRenderingTests.cs b/Packages/com.unity.render-pipelines.core/Tests/Editor/GPUDriven/GPUDrivenRenderingTests.cs
index 15002f73..ba153916 100644
--- a/Packages/com.unity.render-pipelines.core/Tests/Editor/GPUDriven/GPUDrivenRenderingTests.cs
+++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/GPUDriven/GPUDrivenRenderingTests.cs
@@ -189,10 +189,11 @@ namespace UnityEngine.Rendering.Tests
var callbackCounter = new BoxedCounter();
cpuDrivenDesc.onCompleteCallback = (JobHandle jobHandle, in BatchCullingContext cc, in BatchCullingOutput cullingOutput) =>
{
+ jobHandle.Complete();
+
if (cc.viewType != BatchCullingViewType.Camera)
return;
- jobHandle.Complete();
BatchCullingOutputDrawCommands drawCommands = cullingOutput.drawCommands[0];
var materials = new NativeParallelHashSet(10, Allocator.Temp);
@@ -221,6 +222,8 @@ namespace UnityEngine.Rendering.Tests
using (var brg = new GPUResidentBatcher(brgContext, cpuDrivenDesc, gpuDrivenProcessor))
{
+ brg.OnBeginContextRendering();
+
brg.UpdateRenderers(objIDs.AsArray());
var cameraObject = new GameObject("myCamera");
@@ -228,6 +231,8 @@ namespace UnityEngine.Rendering.Tests
SubmitCameraRenderRequest(mainCamera);
+ brg.OnEndContextRendering();
+
Assert.AreEqual(1, callbackCounter.Value);
mainCamera = null;
@@ -268,16 +273,19 @@ namespace UnityEngine.Rendering.Tests
cpuDrivenDesc.onCompleteCallback = (JobHandle jobHandle, in BatchCullingContext cc, in BatchCullingOutput cullingOutput) =>
{
+ jobHandle.Complete();
+
if (cc.viewType != BatchCullingViewType.Camera)
return;
- jobHandle.Complete();
BatchCullingOutputDrawCommands drawCommands = cullingOutput.drawCommands[0];
callbackCounter.Value = drawCommands.visibleInstanceCount;
};
using (var brg = new GPUResidentBatcher(brgContext, cpuDrivenDesc, gpuDrivenProcessor))
{
+ brg.OnBeginContextRendering();
+
brg.UpdateRenderers(objIDs);
var cameraObject = new GameObject("SceneViewCamera");
@@ -298,6 +306,8 @@ namespace UnityEngine.Rendering.Tests
brg.OnEndCameraRendering(mainCamera);
Assert.AreEqual(callbackCounter.Value, 1);
+ brg.OnEndContextRendering();
+
GameObject.DestroyImmediate(cameraObject);
brgContext.ScheduleQueryRendererGroupInstancesJob(objIDs, instances).Complete();
brg.DestroyDrawInstances(instances);
@@ -346,10 +356,11 @@ namespace UnityEngine.Rendering.Tests
var cpuDrivenDesc = InstanceCullingBatcherDesc.NewDefault();
cpuDrivenDesc.onCompleteCallback = (JobHandle jobHandle, in BatchCullingContext cc, in BatchCullingOutput cullingOutput) =>
{
+ jobHandle.Complete();
+
if (cc.viewType != BatchCullingViewType.Camera)
return;
- jobHandle.Complete();
BatchCullingOutputDrawCommands drawCommands = cullingOutput.drawCommands[0];
var drawCommandCount = 0U;
@@ -370,6 +381,8 @@ namespace UnityEngine.Rendering.Tests
using (var brg = new GPUResidentBatcher(brgContext, cpuDrivenDesc, gpuDrivenProcessor))
{
+ brg.OnBeginContextRendering();
+
brg.UpdateRenderers(objIDs.AsArray());
var cameraObject = new GameObject("myCamera");
@@ -377,6 +390,8 @@ namespace UnityEngine.Rendering.Tests
SubmitCameraRenderRequest(mainCamera);
+ brg.OnEndContextRendering();
+
mainCamera = null;
GameObject.DestroyImmediate(cameraObject);
@@ -458,10 +473,11 @@ namespace UnityEngine.Rendering.Tests
var expectedDrawCommandCount = 2;
cpuDrivenDesc.onCompleteCallback = (JobHandle jobHandle, in BatchCullingContext cc, in BatchCullingOutput cullingOutput) =>
{
+ jobHandle.Complete();
+
if (cc.viewType != BatchCullingViewType.Camera)
return;
- jobHandle.Complete();
BatchCullingOutputDrawCommands drawCommands = cullingOutput.drawCommands[0];
var drawCommandCount = 0U;
@@ -482,6 +498,8 @@ namespace UnityEngine.Rendering.Tests
using (var brg = new GPUResidentBatcher(brgContext, cpuDrivenDesc, gpuDrivenProcessor))
{
+ brg.OnBeginContextRendering();
+
brgContext.UpdateLODGroups(lodGroupInstancesID.AsArray());
brg.UpdateRenderers(objIDs.AsArray());
@@ -526,6 +544,8 @@ namespace UnityEngine.Rendering.Tests
expectedDrawCommandCount = 1;
SubmitCameraRenderRequest(mainCamera);
+ brg.OnEndContextRendering();
+
Assert.AreEqual(7, callbackCounter.Value);
mainCamera = null;
@@ -611,10 +631,11 @@ namespace UnityEngine.Rendering.Tests
var expectedDrawCommandCount = 0;
cpuDrivenDesc.onCompleteCallback = (JobHandle jobHandle, in BatchCullingContext cc, in BatchCullingOutput cullingOutput) =>
{
+ jobHandle.Complete();
+
if (cc.viewType != BatchCullingViewType.Camera)
return;
- jobHandle.Complete();
BatchCullingOutputDrawCommands drawCommands = cullingOutput.drawCommands[0];
unsafe
@@ -633,6 +654,8 @@ namespace UnityEngine.Rendering.Tests
using (var brg = new GPUResidentBatcher(brgContext, cpuDrivenDesc, gpuDrivenProcessor))
{
+ brg.OnBeginContextRendering();
+
brgContext.UpdateLODGroups(lodGroupInstancesID.AsArray());
brg.UpdateRenderers(objIDs.AsArray());
@@ -684,6 +707,8 @@ namespace UnityEngine.Rendering.Tests
cameraObject.transform.position = new Vector3(0.0f, 0.0f, -4.0f);
SubmitCameraRenderRequest(mainCamera);
+ brg.OnEndContextRendering();
+
mainCamera = null;
GameObject.DestroyImmediate(cameraObject);
@@ -744,10 +769,11 @@ namespace UnityEngine.Rendering.Tests
var expectedDrawCommandCount = 0;
cpuDrivenDesc.onCompleteCallback = (JobHandle jobHandle, in BatchCullingContext cc, in BatchCullingOutput cullingOutput) =>
{
+ jobHandle.Complete();
+
if (cc.viewType != BatchCullingViewType.Camera)
return;
- jobHandle.Complete();
BatchCullingOutputDrawCommands drawCommands = cullingOutput.drawCommands[0];
unsafe
@@ -766,6 +792,8 @@ namespace UnityEngine.Rendering.Tests
using (var brg = new GPUResidentBatcher(brgContext, cpuDrivenDesc, gpuDrivenProcessor))
{
+ brg.OnBeginContextRendering();
+
brg.UpdateRenderers(objIDs.AsArray());
var cameraObject = new GameObject("myCamera");
@@ -801,6 +829,8 @@ namespace UnityEngine.Rendering.Tests
cameraObject.transform.position = new Vector3(0.0f, 0.0f, -10.0f);
SubmitCameraRenderRequest(mainCamera);
+ brg.OnEndContextRendering();
+
mainCamera = null;
GameObject.DestroyImmediate(cameraObject);
diff --git a/Packages/com.unity.render-pipelines.core/package.json b/Packages/com.unity.render-pipelines.core/package.json
index 1df56e30..c92b4e97 100644
--- a/Packages/com.unity.render-pipelines.core/package.json
+++ b/Packages/com.unity.render-pipelines.core/package.json
@@ -14,5 +14,5 @@
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.rendering.light-transport": "1.0.1"
},
- "_fingerprint": "79d3abb9adf1668400072f165c52ac7c03b1bca9"
+ "_fingerprint": "71b4bdac1964f74b866160605ee9150cf79ab359"
}
diff --git a/Packages/com.unity.render-pipelines.high-definition-config/package.json b/Packages/com.unity.render-pipelines.high-definition-config/package.json
index 92dcc54d..d080c346 100644
--- a/Packages/com.unity.render-pipelines.high-definition-config/package.json
+++ b/Packages/com.unity.render-pipelines.high-definition-config/package.json
@@ -7,5 +7,5 @@
"dependencies": {
"com.unity.render-pipelines.core": "17.1.0"
},
- "_fingerprint": "df264f43ceeeb27fd645ba51a52555c620dd9154"
+ "_fingerprint": "8c699487ee0c5bb938902fb2e91075c921a1fb5f"
}
diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/PropertyDrawers/HDRPDefaultVolumeProfileSettingsPropertyDrawer.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/PropertyDrawers/HDRPDefaultVolumeProfileSettingsPropertyDrawer.cs
index b9106bdb..f5695a30 100644
--- a/Packages/com.unity.render-pipelines.high-definition/Editor/PropertyDrawers/HDRPDefaultVolumeProfileSettingsPropertyDrawer.cs
+++ b/Packages/com.unity.render-pipelines.high-definition/Editor/PropertyDrawers/HDRPDefaultVolumeProfileSettingsPropertyDrawer.cs
@@ -92,7 +92,7 @@ namespace UnityEditor.Rendering.HighDefinition
return profileLine;
}
- public class HDRPDefaultVolumeProfileSettingsContextMenu : DefaultVolumeProfileSettingsContextMenu
+ public class HDRPDefaultVolumeProfileSettingsContextMenu : DefaultVolumeProfileSettingsContextMenu2
{
protected override string defaultVolumeProfilePath
{
diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Rendering.Drawers.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Rendering.Drawers.cs
index f81d4b7d..2c90c94b 100644
--- a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Rendering.Drawers.cs
+++ b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Rendering.Drawers.cs
@@ -148,10 +148,6 @@ namespace UnityEditor.Rendering.HighDefinition
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(p.deepLearningSuperSamplingUseOptimalSettings, HDRenderPipelineUI.Styles.DLSSUseOptimalSettingsContent);
- using (new EditorGUI.DisabledScope(p.deepLearningSuperSamplingUseOptimalSettings.boolValue))
- {
- EditorGUILayout.PropertyField(p.deepLearningSuperSamplingSharpening, HDRenderPipelineUI.Styles.DLSSSharpnessContent);
- }
EditorGUI.indentLevel--;
}
}
diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassDrawer.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassDrawer.cs
index 0a10648e..551a2507 100644
--- a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassDrawer.cs
+++ b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/CustomPass/CustomPassDrawer.cs
@@ -172,6 +172,16 @@ namespace UnityEditor.Rendering.HighDefinition
{
EditorGUI.PropertyField(rect, m_TargetDepthBuffer, Styles.targetDepthBuffer);
rect.y += Styles.defaultLineSpace;
+
+ CustomPass.TargetBuffer requestedDepth = m_TargetDepthBuffer.GetEnumValue();
+ if (m_CustomPass.getConstrainedDepthBuffer() != requestedDepth)
+ {
+ Rect helpBoxRect = rect;
+ float helpBoxHeight = EditorGUIUtility.singleLineHeight * 2;
+ helpBoxRect.height = helpBoxHeight;
+ EditorGUI.HelpBox(helpBoxRect, "Camera depth isn't supported when dynamic scaling is on. We will automatically fall back to not doing depth-testing for this pass.", MessageType.Warning);
+ rect.y += helpBoxHeight;
+ }
}
if ((commonPassUIFlags & PassUIFlag.ClearFlags) != 0)
@@ -264,6 +274,13 @@ namespace UnityEditor.Rendering.HighDefinition
}
height += Styles.defaultLineSpace * lines;
+
+ // Add height for the help box if it will be shown
+ if ((commonPassUIFlags & PassUIFlag.TargetDepthBuffer) != 0 &&
+ m_CustomPass.getConstrainedDepthBuffer() != m_TargetDepthBuffer.GetEnumValue())
+ {
+ height += EditorGUIUtility.singleLineHeight * 2; // Help box height
+ }
}
return height + GetPassHeight(property);
diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs
index b2a8067c..409355f1 100644
--- a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs
+++ b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs
@@ -277,7 +277,6 @@ namespace UnityEditor.Rendering.HighDefinition
public static readonly GUIContent TAAUInjectionPoint = EditorGUIUtility.TrTextContent("TAA Upscale Injection Point", "The injection point at which to apply the upscaling.");
public static readonly GUIContent STPInjectionPoint = EditorGUIUtility.TrTextContent("STP Injection Point", "The injection point at which to apply the upscaling.");
public static readonly GUIContent DLSSUseOptimalSettingsContent = EditorGUIUtility.TrTextContent("DLSS Use Optimal Settings", "Sets the sharpness and scale automatically for NVIDIA Deep Learning Super Sampling, depending on the values of quality settings. When DLSS Optimal Settings is on, the percentage settings for Dynamic Resolution Scaling are ignored.");
- public static readonly GUIContent DLSSSharpnessContent = EditorGUIUtility.TrTextContent("DLSS Sharpness", "NVIDIA Deep Learning Super Sampling pixel sharpness of upsampler. Controls how the DLSS upsampler will render edges on the image. More sharpness usually means more contrast and clearer image but can increase flickering and fireflies. This setting is ignored if optimal settings are used.");
public static readonly GUIContent FSR2Title = EditorGUIUtility.TrTextContent("AMD FidelityFX Super Resolution 2.0 (FSR2)");
public static readonly GUIContent enableFSR2 = EditorGUIUtility.TrTextContent("Enable Fidelity FX 2.2", "Enables FidelityFX 2.0 Super Resolution (FSR2).");
@@ -314,7 +313,7 @@ namespace UnityEditor.Rendering.HighDefinition
public const string FSR2WinTargetWarning = "HDRP does not support AMD Fidelity FX2 for the current build target and graphics device API. To enable FSR2, set your build target to Windows x86_64 and DirectX12.";
public const string FSR2SwitchTarget64Button = "Fix";
public const string FSR2FeatureDetectedMsg = "Unity detected AMD Fidelity FX 2 Super Resolution and will ignore the Fallback Upscale Filter.";
- public const string FSR2FeatureNotDetectedMsg = "Unity cannot detect Unity detected AMD Fidelity FX 2 Super Resolution and will use the Fallback Upscale Filter instead.";
+ public const string FSR2FeatureNotDetectedMsg = "Unity cannot detect AMD Fidelity FX 2 Super Resolution and will use the Fallback Upscale Filter instead.";
public const string STPSwDrsWarningMsg = "STP cannot support dynamic resolution without hardware dynamic resolution mode. You can use the forced screen percentage feature to guarantee a fixed resoution for STP or HDRP will fall back to the next best supported upscaling filter instead.";
diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs
index 4fbbdad5..2fe854b4 100644
--- a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs
+++ b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs
@@ -686,10 +686,6 @@ namespace UnityEditor.Rendering.HighDefinition
serialized.renderPipelineSettings.dynamicResolutionSettings.DLSSInjectionPoint.intValue = injectionPointVal;
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.dynamicResolutionSettings.DLSSUseOptimalSettings, Styles.DLSSUseOptimalSettingsContent);
- using (new EditorGUI.DisabledScope(serialized.renderPipelineSettings.dynamicResolutionSettings.DLSSUseOptimalSettings.boolValue))
- {
- EditorGUILayout.PropertyField(serialized.renderPipelineSettings.dynamicResolutionSettings.DLSSSharpness, Styles.DLSSSharpnessContent);
- }
--EditorGUI.indentLevel;
}
diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAlgorithms.hlsl b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAlgorithms.hlsl
index 61556bdf..c5882372 100644
--- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAlgorithms.hlsl
+++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowAlgorithms.hlsl
@@ -7,9 +7,15 @@
// For backward compatibility
#ifdef SHADOW_LOW
+#ifndef PUNCTUAL_SHADOW_LOW
#define PUNCTUAL_SHADOW_LOW
+#endif
+#ifndef DIRECTIONAL_SHADOW_LOW
#define DIRECTIONAL_SHADOW_LOW
#endif
+#endif
+
+
// For non-fragment shaders we might skip the variant with the quality as shadows might not be used, if that's the case define something just to make the compiler happy in case the quality is not defined.
#ifndef SHADER_STAGE_FRAGMENT
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 6ac37919..23099cf5 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
@@ -1045,8 +1045,10 @@ Shader "HDRP/Lit"
#ifndef SHADER_STAGE_FRAGMENT
#define SHADOW_LOW
+ #ifndef USE_FPTL_LIGHTLIST
#define USE_FPTL_LIGHTLIST
#endif
+ #endif
#define SHADERPASS SHADERPASS_FORWARD
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs
index 00ee3473..149f974a 100644
--- a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs
+++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs
@@ -914,13 +914,18 @@ namespace UnityEngine.Rendering.HighDefinition
passData.parameters.drsSettings = currentAsset.currentPlatformRenderPipelineSettings.dynamicResolutionSettings;
// Must check this with nvidia. After trying many things this gives the least amount of ghosting.
// For now we clamp the exposure to a reasonable value.
- passData.parameters.preExposure = Mathf.Clamp(hdCamera.GpuExposureValue(), 0.35f, 2.0f);
+ passData.parameters.preExposure = Mathf.Clamp(hdCamera.GpuExposureValue(), 0.20f, 2.0f);
var viewHandles = new UpscalerResources.ViewResourceHandles();
viewHandles.source = builder.ReadTexture(source);
viewHandles.output = builder.WriteTexture(GetPostprocessUpsampledOutputHandle(hdCamera, renderGraph, "DLSS destination"));
viewHandles.depth = builder.ReadTexture(depthBuffer);
viewHandles.motionVectors = builder.ReadTexture(motionVectors);
+ // Note: exposure texture input
+ // We skip providing exposureTexture since HDRP pre-applies exposure in GBuffer pass / light accumulation buffer,
+ // and doesn't use it later on in tonemapping. DLSS docs mention this texture is needed if used in tonemapping later on.
+ // Given we also provide an option to inject DLSS post-tonemapping, we can safely skip providing this input as
+ // it usually exacerbates ghosting within the HDRP use context.
if (biasColorMask.IsValid())
viewHandles.biasColorMask = builder.ReadTexture(biasColorMask);
diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Prepass.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Prepass.cs
index a782b175..4e3cb5b8 100644
--- a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Prepass.cs
+++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Prepass.cs
@@ -28,6 +28,8 @@ namespace UnityEngine.Rendering.HighDefinition
const int m_MaxXRViewsCount = 4;
+ const int kIntelVendorId = 0x8086;
+
void InitializePrepass(HDRenderPipelineAsset hdAsset)
{
m_MSAAResolveMaterial = CoreUtils.CreateEngineMaterial(runtimeShaders.depthValuesPS);
@@ -1407,7 +1409,7 @@ namespace UnityEngine.Rendering.HighDefinition
{
// Integrated Intel GPU on Mac don't support the texture format use for normal (RGBA_8UNORM) for SetRandomWriteTarget
// So on Metal for now we don't patch normal buffer if we detect an intel GPU
- if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal && SystemInfo.graphicsDeviceName.Contains("Intel"))
+ if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal && SystemInfo.graphicsDeviceVendorID == kIntelVendorId)
{
return;
}
diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs
index c8950b8f..e2280115 100644
--- a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs
+++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs
@@ -2817,7 +2817,7 @@ namespace UnityEngine.Rendering.HighDefinition
cameraXRSettings.viewCount = (uint)hdCamera.viewCount;
cameraXRSettings.viewOffset = (uint)hdCamera.xr.multipassId;
- VFXManager.ProcessCameraCommand(camera, cmd, cameraXRSettings, cullingResults);
+ VFXManager.ProcessCameraCommand(camera, cmd, cameraXRSettings, cullingResults, customPassCullingResults);
if (GL.wireframe)
{
diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs
index ff9c62c3..52081bb8 100644
--- a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs
+++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs
@@ -52,6 +52,24 @@ namespace UnityEngine.Rendering.HighDefinition
///
public TargetBuffer targetDepthBuffer;
+ // The actual depth buffer has to follow some constraints, and thus may not be the same result as the target
+ // depth buffer that the user has requested. Apply these constraints and return a result.
+ internal TargetBuffer getConstrainedDepthBuffer()
+ {
+ TargetBuffer depth = targetDepthBuffer;
+ if (depth == TargetBuffer.Camera &&
+ HDRenderPipeline.currentAsset.currentPlatformRenderPipelineSettings.dynamicResolutionSettings.enabled &&
+ currentHDCamera.allowDynamicResolution &&
+ injectionPoint == CustomPassInjectionPoint.AfterPostProcess)
+ {
+ // This custom pass is injected after postprocessing, and Dynamic Resolution Scaling is enabled, which
+ // means an upscaler is active. In this case, the camera color buffer is the full display resolution,
+ // but the camera depth buffer is a lower, pre-upscale resolution. So we cannot do depth testing here.
+ depth = TargetBuffer.None;
+ }
+ return depth;
+ }
+
///
/// What clear to apply when the color and depth buffer are bound
///
@@ -314,7 +332,7 @@ namespace UnityEngine.Rendering.HighDefinition
}
// Set back the camera color buffer if we were using a custom buffer as target
- if (customPass.targetDepthBuffer != TargetBuffer.Camera)
+ if (customPass.getConstrainedDepthBuffer() != TargetBuffer.Camera)
CoreUtils.SetRenderTarget(ctx.cmd, outputColorBuffer);
});
}
@@ -351,16 +369,17 @@ namespace UnityEngine.Rendering.HighDefinition
// This function must be only called from the ExecuteInternal method (requires current render target and current RT manager)
void SetCustomPassTarget(CommandBuffer cmd)
{
+ TargetBuffer depth = getConstrainedDepthBuffer();
// In case all the buffer are set to none, we can't bind anything
- if (targetColorBuffer == TargetBuffer.None && targetDepthBuffer == TargetBuffer.None)
+ if (targetColorBuffer == TargetBuffer.None && depth == TargetBuffer.None)
return;
RTHandle colorBuffer = (targetColorBuffer == TargetBuffer.Custom) ? currentRenderTarget.customColorBuffer.Value : currentRenderTarget.colorBufferRG;
- RTHandle depthBuffer = (targetDepthBuffer == TargetBuffer.Custom) ? currentRenderTarget.customDepthBuffer.Value : currentRenderTarget.depthBufferRG;
+ RTHandle depthBuffer = (depth == TargetBuffer.Custom) ? currentRenderTarget.customDepthBuffer.Value : currentRenderTarget.depthBufferRG;
- if (targetColorBuffer == TargetBuffer.None && targetDepthBuffer != TargetBuffer.None)
+ if (targetColorBuffer == TargetBuffer.None && depth != TargetBuffer.None)
CoreUtils.SetRenderTarget(cmd, depthBuffer, clearFlags);
- else if (targetColorBuffer != TargetBuffer.None && targetDepthBuffer == TargetBuffer.None)
+ else if (targetColorBuffer != TargetBuffer.None && depth == TargetBuffer.None)
CoreUtils.SetRenderTarget(cmd, colorBuffer, clearFlags);
else
{
diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Settings/HDRPDefaultVolumeProfileSetting.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/Settings/HDRPDefaultVolumeProfileSetting.cs
index ff47063e..bf2110f1 100644
--- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Settings/HDRPDefaultVolumeProfileSetting.cs
+++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Settings/HDRPDefaultVolumeProfileSetting.cs
@@ -69,9 +69,9 @@ namespace UnityEngine.Rendering.HighDefinition
#if UNITY_EDITOR
//Overriding "Reset" in menu that is not called at HDRPDefaultVolumeProfileSettings creation such Reset()
- struct ResetImplementation : IRenderPipelineGraphicsSettingsContextMenu
+ struct ResetImplementation : IRenderPipelineGraphicsSettingsContextMenu2
{
- public void PopulateContextMenu(HDRPDefaultVolumeProfileSettings setting, PropertyDrawer drawer, ref GenericMenu menu)
+ public void PopulateContextMenu(HDRPDefaultVolumeProfileSettings setting, SerializedProperty _, ref GenericMenu menu)
{
void Reset()
{
diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/Shaders/SampleWaterSurface.hlsl b/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/Shaders/SampleWaterSurface.hlsl
index 6321f779..082ba048 100644
--- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/Shaders/SampleWaterSurface.hlsl
+++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/Shaders/SampleWaterSurface.hlsl
@@ -442,7 +442,11 @@ void EvaluateWaterAdditionalData(float3 positionOS, float3 transformedPosition,
return;
// Evaluate the pre-displaced absolute position
+#if defined(WATER_DISPLACEMENT)
+ float3 positionRWS = positionOS;
+#else
float3 positionRWS = TransformObjectToWorld_Water(positionOS);
+#endif
// Evaluate the distance to the camera
float distanceToCamera = length(positionRWS);
// Get the world space transformed postion
diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/Shaders/UnderWaterUtilities.hlsl b/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/Shaders/UnderWaterUtilities.hlsl
index 4716bd7c..b197d5c0 100644
--- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/Shaders/UnderWaterUtilities.hlsl
+++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/Shaders/UnderWaterUtilities.hlsl
@@ -40,7 +40,7 @@ float GetUnderWaterDistance(uint2 coord)
uint xr = unity_StereoEyeIndex * _BufferStride;
uint2 boundsX = uint2(0xFFFFFFFF - _WaterLine[0 + xr], _WaterLine[1 + xr]);
uint posX = round(dot((float2)coord.xy, rightVector) - _BoundsSS.x);
- posX = clamp(posX, boundsX.x, boundsX.y);
+ posX = clamp(posX, min(boundsX.y, boundsX.x), max(boundsX.x, boundsX.y));
// Decompress water line height
float posY = dot((float2)coord.xy, upVector) - _BoundsSS.z;
diff --git a/Packages/com.unity.render-pipelines.high-definition/package.json b/Packages/com.unity.render-pipelines.high-definition/package.json
index d611f7ac..21c979fe 100644
--- a/Packages/com.unity.render-pipelines.high-definition/package.json
+++ b/Packages/com.unity.render-pipelines.high-definition/package.json
@@ -100,5 +100,5 @@
]
}
],
- "_fingerprint": "4de1dfa20daa1dde4106c2c4990e5356c4cbf1e7"
+ "_fingerprint": "840db4b587bbd894c751a83052cd5c5a11fba2f2"
}
diff --git a/Packages/com.unity.shadergraph/Editor/Drawing/MaterialGraphEditWindow.cs b/Packages/com.unity.shadergraph/Editor/Drawing/MaterialGraphEditWindow.cs
index 9e60d1c4..cfbdd073 100644
--- a/Packages/com.unity.shadergraph/Editor/Drawing/MaterialGraphEditWindow.cs
+++ b/Packages/com.unity.shadergraph/Editor/Drawing/MaterialGraphEditWindow.cs
@@ -486,7 +486,7 @@ namespace UnityEditor.ShaderGraph.Drawing
UpdateTitle();
}
- public void UpdateTitle()
+ public void UpdateTitle(bool ignoreUnsavedChanges = false)
{
string assetPath = AssetDatabase.GUIDToAssetPath(selectedGuid);
string shaderName = Path.GetFileNameWithoutExtension(assetPath);
@@ -501,7 +501,7 @@ namespace UnityEditor.ShaderGraph.Drawing
title = title + " (nothing loaded)";
else
{
- if (GraphHasChangedSinceLastSerialization())
+ if (!ignoreUnsavedChanges && GraphHasChangedSinceLastSerialization())
{
hasUnsavedChanges = true;
// This is the message EditorWindow will show when prompting to close while dirty
@@ -1260,6 +1260,7 @@ namespace UnityEditor.ShaderGraph.Drawing
using (GraphLoadMarker.Auto())
{
m_LastSerializedFileContents = File.ReadAllText(path, Encoding.UTF8);
+
graphObject = CreateInstance();
graphObject.hideFlags = HideFlags.HideAndDontSave;
graphObject.graph = new GraphData
@@ -1268,6 +1269,7 @@ namespace UnityEditor.ShaderGraph.Drawing
isSubGraph = isSubGraph,
messageManager = messageManager
};
+
MultiJson.Deserialize(graphObject.graph, m_LastSerializedFileContents);
graphObject.graph.OnEnable();
graphObject.graph.ValidateGraph();
@@ -1281,8 +1283,7 @@ namespace UnityEditor.ShaderGraph.Drawing
};
}
- UpdateTitle();
-
+ UpdateTitle(ignoreUnsavedChanges: true);
Repaint();
}
catch (Exception)
diff --git a/Packages/com.unity.shadergraph/package.json b/Packages/com.unity.shadergraph/package.json
index d70f5596..0a779f44 100644
--- a/Packages/com.unity.shadergraph/package.json
+++ b/Packages/com.unity.shadergraph/package.json
@@ -43,5 +43,5 @@
"path": "Samples~/UGUIShaders"
}
],
- "_fingerprint": "26dc5ae27e7d8949b4e95045bf189b8733da88ee"
+ "_fingerprint": "e5d3455aa13376f767ad6bf5f3faab2073877176"
}
diff --git a/Packages/com.unity.ugui/Editor/TMP/TMP_BaseShaderGUI.cs b/Packages/com.unity.ugui/Editor/TMP/TMP_BaseShaderGUI.cs
index b712fc8d..bc0db5d6 100644
--- a/Packages/com.unity.ugui/Editor/TMP/TMP_BaseShaderGUI.cs
+++ b/Packages/com.unity.ugui/Editor/TMP/TMP_BaseShaderGUI.cs
@@ -438,7 +438,7 @@ namespace TMPro.EditorUtilities
{
MaterialProperty property = BeginProperty(name);
s_TempLabel.text = label;
- Color value = EditorGUI.ColorField(EditorGUILayout.GetControlRect(), s_TempLabel, property.colorValue, false, true, false);
+ Color value = EditorGUI.ColorField(EditorGUILayout.GetControlRect(), s_TempLabel, property.colorValue, false, true, true);
if (EndProperty())
{
property.colorValue = value;
diff --git a/Packages/com.unity.ugui/Editor/TMP/TMP_FontAssetEditor.cs b/Packages/com.unity.ugui/Editor/TMP/TMP_FontAssetEditor.cs
index 03175494..4b670cfc 100644
--- a/Packages/com.unity.ugui/Editor/TMP/TMP_FontAssetEditor.cs
+++ b/Packages/com.unity.ugui/Editor/TMP/TMP_FontAssetEditor.cs
@@ -6,6 +6,7 @@ using JetBrains.Annotations;
using UnityEngine.TextCore;
using UnityEngine.TextCore.LowLevel;
using UnityEditor.TextCore.LowLevel;
+using System;
namespace TMPro.EditorUtilities
@@ -255,7 +256,6 @@ namespace TMPro.EditorUtilities
private System.DateTime timeStamp;
-
public void OnEnable()
{
m_FaceInfo_prop = serializedObject.FindProperty("m_FaceInfo");
@@ -533,7 +533,18 @@ namespace TMPro.EditorUtilities
{
EditorGUI.BeginChangeCheck();
// TODO: Switch shaders depending on GlyphRenderMode.
- EditorGUILayout.PropertyField(m_AtlasRenderMode_prop);
+ var glyphRenderValues = (GlyphRenderMode[])Enum.GetValues(typeof(GlyphRenderMode));
+ GlyphRenderMode currentValue = glyphRenderValues[m_AtlasRenderMode_prop.enumValueIndex];
+ GlyphRenderModeUI selectedUI = (GlyphRenderModeUI)currentValue;
+
+ selectedUI = (GlyphRenderModeUI)EditorGUILayout.EnumPopup("Render Mode", selectedUI);
+ GlyphRenderMode updatedValue = (GlyphRenderMode)selectedUI;
+ if (updatedValue != currentValue)
+ {
+ int updatedIndex = Array.IndexOf(glyphRenderValues, updatedValue);
+ m_AtlasRenderMode_prop.enumValueIndex = updatedIndex;
+ m_DisplayDestructiveChangeWarning = true;
+ }
EditorGUILayout.PropertyField(m_SamplingPointSize_prop, new GUIContent("Sampling Point Size"));
if (EditorGUI.EndChangeCheck())
{
diff --git a/Packages/com.unity.ugui/Editor/TMP/TMPro_FontAssetCreatorWindow.cs b/Packages/com.unity.ugui/Editor/TMP/TMPro_FontAssetCreatorWindow.cs
index 441d14cb..ad71747c 100644
--- a/Packages/com.unity.ugui/Editor/TMP/TMPro_FontAssetCreatorWindow.cs
+++ b/Packages/com.unity.ugui/Editor/TMP/TMPro_FontAssetCreatorWindow.cs
@@ -675,13 +675,13 @@ namespace TMPro.EditorUtilities
//GUILayout.EndHorizontal();
// Render Mode Selection
- CheckForLegacyGlyphRenderMode();
-
+ GlyphRenderModeUI selectedUIMode = (GlyphRenderModeUI)m_GlyphRenderMode;
EditorGUI.BeginChangeCheck();
- m_GlyphRenderMode = (GlyphRenderMode)EditorGUILayout.EnumPopup("Render Mode", m_GlyphRenderMode);
+ selectedUIMode = (GlyphRenderModeUI)EditorGUILayout.EnumPopup("Render Mode", selectedUIMode);
if (EditorGUI.EndChangeCheck())
{
m_IsFontAtlasInvalid = true;
+ m_GlyphRenderMode = (GlyphRenderMode)selectedUIMode;
}
m_IncludeFontFeatures = EditorGUILayout.Toggle("Get Font Features", m_IncludeFontFeatures);
@@ -1184,7 +1184,6 @@ namespace TMPro.EditorUtilities
ClearGeneratedData();
}
-
///
/// Clear the previously generated data.
///
diff --git a/Packages/com.unity.ugui/Runtime/TMP/TMP_InputField.cs b/Packages/com.unity.ugui/Runtime/TMP/TMP_InputField.cs
index 6a8abaaf..0830328b 100644
--- a/Packages/com.unity.ugui/Runtime/TMP/TMP_InputField.cs
+++ b/Packages/com.unity.ugui/Runtime/TMP/TMP_InputField.cs
@@ -2395,17 +2395,16 @@ namespace TMPro
}
break;
}
-
}
- if (consumedEvent)
+ // We must also consume events when IME is active to prevent them from being passed to the text field. // UUM-100552
+ if (consumedEvent || (m_IsCompositionActive && compositionLength > 0))
{
UpdateLabel();
eventData.Use();
}
}
-
///
///
///
@@ -4188,14 +4187,15 @@ namespace TMPro
if (!cursorBeforeDash)
{
if (ch >= '0' && ch <= '9') return ch;
- if (ch == '-' && (pos == 0 || selectionAtStart)) return ch;
+ if (ch == '-' && (pos == 0 || selectionAtStart) && !text.Contains('-')) return ch;
var separator = Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator;
if (ch == Convert.ToChar(separator) && characterValidation == CharacterValidation.Decimal && !text.Contains(separator)) return ch;
//Some keyboards including Samsung require double tapping a . to get a - this allows these keyboards to input negative integers
- if (characterValidation == CharacterValidation.Integer && ch == '.' && (pos == 0 || selectionAtStart)) return '-';
+ if (characterValidation == CharacterValidation.Integer && ch == '.' && (pos == 0 || selectionAtStart) && !text.Contains('-')) return '-';
}
+
}
else if (characterValidation == CharacterValidation.Digit)
{
diff --git a/Packages/com.unity.ugui/Runtime/TMP/TMP_SpriteAsset.cs b/Packages/com.unity.ugui/Runtime/TMP/TMP_SpriteAsset.cs
index 7f123ba4..f798a3b3 100644
--- a/Packages/com.unity.ugui/Runtime/TMP/TMP_SpriteAsset.cs
+++ b/Packages/com.unity.ugui/Runtime/TMP/TMP_SpriteAsset.cs
@@ -237,7 +237,7 @@ namespace TMPro
if (m_NameLookup == null)
UpdateLookupTables();
- int hashCode = TMP_TextUtilities.GetSimpleHashCode(name);
+ int hashCode = TMP_TextUtilities.GetHashCode(name);
return GetSpriteIndexFromHashcode(hashCode);
}
diff --git a/Packages/com.unity.ugui/Runtime/UGUI/UI/Core/InputField.cs b/Packages/com.unity.ugui/Runtime/UGUI/UI/Core/InputField.cs
index 827e0e2a..8033e843 100644
--- a/Packages/com.unity.ugui/Runtime/UGUI/UI/Core/InputField.cs
+++ b/Packages/com.unity.ugui/Runtime/UGUI/UI/Core/InputField.cs
@@ -3009,10 +3009,10 @@ namespace UnityEngine.UI
if (!cursorBeforeDash || dashInSelection)
{
if (ch >= '0' && ch <= '9') return ch;
- if (ch == '-' && (pos == 0 || selectionAtStart)) return ch;
+ if (ch == '-' && (pos == 0 || selectionAtStart) && !text.Contains('-')) return ch;
if ((ch == '.' || ch == ',') && characterValidation == CharacterValidation.Decimal && text.IndexOfAny(new[] { '.', ',' }) == -1) return ch;
//Some keyboards including Samsung require double tapping a . to get a - this allows these keyboards to input negative integers
- if (characterValidation == CharacterValidation.Integer && ch == '.' && (pos == 0 || selectionAtStart)) return '-';
+ if (characterValidation == CharacterValidation.Integer && ch == '.' && (pos == 0 || selectionAtStart) && !text.Contains('-')) return '-';
}
}
else if (characterValidation == CharacterValidation.Alphanumeric)
diff --git a/Packages/com.unity.ugui/package.json b/Packages/com.unity.ugui/package.json
index b5d16449..fce85ec5 100644
--- a/Packages/com.unity.ugui/package.json
+++ b/Packages/com.unity.ugui/package.json
@@ -19,5 +19,5 @@
"com.unity.modules.ui": "1.0.0",
"com.unity.modules.imgui": "1.0.0"
},
- "_fingerprint": "5c9fd4989cdd8e57279d95edb174435a77f5c853"
+ "_fingerprint": "57cef44123c7486b2e2f08dc6535aecf6c34b8ef"
}
diff --git a/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/VFXConvertSubgraph.cs b/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/VFXConvertSubgraph.cs
index 5b723cfc..e0d33376 100644
--- a/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/VFXConvertSubgraph.cs
+++ b/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/VFXConvertSubgraph.cs
@@ -248,6 +248,8 @@ namespace UnityEditor.VFX.UI
TransferEdges();
//TransferContextsFlowEdges();
UninitSmart();
+
+ m_TargetSubgraph.GetResource()?.WriteAssetWithSubAssets();
}
public void ConvertToSubgraphOperator(VFXView sourceView, IEnumerable controllers, Rect rect, string path)
@@ -282,6 +284,8 @@ namespace UnityEditor.VFX.UI
var subGraphOperator = m_SourceNode as VFXSubgraphOperator;
subGraphOperator.RecreateCopy();
subGraphOperator.ResyncSlots(true);
+
+ m_TargetSubgraph.GetResource()?.WriteAssetWithSubAssets();
}
List m_SourceBlockControllers;
@@ -374,6 +378,8 @@ namespace UnityEditor.VFX.UI
TransferEdges();
m_SourceControllers = m_SourceControllersWithBlocks.ToList();
UninitSmart();
+
+ m_TargetSubgraph.GetResource()?.WriteAssetWithSubAssets();
}
bool CreateUniqueSubgraph(string typeName, string extension, Func createFunc)
diff --git a/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/VFXView.cs b/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/VFXView.cs
index 0a16d099..d62810bf 100644
--- a/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/VFXView.cs
+++ b/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/VFXView.cs
@@ -1056,7 +1056,20 @@ namespace UnityEditor.VFX.UI
m_ComponentBoard.RefreshInitializeErrors();
}
+ public void ToggleDebugPanels()
+ {
+ if (m_ProfilingBoard.parent != null && attachedComponent != null)
+ {
+ m_ProfilingBoard.TogglePanelsVisibility();
+ }
+ }
+
public void ToggleProfilingBoard()
+ {
+ m_ToggleProfilingBoard.value = !m_ToggleProfilingBoard.value;
+ }
+
+ void OnToggleProfilingBoard()
{
if (m_ProfilingBoard.parent == null)
{
@@ -1116,7 +1129,7 @@ namespace UnityEditor.VFX.UI
Toggle m_ToggleProfilingBoard;
void ToggleProfilingBoard(ChangeEvent e)
{
- ToggleProfilingBoard();
+ OnToggleProfilingBoard();
}
public void OnVisualEffectComponentChanged(IEnumerable visualEffects)
@@ -1812,27 +1825,7 @@ namespace UnityEditor.VFX.UI
{
m_ComponentBoard?.DeactivateBoundsRecordingIfNeeded(); //Avoids saving the graph with unnecessary bounds computations
- var graphToSave = new HashSet();
- GetGraphsRecursively(controller.graph, graphToSave);
- foreach (var graph in graphToSave)
- {
- if (EditorUtility.IsDirty(graph) || UnityEngine.Object.ReferenceEquals(graph, controller.graph))
- {
- graph.UpdateSubAssets();
- try
- {
- VFXGraph.compilingInEditMode = !m_IsRuntimeMode;
- graph.visualEffectResource.WriteAsset();
- }
- finally
- {
- VFXGraph.compilingInEditMode = false;
- }
- }
- }
-
- // Only for testing purpose
- //VFXAnalytics.GetInstance().OnSaveVFXAsset(this);
+ controller.graph.visualEffectResource.WriteAssetWithSubAssets();
}
internal void SaveAs(string newPath)
@@ -1848,46 +1841,6 @@ namespace UnityEditor.VFX.UI
}
}
- void GetGraphsRecursively(VFXGraph start, HashSet graphs)
- {
- if (graphs.Contains(start))
- return;
- graphs.Add(start);
- foreach (var child in start.children)
- {
- if (child is VFXSubgraphOperator ope)
- {
- if (ope.subgraph != null)
- {
- var graph = ope.subgraph.GetResource().GetOrCreateGraph();
- GetGraphsRecursively(graph, graphs);
- }
- }
- else if (child is VFXSubgraphContext subCtx)
- {
- if (subCtx.subgraph != null)
- {
- var graph = subCtx.subgraph.GetResource().GetOrCreateGraph();
- GetGraphsRecursively(graph, graphs);
- }
- }
- else if (child is VFXContext ctx)
- {
- foreach (var block in ctx.children.Cast())
- {
- if (block is VFXSubgraphBlock subBlock)
- {
- if (subBlock.subgraph != null)
- {
- var graph = subBlock.subgraph.GetResource().GetOrCreateGraph();
- GetGraphsRecursively(graph, graphs);
- }
- }
- }
- }
- }
- }
-
public EventPropagation OnCompile()
{
Compile();
@@ -1967,11 +1920,6 @@ namespace UnityEditor.VFX.UI
}
}
- public void ToggleDebugPanels()
- {
- m_ProfilingBoard.TogglePanelsVisibility();
- }
-
public IEnumerable GetAllContexts()
{
foreach (var layer in contentViewContainer.Children())
diff --git a/Packages/com.unity.visualeffectgraph/Editor/Models/VFXErrorManager.cs b/Packages/com.unity.visualeffectgraph/Editor/Models/VFXErrorManager.cs
index 69a07ce7..1eb13b51 100644
--- a/Packages/com.unity.visualeffectgraph/Editor/Models/VFXErrorManager.cs
+++ b/Packages/com.unity.visualeffectgraph/Editor/Models/VFXErrorManager.cs
@@ -158,7 +158,10 @@ namespace UnityEditor.VFX
}
finally
{
+ // swap dirty and scheduled models
+ var tmp = m_DirtyModels;
m_DirtyModels = m_ScheduledModels;
+ m_ScheduledModels = tmp;
m_ScheduledModels.Clear();
m_IsGeneratingErrors = false;
}
diff --git a/Packages/com.unity.visualeffectgraph/Editor/Models/VFXGraph.cs b/Packages/com.unity.visualeffectgraph/Editor/Models/VFXGraph.cs
index 6a8a7b60..3a369536 100644
--- a/Packages/com.unity.visualeffectgraph/Editor/Models/VFXGraph.cs
+++ b/Packages/com.unity.visualeffectgraph/Editor/Models/VFXGraph.cs
@@ -374,19 +374,7 @@ namespace UnityEditor.VFX
AssetDatabase.StartAssetEditing();
}
var vfxResource = VisualEffectResource.GetResourceAtPath(path);
- if (vfxResource != null)
- {
- vfxResource.GetOrCreateGraph().UpdateSubAssets();
- try
- {
- VFXGraph.compilingInEditMode = vfxResource.GetOrCreateGraph().GetCompilationMode() == VFXCompilationMode.Edition;
- vfxResource.WriteAsset(); // write asset as the AssetDatabase won't do it.
- }
- finally
- {
- VFXGraph.compilingInEditMode = false;
- }
- }
+ vfxResource?.WriteAssetWithSubAssets();
}
}
finally
@@ -432,6 +420,13 @@ namespace UnityEditor.VFX
resource.GetOrCreateGraph().UpdateSubAssets();
}
+ public static void WriteAssetWithSubAssets(this VisualEffectResource resource)
+ {
+ var graph = resource.GetOrCreateGraph();
+ graph.UpdateSubAssets();
+ resource.WriteAsset();
+ }
+
public static bool IsAssetEditable(this VisualEffectResource resource)
{
return AssetDatabase.IsOpenForEdit((UnityEngine.Object)resource.asset ?? resource.subgraph, StatusQueryOptions.UseCachedIfPossible);
@@ -488,15 +483,6 @@ namespace UnityEditor.VFX
// 18: Change ProbabilitySampling m_IntegratedRandomDeprecated changed to m_Mode
public static readonly int CurrentVersion = 18;
- [NonSerialized]
- internal static bool compilingInEditMode = false;
-
- public override void OnEnable()
- {
- base.OnEnable();
- m_ExpressionGraphDirty = true;
- }
-
public override void OnSRPChanged()
{
m_GraphSanitized = false;
@@ -1139,7 +1125,7 @@ namespace UnityEditor.VFX
public void SetCompilationMode(VFXCompilationMode mode, bool reimport = true)
{
- if (m_CompilationMode != mode)
+ if (m_CompilationMode != mode && !GetResource().isSubgraph)
{
m_CompilationMode = mode;
SetExpressionGraphDirty();
@@ -1400,11 +1386,10 @@ namespace UnityEditor.VFX
public void CompileForImport()
{
- if (compilingInEditMode)
- m_CompilationMode = VFXCompilationMode.Edition;
+ bool isSubgraph = GetResource().isSubgraph;
SyncCustomAttributes();
- if (!GetResource().isSubgraph)
+ if (!isSubgraph)
{
// Check Graph Before Import can be needed to synchronize modified shaderGraph
foreach (var child in children)
@@ -1492,21 +1477,15 @@ namespace UnityEditor.VFX
[SerializeField]
private int m_ResourceVersion;
- [NonSerialized]
private bool m_GraphSanitized = false;
- [NonSerialized]
private bool m_ExpressionGraphDirty = true;
- [NonSerialized]
private bool m_ExpressionValuesDirty = true;
- [NonSerialized]
private bool m_DependentDirty = true;
- [NonSerialized]
private bool m_MaterialsDirty = false;
- [NonSerialized]
private bool m_CustomAttributesDirty = false;
- [NonSerialized]
private VFXGraphCompiledData m_CompiledData;
+
private VFXCompilationMode m_CompilationMode = VFXCompilationMode.Runtime;
private bool m_ForceShaderDebugSymbols = false;
private bool m_ForceShaderValidation = false;
diff --git a/Packages/com.unity.visualeffectgraph/Editor/UIResources/uss/PropertyRM.uss b/Packages/com.unity.visualeffectgraph/Editor/UIResources/uss/PropertyRM.uss
index 23b76860..5e83b2e7 100644
--- a/Packages/com.unity.visualeffectgraph/Editor/UIResources/uss/PropertyRM.uss
+++ b/Packages/com.unity.visualeffectgraph/Editor/UIResources/uss/PropertyRM.uss
@@ -107,9 +107,11 @@
.propertyrm #spacebutton.None {
background-image : url("project:///Packages/com.unity.visualeffectgraph/Editor/UIResources/VFX/d_NoneSpace@2x.png");
}
-.propertyrm VFXMatrix4x4Field Label {
- width: 18px;
- margin-left: 4px;
+
+.propertyrm #matrixContainer Label {
+ width: 20px;
+ margin-right: 2px;
+ -unity-text-align: middle-right;
}
.propertyrm #spacebutton:hover {
diff --git a/Packages/com.unity.visualeffectgraph/Editor/UIResources/uss/VFXDataAnchor.uss b/Packages/com.unity.visualeffectgraph/Editor/UIResources/uss/VFXDataAnchor.uss
index af340652..e1fd0396 100644
--- a/Packages/com.unity.visualeffectgraph/Editor/UIResources/uss/VFXDataAnchor.uss
+++ b/Packages/com.unity.visualeffectgraph/Editor/UIResources/uss/VFXDataAnchor.uss
@@ -175,6 +175,10 @@ VFXDataAnchor.Output #type
-unity-text-align: middle-center;
}
+.VFXDataAnchor .propertyrm #matrixContainer FloatInput {
+ width: 30px;
+}
+
.VFXOutputDataAnchor #icon
{
width: 13px;
diff --git a/Packages/com.unity.visualeffectgraph/Shaders/VFXVolumetricFogUpdate.template b/Packages/com.unity.visualeffectgraph/Shaders/VFXVolumetricFogUpdate.template
index 1fc57580..0cf1f175 100644
--- a/Packages/com.unity.visualeffectgraph/Shaders/VFXVolumetricFogUpdate.template
+++ b/Packages/com.unity.visualeffectgraph/Shaders/VFXVolumetricFogUpdate.template
@@ -10,6 +10,10 @@ ${VFXInclude("Shaders/VFXParticleCommon.template")}
// Indirect draw is always enabled for volumetric fog output
RWStructuredBuffer indirectBuffer;
+#if HAS_STRIPS_DATA
+StructuredBuffer stripDataBuffer;
+#endif
+
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
diff --git a/Packages/com.unity.visualeffectgraph/package.json b/Packages/com.unity.visualeffectgraph/package.json
index 737f8f3a..86b07f92 100644
--- a/Packages/com.unity.visualeffectgraph/package.json
+++ b/Packages/com.unity.visualeffectgraph/package.json
@@ -36,5 +36,5 @@
]
}
],
- "_fingerprint": "a6f52bdb90a859536ffa7087989628316309dacc"
+ "_fingerprint": "aecde9dec67d1cb56e53e3135229de90e9d94fb6"
}