Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
089a8a4
[6000.0] Disable progress bar when using Live Update debug view mode …
pema99 Nov 13, 2025
8362578
[Port] [6000.0] RenderGraph - Fix a crash on old IOS devices due to a…
YohannVaastUnity Nov 15, 2025
6f54489
[Backport] [6000.0] Backport improvements & Aniso fix.
YohannVaastUnity Nov 15, 2025
383644a
[Port] [6000.0] [UUM-90714] Fix for ShadowCaster2D breaks on certain …
svc-reach-platform-support Nov 18, 2025
bf50eee
[Port] [6000.0] Clean up the Shader Graph docs landing page
svc-reach-platform-support Nov 20, 2025
8f8910f
[Port] [6000.0] docg-7419: Update lightmapping docs to use agreed ter…
ocarrere Nov 21, 2025
189371f
[Port] [6000.0] docg-7654: Remove text related to missing screenshot
svc-reach-platform-support Nov 25, 2025
aa84a5c
[Port] [6000.0] [VFX] Safe normalize in LookAt operator to prevent NaN
svc-reach-platform-support Nov 25, 2025
af90d34
[6.0] Migrate remaining SRP templates
theo-at-unity Nov 25, 2025
81b84f1
[Port] [6000.0] Fix for UUM-119990
svc-reach-platform-support Nov 27, 2025
f2c9b13
[6000.0][HDRP][Tests] Remove DLSS test ignore filter
volkan-unity Nov 27, 2025
8bccc99
[Port] [6000.0] docg-8135: Reorder Node Library ToC to mirror Shader …
ocarrere Nov 27, 2025
34340d3
[Port] [6000.0] docg-7325: Specify that Shader Graph doesn't support …
svc-reach-platform-support Nov 27, 2025
6f0f6e1
[Port] [6000.0] docg-6776: clarify Custom Function uniform usage and …
svc-reach-platform-support Nov 27, 2025
c74f477
[UUM-112466][6000.0][2D CI] Restore 2D gfx tests
kennytann Nov 27, 2025
d988a13
[Port] [6000.0] Fix UUM-115985 Lens Flare (SRP) component missing doc…
svc-reach-platform-support Nov 28, 2025
09a3bcf
[Port] [6000.0] docg-7297: Clarify explicit LOD behavior in Sample Te…
svc-reach-platform-support Nov 28, 2025
1dca429
[Port] [6000.0] [UUM-104008][URP 2D] Fix LIght2D toggle UI
svc-reach-platform-support Dec 1, 2025
4d7d1c8
[Port] [6000.0] docg-7795: Reference page for HDRP Six Way Shader Graph
ocarrere Dec 1, 2025
a727be6
[Port] [6000.0] [HDRP][FSR2] fix quality camera override not respecti…
svc-reach-platform-support Dec 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static ProbeSubdivisionResult GetWorldSubdivision(ref bool canceledByUser)
return GetBricksFromLoaded();

var ctx = PrepareProbeSubdivisionContext();
return BakeBricks(ctx, m_BakingBatch.contributors, ref canceledByUser);
return BakeBricks(ctx, m_BakingBatch.contributors, showProgress: true, ref canceledByUser);
}

static NativeList<Vector3> ApplySubdivisionResults(ProbeSubdivisionResult results, ref bool canceledByUser)
Expand Down Expand Up @@ -303,7 +303,7 @@ static internal ProbeSubdivisionContext PrepareProbeSubdivisionContext(bool live
return ctx;
}

static internal ProbeSubdivisionResult BakeBricks(ProbeSubdivisionContext ctx, in GIContributors contributors, ref bool canceledByUser)
static internal ProbeSubdivisionResult BakeBricks(ProbeSubdivisionContext ctx, in GIContributors contributors, bool showProgress, ref bool canceledByUser)
{
var result = new ProbeSubdivisionResult();

Expand All @@ -318,7 +318,7 @@ static internal ProbeSubdivisionResult BakeBricks(ProbeSubdivisionContext ctx, i
// subdivide all the cells and generate brick positions
foreach (var cell in ctx.cells)
{
if (cellIdx++ % freq == 0) // Don't refresh progress bar at every iteration because it's slow
if (showProgress && cellIdx++ % freq == 0) // Don't refresh progress bar at every iteration because it's slow
{
if (EditorUtility.DisplayCancelableProgressBar("Generating Probe Volume Bricks", $"Processing cell {cellIdx} out of {ctx.cells.Count}", Mathf.Lerp(progress0, progress1, cellIdx / (float)ctx.cells.Count)))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static void UpdateRealtimeSubdivisionDebug()
if (s_CurrentSubdivision == null)
{
// Start a new Subdivision
s_CurrentSubdivision = Subdivide();
s_CurrentSubdivision = Subdivide(showProgress: false);
}

// Step the subdivision with the amount of cell per frame in debug menu
Expand All @@ -71,7 +71,7 @@ static void UpdateRealtimeSubdivisionDebug()
}
}

IEnumerator Subdivide()
IEnumerator Subdivide(bool showProgress)
{
var ctx = AdaptiveProbeVolumes.PrepareProbeSubdivisionContext(true);
var contributors = GIContributors.Find(GIContributors.ContributorFilter.All);
Expand Down Expand Up @@ -115,7 +115,7 @@ IEnumerator Subdivide()
ctx.cells.Add(cell);

bool canceledByUser = false;
var result = AdaptiveProbeVolumes.BakeBricks(ctx, contributors, ref canceledByUser);
var result = AdaptiveProbeVolumes.BakeBricks(ctx, contributors, showProgress, ref canceledByUser);

if (result.cells.Count != 0)
ProbeReferenceVolume.instance.realtimeSubdivisionInfo[cell.bounds] = result.cells[0].bricks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace UnityEngine.Rendering
/// </summary>
[ExecuteAlways]
[AddComponentMenu("Rendering/Lens Flare (SRP)")]
[CurrentPipelineHelpURL("shared/lens-flare/lens-flare-component")]
public sealed class LensFlareComponentSRP : MonoBehaviour
{
[SerializeField]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using UnityEngine.Rendering;
using System.Collections.Generic;
using Unity.Collections;
using UnityEngine.Experimental.Rendering;

namespace UnityEngine.Rendering.RenderGraphModule.NativeRenderPassCompiler
{
Expand Down Expand Up @@ -665,7 +666,7 @@ public static PassBreakAudit CanMerge(CompilerContextData contextData, int activ
return new PassBreakAudit(PassBreakReason.NonRasterPass, passIdToMerge);
}

ref readonly var nativePass = ref contextData.nativePassData.ElementAt(activeNativePassId);
ref var nativePass = ref contextData.nativePassData.ElementAt(activeNativePassId);

// If a pass has no fragment attachments a lot of the tests can be skipped
// You could argue that a raster pass with no fragments is not allowed but why not?
Expand Down Expand Up @@ -805,6 +806,12 @@ public static PassBreakAudit CanMerge(CompilerContextData contextData, int activ
}
}

// Determines if the pixel storage limit is reached after adding the new 'pass to merge' attachments to the current native render pass.
if (TotalAttachmentsSizeExceedPixelStorageLimit(contextData, ref nativePass, ref attachmentsToTryAdding))
{
return new PassBreakAudit(PassBreakReason.AttachmentLimitReached, passIdToMerge);
}

bool canMergeNativeSubPass = CanMergeNativeSubPass(contextData, nativePass, passToMerge);
if (!canMergeNativeSubPass && nativePass.numGraphPasses + 1 > NativePassCompiler.k_MaxSubpass)
{
Expand All @@ -815,6 +822,34 @@ public static PassBreakAudit CanMerge(CompilerContextData contextData, int activ
return new PassBreakAudit(PassBreakReason.Merged, passIdToMerge);
}

static bool TotalAttachmentsSizeExceedPixelStorageLimit(CompilerContextData contextData, ref NativePassData nativePass, ref FixedAttachmentArray<PassFragmentData> attachmentsToTryAdding)
{
// TODO: We are currently only checking for iOS GPU Family 1 to 3 since the storage size is much more restricted (16 bytes for Family 1 and 32 for Family 2 & 3).
// This is temporary. Later on, we should check all iOS GPU Families but also Android (Vulkan) to avoid the same potential restrictions.
if (Application.platform == RuntimePlatform.IPhonePlayer && SystemInfo.maxTiledPixelStorageSize <= 32)
{
int totalSize = 0;

// Iterate over current attachments
for (int i = 0; i < nativePass.fragments.size; ++i)
{
ref readonly var unvResource = ref contextData.UnversionedResourceData(nativePass.fragments[i].resource);
totalSize += SystemInfo.GetTiledRenderTargetStorageSize(unvResource.graphicsFormat, unvResource.msaaSamples);
}

// Iterate over new attachments to add
for (int i = 0; i < attachmentsToTryAdding.size; ++i)
{
ref readonly var unvResource = ref contextData.UnversionedResourceData(attachmentsToTryAdding[i].resource);
totalSize += SystemInfo.GetTiledRenderTargetStorageSize(unvResource.graphicsFormat, unvResource.msaaSamples);
}

return totalSize > SystemInfo.maxTiledPixelStorageSize;
}

return false;
}

// This function follows the structure of TryMergeNativeSubPass but only tests if the new native subpass can be
// merged with the last one, allowing for early returns. It does not modify the state
static bool CanMergeNativeSubPass(CompilerContextData contextData, NativePassData nativePass, PassData passToMerge)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Runtime.CompilerServices;
using Unity.Collections;
using UnityEngine.Rendering;
using UnityEngine.Experimental.Rendering;

namespace UnityEngine.Rendering.RenderGraphModule.NativeRenderPassCompiler
{
Expand Down Expand Up @@ -29,6 +30,7 @@ internal struct ResourceUnversionedData
public readonly int height;
public readonly int volumeDepth;
public readonly int msaaSamples;
public readonly GraphicsFormat graphicsFormat;

public int latestVersionNumber; // mostly readonly, can be decremented only if all passes using the last version are culled

Expand Down Expand Up @@ -59,6 +61,7 @@ public ResourceUnversionedData(IRenderGraphResource rll, ref RenderTargetInfo in
clear = desc.clearBuffer;
discard = desc.discardBuffer;
bindMS = info.bindMS;
graphicsFormat = desc.format;
}

public ResourceUnversionedData(IRenderGraphResource rll, ref BufferDesc _, bool isResourceShared)
Expand All @@ -83,6 +86,7 @@ public ResourceUnversionedData(IRenderGraphResource rll, ref BufferDesc _, bool
clear = false;
discard = false;
bindMS = false;
graphicsFormat = GraphicsFormat.None;
}

public ResourceUnversionedData(IRenderGraphResource rll, ref RayTracingAccelerationStructureDesc _, bool isResourceShared)
Expand All @@ -107,6 +111,7 @@ public ResourceUnversionedData(IRenderGraphResource rll, ref RayTracingAccelerat
clear = false;
discard = false;
bindMS = false;
graphicsFormat = GraphicsFormat.None;
}

public void InitializeNullResource()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@
* [StackLit Master Stack reference](stacklit-master-stack-reference.md)
* [Canvas Master Stack reference](canvas-master-stack-reference.md)
* [Fog Volume Master Stack reference](fog-volume-master-stack-reference.md)
* [Six Way Master Stack reference](six-way-master-stack-reference.md)
* [Water Master Stack reference](master-stack-water.md)
* [Environmental effects reference](reference-environmental-effects.md)
* [Sky reference](reference-sky.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ To use bicubic sampling in your project, enable the **Use Bicubic Lightmap Sampl

## Fix texture bleeding

Bicubic sampling can cause texture bleeding, where Unity samples unintended texels from neighboring regions of a texture, leading to visual artifacts. To prevent texture bleeding, there needs to be enough padding between [lightmap UV charts](https://docs.unity3d.com/Manual/LightingGiUvs-landing.html). To fully remove texture bleeding artifacts, set the number of texels between each UV chart to at least 2 for bilinear filtering and at least 4 for bicubic filtering.
Bicubic sampling can cause texture bleeding, where Unity samples unintended texels from neighboring regions of a texture, leading to visual artifacts. To prevent texture bleeding, there needs to be enough margin between [lightmap UV charts](LightingGiUvs-landing). To fully remove texture bleeding artifacts, set the number of texels between each UV chart to at least 2 for bilinear filtering and at least 4 for bicubic filtering.

To change the padding in or between charts, refer to [Fix light bleeding in lightmaps](https://docs.unity3d.com/Manual/ProgressiveLightmapper-UVOverlap.html).
To change the margin between charts, refer to [Fix light bleeding in lightmaps](ProgressiveLightmapper-UVOverlap).

## Additional resources

* [Introduction to lightmaps and baking](https://docs.unity3d.com/Manual/Lightmappers.html)
* [Configuring lightmaps and baking](https://docs.unity3d.com/Manual/Lightmapping-configure.html)
* [Optimize baking](https://docs.unity3d.com/Manual/GPUProgressiveLightmapper.html)
* [Introduction to lightmap UVs](https://docs.unity3d.com/Manual/LightingGiUvs.html)
* [Introduction to lightmaps and baking](Lightmappers)
* [Configuring lightmaps and baking](Lightmapping-configure)
* [Optimize baking](GPUProgressiveLightmapper)
* [Introduction to lightmap UVs](LightingGiUvs)
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Learn about the properties and behavior of HDRP Shader Graph contexts and master
|[StackLit Master Stack reference](stacklit-master-stack-reference.md)|Properties and options in the StackLit master stack.|
|[Canvas Master Stack reference](canvas-master-stack-reference.md)|Properties and options in the Canvas master stack.|
|[Fog Volume Master Stack reference](fog-volume-master-stack-reference.md)|Properties and options in the Fog Volume master stack.|
|[Six Way Master Stack reference](six-way-master-stack-reference.md)|Properties and options in the Six Way master stack.|

## Additional resources

- [Shader graph](https://docs.unity3d.com/Packages/com.unity.shadergraph@latest?subfolder=/manual/index.html)
- [Shader graph](https://docs.unity3d.com/Packages/com.unity.shadergraph@latest?subfolder=/manual/index.html)
Loading