Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
3369943
[Port] [6000.3] [UUM-154186] [HDRP] Wait for the GPU before releasing…
CianNoonanUnity Oct 27, 2026
02c41f5
[Port] [6000.3] [UUM-147033] Fix 2D collider shadow flicker across Ed…
unity-cchu Oct 27, 2026
b6c1899
[Port] [6000.3] Avoid miscompilation in ANGLE DX11 backend in URP clu…
svc-reach-platform-support Oct 28, 2026
dc9182b
[Port] [6000.3] [UUM-158401] [SRP] Apply the native subpass limit to …
YohannVaastUnity Oct 28, 2026
e935746
[Port] [6000.3] [UUM-147726] Fix render requests to cubemaps renderin…
RoseHirigoyen Oct 31, 2026
5316f41
[Port] [6000.3] [UUM-153768] [URP] [HDRP] Run the material upgrade du…
svc-reach-platform-support Nov 4, 2026
7c30305
[Port] [6000.3] [UUM-159093] Fix 2D sprites and UI not rendering with…
svc-reach-platform-support Nov 4, 2026
7fac31d
[Port] [6000.3] Fix incorrect offset of probe occlusion in APV when L…
svc-reach-platform-support Nov 4, 2026
3e1b22a
[Port] [6000.3] [UUM-159960] [VFX] Fix Custom HLSL function body pars…
robert-badea-unity Nov 7, 2026
15ed69a
[Port] [6000.3] [UUM-147726] Make the cubemap render request test use…
RoseHirigoyen Nov 7, 2026
316f438
[Port] [6000.3] DOCG-9337 Fix typo in Screen Space Lens Flare
svc-reach-platform-support Nov 7, 2026
606a276
[Port] [6000.3] [UUM-146356] [UUM-154016] [UUM-159132] [URP] Fix Forw…
Nov 10, 2026
dd47e92
[6000.3][VFX] Add the RenderPipeline SubShader tag for URP VFX
Nov 10, 2026
5f6f39f
[Port][HDRP]Fix HDRP XR depth copy scale when RTHandle allocation exc…
lpledouxUnity Nov 10, 2026
1ff539f
[Port] [6000.3] [UUM-160579] Keep prefab conversions when the convert…
arttu-peltonen Nov 10, 2026
98ede3c
[Port] [6000.3] Graphics/URP - [UUM-155833] - Fix multi-display suppo…
deliahamwood Nov 11, 2026
4061e3d
[Port] [6000.3] [UUM-158409] [URP 2D] Fix Shadow Caster 2D not follow…
toru-unity Nov 11, 2026
2454057
[Port] [6000.3] [Core] Fix bad type on DebugOccluder shader causing w…
geunheepark-unity Nov 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public ProbeVolumeScratchBufferPool(ProbeVolumeBakingSet bakingSet, ProbeVolumeS
m_ValidityLayerCount = bakingSet.bakedMaskCount;
m_SkyOcclusionSize = bakingSet.sharedSkyOcclusionL0L1ChunkSize;
m_SkyShadingDirectionSize = bakingSet.sharedSkyShadingDirectionIndicesChunkSize;
m_L2Size = bakingSet.L2TextureChunkSize;
m_L2Size = shBands == ProbeVolumeSHBands.SphericalHarmonicsL2 ? bakingSet.L2TextureChunkSize : 0;
m_ProbeOcclusionSize = bakingSet.ProbeOcclusionChunkSize;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -747,12 +747,18 @@ public SubPassFlags GetSubPassFlagForMerging()
throw new Exception(RenderGraph.RenderGraphExceptionMessages.k_CannotDetermineSubPassFlagNoDepth);
}

// Depth attachment is always at index 0.
return GetSubPassFlagForMerging(fragments[0].accessFlags);
}

// Same as above, from the access flags of the native pass depth attachment.
static SubPassFlags GetSubPassFlagForMerging(AccessFlags depthAccessFlags)
{
// Only do this for mobile using Vulkan.
#if (PLATFORM_ANDROID)
if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Vulkan)
{
// Depth attachment is always at index 0.
return (fragments[0].accessFlags.HasFlag(AccessFlags.Write)) ? SubPassFlags.None : SubPassFlags.ReadOnlyDepth;
return (depthAccessFlags.HasFlag(AccessFlags.Write)) ? SubPassFlags.None : SubPassFlags.ReadOnlyDepth;
}
else
{
Expand Down Expand Up @@ -1048,8 +1054,9 @@ public static PassBreakAudit CanMerge(CompilerContextData contextData, int activ
}

// We check first if we are at risk of having too many subpasses,
// only then we do the costlier subpass merging check, short circuiting it whenever possible
bool canAddAnExtraSubpass = (nativePass.numGraphPasses < NativePassCompiler.k_MaxSubpass);
// only then we do the costlier subpass merging check, short circuiting it whenever possible.
// The limit is on native subpasses: graph passes merged into the same native subpass don't count.
bool canAddAnExtraSubpass = (nativePass.numNativeSubPasses < NativePassCompiler.k_MaxSubpass);
if (!canAddAnExtraSubpass && !CanMergeNativeSubPass(contextData, ref nativePass, ref passToMerge))
{
return new PassBreakAudit(PassBreakReason.SubPassLimitReached, passIdToMerge);
Expand Down Expand Up @@ -1199,8 +1206,16 @@ static bool CanMergeNativeSubPass(CompilerContextData contextData, ref NativePas
inputIndex++;
}

// If the native pass gets its depth attachment from this merge, TryMerge adds it first and updates
// the flags of the existing subpasses, the last one included (see AddDepthAttachmentFirstDuringMerge)
SubPassFlags lastPassFlags = lastPass.flags;
if (currRenderGraphPassHasDepth && !nativePass.hasDepth)
{
lastPassFlags |= GetSubPassFlagForMerging(contextData.fragmentData[passToMerge.firstFragment].accessFlags);
}

// last check for flags
return flags == lastPass.flags;
return flags == lastPassFlags;
}

// Try to merge the new graph pass into the last native sub pass or create a new one in the current native pass.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Shader "Hidden/Core/DebugOccluder"
return output;
}

float GetOutputColor(float occluderValue)
float4 GetOutputColor(float occluderValue)
{
float value = saturate((occluderValue - _ValidRange.x) * _ValidRange.y);
return float4(value.xxx, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,107 @@ public void NativeSubPassesLimitNotExceeded()
Assert.AreEqual(Rendering.RenderGraphModule.NativeRenderPassCompiler.PassBreakReason.SubPassLimitReached, passes[0].breakAudit.reason);
}

[Test]
public void NativeSubPassesLimitIgnoresGraphPassesMergedIntoSameSubPass()
{
var g = AllocateRenderGraph();
var renderTargets = ImportAndCreateRenderTargets(g);

// More graph passes than the native subpasses limit, all using the same attachments so they share a single native subpass
for (int i = 0; i < Rendering.RenderGraphModule.NativeRenderPassCompiler.NativePassCompiler.k_MaxSubpass + 2; i++)
{
using (var builder = g.AddRasterRenderPass<RenderGraphTestPassData>($"TestPass_{i}", out var passData))
{
builder.SetRenderAttachmentDepth(renderTargets.extraDepthBuffer, AccessFlags.Write);
builder.SetRenderAttachment(renderTargets.extraTextures[0], 0, AccessFlags.Write);
builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { });
builder.AllowPassCulling(false);
}
}

// Different color attachment, so this graph pass needs a second native subpass
using (var builder = g.AddRasterRenderPass<RenderGraphTestPassData>("TestPass_NewSubPass", out var passData))
{
builder.SetRenderAttachmentDepth(renderTargets.extraDepthBuffer, AccessFlags.Write);
builder.SetRenderAttachment(renderTargets.extraTextures[1], 0, AccessFlags.Write);
builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { });
builder.AllowPassCulling(false);
}

var result = g.CompileNativeRenderGraph(g.ComputeGraphHash());
var passes = result.contextData.GetNativePasses();

Assert.AreEqual(1, passes.Count);
Assert.AreEqual(Rendering.RenderGraphModule.NativeRenderPassCompiler.NativePassCompiler.k_MaxSubpass + 3, passes[0].numGraphPasses);
Assert.AreEqual(2, passes[0].numNativeSubPasses);
}

[Test]
public void NativeSubPassesLimitReachedWithMultipleGraphPassesPerSubPass()
{
var g = AllocateRenderGraph();
var renderTargets = ImportAndCreateRenderTargets(g);

// Two graph passes per native subpass, alternating the color attachment so that each pair needs a new native subpass,
// one pair more than the native subpasses limit
for (int i = 0; i < 2 * (Rendering.RenderGraphModule.NativeRenderPassCompiler.NativePassCompiler.k_MaxSubpass + 1); i++)
{
using (var builder = g.AddRasterRenderPass<RenderGraphTestPassData>($"TestPass_{i}", out var passData))
{
builder.SetRenderAttachmentDepth(renderTargets.extraDepthBuffer, AccessFlags.Write);
builder.SetRenderAttachment(renderTargets.extraTextures[(i / 2) % 2], 0, AccessFlags.Write);
builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { });
builder.AllowPassCulling(false);
}
}

var result = g.CompileNativeRenderGraph(g.ComputeGraphHash());
var passes = result.contextData.GetNativePasses();

Assert.AreEqual(2, passes.Count);
Assert.AreEqual(2 * Rendering.RenderGraphModule.NativeRenderPassCompiler.NativePassCompiler.k_MaxSubpass, passes[0].numGraphPasses);
Assert.AreEqual(Rendering.RenderGraphModule.NativeRenderPassCompiler.NativePassCompiler.k_MaxSubpass, passes[0].numNativeSubPasses);
Assert.AreEqual(Rendering.RenderGraphModule.NativeRenderPassCompiler.PassBreakReason.SubPassLimitReached, passes[0].breakAudit.reason);
Assert.AreEqual(2, passes[1].numGraphPasses);
Assert.AreEqual(1, passes[1].numNativeSubPasses);
}

[Test]
public void NativeSubPassesLimitNotExceededWhenMergedPassAddsDepth()
{
var g = AllocateRenderGraph();
var renderTargets = ImportAndCreateRenderTargets(g);

// As many graph passes as the native subpasses limit, without depth and alternating the color attachment, so one native subpass each
for (int i = 0; i < Rendering.RenderGraphModule.NativeRenderPassCompiler.NativePassCompiler.k_MaxSubpass; i++)
{
using (var builder = g.AddRasterRenderPass<RenderGraphTestPassData>($"TestPass_{i}", out var passData))
{
builder.SetRenderAttachment(renderTargets.extraTextures[i % 2], 0, AccessFlags.Write);
builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { });
builder.AllowPassCulling(false);
}
}

// Same color attachment as the last native subpass, but this graph pass brings the depth attachment of the native pass,
// which changes the flags of the existing native subpasses when merged
using (var builder = g.AddRasterRenderPass<RenderGraphTestPassData>("TestPass_AddsDepth", out var passData))
{
builder.SetRenderAttachmentDepth(renderTargets.extraDepthBuffer, AccessFlags.Write);
builder.SetRenderAttachment(renderTargets.extraTextures[(Rendering.RenderGraphModule.NativeRenderPassCompiler.NativePassCompiler.k_MaxSubpass - 1) % 2], 0, AccessFlags.Write);
builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => { });
builder.AllowPassCulling(false);
}

var result = g.CompileNativeRenderGraph(g.ComputeGraphHash());
var passes = result.contextData.GetNativePasses();

foreach (var pass in passes)
{
Assert.LessOrEqual(pass.numNativeSubPasses, Rendering.RenderGraphModule.NativeRenderPassCompiler.NativePassCompiler.k_MaxSubpass);
}
}

[Test]
public void AllocateFreeInMergedPassesWorks()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Use the **Flares** settings to control regular flares, reversed flares and warpe
| ----------------------- | ----------------- | ------------------------------------------------------------ |
| **Regular Multiplier** | | Set the strength of regular flares. If the value is 0, HDRP doesn't calculate or render regular flares. The default is 1. |
| **Reversed Multiplier** | | Set the strength of reversed flares. If the value is 0, HDRP doesn't calculate or render reversed flares. The default is 1. |
| **Warped Multipler** | | Set the strength of warped flares. If the value is 0, HDRP doesn't calculate or render warped flares. The default is 1. |
| **Warped Multiplier** | | Set the strength of warped flares. If the value is 0, HDRP doesn't calculate or render warped flares. The default is 1. |
| | **Scale** | Scale the width (**x**) and height (**y**) of warped flares. The defaults are 1. This property only appears if you open the **More** (⋮) menu and select **Show Additional Properties**. |
| **Samples** | | Set the number of times HDRP repeats the regular, reversed and warped flares. The range is 1 through 3. The default is 1. Increasing **Samples** has a big impact on performance. |
| | **Sample Dimmer** | Set the strength of the lens flares HDRP adds if you set **Samples** to 2 or 3. The higher the value, the less intense the flares. This property only appears if you open the **More** (⋮) menu and select **Show Additional Properties**. |
Expand Down
Loading
Loading