Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
870ac31
[Port] [6000.0] Fix UUM-125596 AcesTonemap() half precision bug
svc-reach-platform-support Dec 15, 2025
180c613
[Port] [6000.0] DOCG-8164 Clarify Shader Graph Fraction node
svc-reach-platform-support Dec 15, 2025
325aeea
[Port] [6000.0] Fix BRG,GRD and EG on 16KiB cbuffer limited low end m…
svc-reach-platform-support Dec 15, 2025
592193f
[Port] [6000.0] Graph Settings tab ref page update in Shader Graph docs
svc-reach-platform-support Dec 15, 2025
45092c3
[Port] [6000.0] Fixing Shader Graph Nodes Documentations Links
FredMoreau Dec 16, 2025
fc24951
[Port] [6000.0] Added a new method to change Global Settings in Player
svc-reach-platform-support Dec 16, 2025
fadd67a
[Port] [6000.0] Manual backport: fix the FD issue by avoiding pooling…
YohannVaastUnity Dec 16, 2025
ef7f44f
[Port] [6000.0] Add missing DEBUG_DISPLAY check to MixFogColor
svc-reach-platform-support Dec 16, 2025
3a01d21
[Port] [6000.0] [Shader Graph] Fix for UUM-114439
FredMoreau Dec 18, 2025
6dbe435
[Port] [6000.0] Fixed ClearDispatchIndirect being passed incorrect gr…
svc-reach-platform-support Dec 18, 2025
1949990
[Port] [6000.0] Shader Graph documentation bugfixes Dec 2025
markg-unity Dec 19, 2025
6d59ace
[6.0][RP Core & URP] Expose context internals for GTF9 test project s…
theo-at-unity Dec 19, 2025
84c46f5
[6.0] Introduce local.gtf.references shim
theo-at-unity Dec 19, 2025
5d5e194
[Port] [6000.0] [Shader Graph] Toolbar Icons Fixes
svc-reach-platform-support Dec 24, 2025
5be8b2e
[Port] [6000.0] Removed old DebugLevel field from URP asset
kirill-titov-u Jan 2, 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 @@ -2,3 +2,4 @@

[assembly: InternalsVisibleTo("Unity.RenderPipelines.Core.Editor")]
[assembly: InternalsVisibleTo("Unity.RenderPipelines.Core.Editor.Tests")]
[assembly: InternalsVisibleTo("UnityEngine.TestTools.Graphics.Contexts")]
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ internal static bool IsGPUResidentDrawerSupportedBySRP(GPUResidentDrawerSettings
message = Strings.allowInEditModeDisabled;
return false;
}

// Disable GRD in any external AssetImporter child process. GRD isn't made for AssetImporter workflow/lifetime
// Avoid memory leak warning messages and also some future issues (UUM-90039)
if (AssetDatabase.IsAssetImportWorkerProcess())
return false;
#endif
// If we are forcing the system, no need to perform further checks
if (IsForcedOnViaCommandLine())
if (IsForcedOnViaCommandLine() || MaintainContext)
return true;

if (GraphicsSettings.currentRenderPipeline is not IGPUResidentRenderPipeline asset)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public static void UpdateInstanceOccluders(RenderGraph renderGraph, in OccluderP
public static void ReinitializeIfNeeded()
{
#if UNITY_EDITOR
if (!IsForcedOnViaCommandLine() && (IsProjectSupported() != IsEnabled()))
if (!IsForcedOnViaCommandLine() && !MaintainContext && (IsProjectSupported() != IsEnabled()))
{
Reinitialize();
}
Expand Down Expand Up @@ -247,7 +247,7 @@ internal static GPUResidentDrawerSettings GetGlobalSettingsFromRPAsset()
/// Is GRD forced on via the command line via -force-gpuresidentdrawer. Editor only.
/// </summary>
/// <returns>true if forced on</returns>
private static bool IsForcedOnViaCommandLine()
internal static bool IsForcedOnViaCommandLine()
{
#if UNITY_EDITOR
return s_IsForcedOnViaCommandLine;
Expand All @@ -260,7 +260,7 @@ private static bool IsForcedOnViaCommandLine()
/// Is occlusion culling forced on via the command line via -force-gpuocclusion. Editor only.
/// </summary>
/// <returns>true if forced on</returns>
private static bool IsOcclusionForcedOnViaCommandLine()
internal static bool IsOcclusionForcedOnViaCommandLine()
{
#if UNITY_EDITOR
return s_IsOcclusionForcedOnViaCommandLine;
Expand All @@ -269,6 +269,10 @@ private static bool IsOcclusionForcedOnViaCommandLine()
#endif
}

internal static bool MaintainContext { get; set; } = false;

internal static bool ForceOcclusion { get; set; } = false;

internal static void Reinitialize()
{
var settings = GetGlobalSettingsFromRPAsset();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public class InternalRenderGraphContext
internal RenderGraphDefaultResources defaultResources;
internal RenderGraphPass executingPass;
internal bool contextlessTesting;
internal bool forceResourceCreation;
}

// This whole thing is a bit of a mess InternalRenderGraphContext is public (but all members are internal)
Expand Down Expand Up @@ -1186,6 +1187,15 @@ public void BeginRecording(in RenderGraphParameters parameters)
m_RenderGraphContext.renderGraphPool = m_RenderGraphPool;
m_RenderGraphContext.defaultResources = m_DefaultResources;

// With the actual implementation of the Frame Debugger, we cannot re-use resources during the same frame
// or it breaks the rendering of the pass preview, since the FD copies the texture after the execution of the RG.
m_RenderGraphContext.forceResourceCreation =
#if UNITY_EDITOR || DEVELOPMENT_BUILD
FrameDebugger.enabled;
#else
false;
#endif

if (m_DebugParameters.immediateMode)
{
UpdateCurrentCompiledGraph(graphHash: -1, forceNoCaching: true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ internal bool CreatePooledResource(InternalRenderGraphContext rgContext, int typ
var resource = m_RenderGraphResources[type].resourceArray[index];
if (!resource.imported)
{
resource.CreatePooledGraphicsResource();
resource.CreatePooledGraphicsResource(rgContext.forceResourceCreation);

if (m_RenderGraphDebug.enableLogging)
resource.LogCreation(m_FrameInformationLogger);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public virtual bool NeedsFallBack()
return requestFallBack && writeCount == 0;
}

public virtual void CreatePooledGraphicsResource() { }
public virtual void CreatePooledGraphicsResource(bool forceResourceCreation) { }
public virtual void CreateGraphicsResource() { }
public virtual void UpdateGraphicsResource() { }
public virtual void ReleasePooledGraphicsResource(int frameIndex) { }
Expand Down Expand Up @@ -236,7 +236,7 @@ public override void ReleaseGraphicsResource()
graphicsResource = null;
}

public override void CreatePooledGraphicsResource()
public override void CreatePooledGraphicsResource(bool forceResourceCreation)
{
Debug.Assert(m_Pool != null, "RenderGraphResource: CreatePooledGraphicsResource should only be called for regular pooled resources");

Expand All @@ -247,7 +247,7 @@ public override void CreatePooledGraphicsResource()

// If the pool doesn't have any available resource that we can use, we will create one
// In any case, we will update the graphicsResource name based on the RenderGraph resource name
if (!m_Pool.TryGetResource(hashCode, out graphicsResource))
if (forceResourceCreation || !m_Pool.TryGetResource(hashCode, out graphicsResource))
{
CreateGraphicsResource();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static bool activatedFromCommandLine
/// <summary>
/// Used by render pipelines to initialize XR tests.
/// </summary>
public static bool enabled { get; } = activatedFromCommandLine;
public static bool enabled { get; set; } = activatedFromCommandLine;

/// <summary>
/// Set by automated test framework and read by render pipelines.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ float3 AcesTonemap(float3 aces)

// --- Red modifier --- //
half hue = rgb_2_hue(half3(aces));
half centeredHue = center_hue(hue, RRT_RED_HUE);
float centeredHue = center_hue(hue, RRT_RED_HUE); // UUM-125596 Must be float for subsequent calculations
float hueWeight;
{
//hueWeight = cubic_basis_shaper(centeredHue, RRT_RED_WIDTH);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ void SetupDOTSInstanceSelectMasks() {}

#ifdef UNITY_DOTS_INSTANCING_UNIFORM_BUFFER
CBUFFER_START(unity_DOTSInstancing_IndirectInstanceVisibility)
float4 unity_DOTSInstancing_IndirectInstanceVisibilityRaw[4096];
float4 unity_DOTSInstancing_IndirectInstanceVisibilityRaw[1024];
CBUFFER_END
#else
ByteAddressBuffer unity_DOTSInstancing_IndirectInstanceVisibility;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ public CustomColorBufferNode()
UpdateNodeAfterDeserialization();
}

public override string documentationURL => NodeUtils.GetDocumentationString("HD-Custom-Color");

const int kUvInputSlotId = 0;
const string kUvInputSlotName = "UV";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public EmissionNode()
UpdateNodeAfterDeserialization();
}

public override string documentationURL => Documentation.GetPageLink("SGNode-Emission");
public override string documentationURL => NodeUtils.GetDocumentationString("Emission");

[SerializeField]
EmissiveIntensityUnit _intensityUnit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public ExposureNode()
UpdateNodeAfterDeserialization();
}

public override string documentationURL => Documentation.GetPageLink("SGNode-Exposure");

[SerializeField]
ExposureType m_ExposureType;
[EnumControl("Type")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ class HDFresnelEquationNode : AbstractMaterialNode

const string kFresnelOutputSlotName = "Fresnel";

public override string documentationURL => Documentation.GetPageLink("Fresnel-Equation-Node");

private enum FresnelSlots
{
kDotVectorsInputSlotId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ public SurfaceGradientResolveNormal()
UpdateNodeAfterDeserialization();
}

public override string documentationURL => Documentation.GetPageLink("SurfaceGradientResolveNormal");

const int kNormalInputSlotId = 0;
const string kNormalInputSlotName = "Normal";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ static void BuildDispatchIndirectArguments(BuildGPULightListPassData data, bool

// clear dispatch indirect buffer
cmd.SetComputeBufferParam(data.clearDispatchIndirectShader, s_ClearDispatchIndirectKernel, HDShaderIDs.g_DispatchIndirectBuffer, data.output.dispatchIndirectBuffer);
cmd.DispatchCompute(data.clearDispatchIndirectShader, s_ClearDispatchIndirectKernel, 1, 1, 1);
cmd.DispatchCompute(data.clearDispatchIndirectShader, s_ClearDispatchIndirectKernel, HDUtils.DivRoundUp(LightDefinitions.s_NumFeatureVariants, k_ThreadGroupOptimalSize), 1, data.viewCount);

// add tiles to indirect buffer
cmd.SetComputeBufferParam(data.buildDispatchIndirectShader, s_BuildIndirectKernel, HDShaderIDs.g_DispatchIndirectBuffer, data.output.dispatchIndirectBuffer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public partial class HDRenderPipelineAsset : RenderPipelineAsset<HDRenderPipelin
/// <inheritdoc/>
public override string renderPipelineShaderTag => HDRenderPipeline.k_ShaderTagName;

/// <inheritdoc/>
protected override bool requiresCompatibleRenderPipelineGlobalSettings => true;

[System.NonSerialized]
internal bool isInOnValidateCall = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ public BufferType bufferType
}
}

public override string documentationURL => Documentation.GetPageLink(Documentation.packageName, "SGNode-Universal-Sample-Buffer");

public UniversalSampleBufferNode()
{
name = "URP Sample Buffer";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ internal class SerializedUniversalRenderPipelineAsset
public SerializedProperty mixedLightingSupportedProp { get; }
public SerializedProperty useRenderingLayers { get; }
public SerializedProperty supportsLightCookies { get; }
public SerializedProperty debugLevelProp { get; }

public SerializedProperty volumeFrameworkUpdateModeProp { get; }
public SerializedProperty volumeProfileProp { get; }
Expand Down Expand Up @@ -163,7 +162,6 @@ public SerializedUniversalRenderPipelineAsset(SerializedObject serializedObject)
mixedLightingSupportedProp = serializedObject.FindProperty("m_MixedLightingSupported");
useRenderingLayers = serializedObject.FindProperty("m_SupportsLightLayers");
supportsLightCookies = serializedObject.FindProperty("m_SupportsLightCookies");
debugLevelProp = serializedObject.FindProperty("m_DebugLevel");

volumeFrameworkUpdateModeProp = serializedObject.FindProperty("m_VolumeFrameworkUpdateMode");
volumeProfileProp = serializedObject.FindProperty("m_VolumeProfile");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ static void DrawRenderingAdditional(SerializedUniversalRenderPipelineAsset seria
{
EditorGUILayout.PropertyField(serialized.srpBatcher, Styles.srpBatcher);
EditorGUILayout.PropertyField(serialized.supportsDynamicBatching, Styles.dynamicBatching);
EditorGUILayout.PropertyField(serialized.debugLevelProp, Styles.debugLevel);
EditorGUILayout.PropertyField(serialized.storeActionsOptimizationProperty, Styles.storeActionsOptimizationText);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ internal static class Styles
public static GUIContent srpBatcher = EditorGUIUtility.TrTextContent("SRP Batcher", "If enabled, the render pipeline uses the SRP batcher.");
public static GUIContent storeActionsOptimizationText = EditorGUIUtility.TrTextContent("Store Actions", "Sets the store actions policy on tile based GPUs. Affects render targets memory usage and will impact performance.");
public static GUIContent dynamicBatching = EditorGUIUtility.TrTextContent("Dynamic Batching", "If enabled, the render pipeline will batch drawcalls with few triangles together by copying their vertex buffers into a shared buffer on a per-frame basis.");
public static GUIContent debugLevel = EditorGUIUtility.TrTextContent("Debug Level", "Controls the level of debug information generated by the render pipeline. When Profiling is selected, the pipeline provides detailed profiling tags.");

// Quality
public static GUIContent hdrText = EditorGUIUtility.TrTextContent("HDR", "Controls the global HDR settings.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1620,6 +1620,9 @@ public int numIterationsEnclosingSphere
/// <inheritdoc/>
public override string renderPipelineShaderTag => UniversalRenderPipeline.k_ShaderTagName;

/// <inheritdoc/>
protected override bool requiresCompatibleRenderPipelineGlobalSettings => true;

/// <summary>Names used for display of rendering layer masks.</summary>
[Obsolete("This property is obsolete. Use RenderingLayerMask API and Tags & Layers project settings instead. #from(23.3)", false)]
public override string[] renderingLayerMaskNames => RenderingLayerMask.GetDefinedRenderingLayerNames();
Expand Down Expand Up @@ -1673,10 +1676,10 @@ static class Strings
}

/// <inheritdoc/>
public bool IsGPUResidentDrawerSupportedBySRP(out string message, out LogType severty)
public bool IsGPUResidentDrawerSupportedBySRP(out string message, out LogType severity)
{
message = string.Empty;
severty = LogType.Warning;
severity = LogType.Warning;

// if any of the renderers are not set to Forward+ return false
foreach (var rendererData in m_RendererDataList)
Expand Down Expand Up @@ -1968,5 +1971,6 @@ public bool isStpUsed
{
get { return m_UpscalingFilter == UpscalingFilterSelection.STP; }
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static bool activatedFromCommandLine
/// <summary>
/// Used by render pipelines to initialize RenderGraph tests.
/// </summary>
public static bool enabled { get; } = activatedFromCommandLine;
public static bool enabled { get; set; } = activatedFromCommandLine;

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,12 @@ float ComputeFogIntensity(float fogFactor)
half3 MixFogColor(half3 fragColor, half3 fogColor, half fogFactor)
{
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
if (IsFogEnabled())
{
half fogIntensity = ComputeFogIntensity(fogFactor);
// Workaround for UUM-61728: using a manual lerp to avoid rendering artifacts on some GPUs when Vulkan is used
fragColor = fragColor * fogIntensity + fogColor * (half(1.0) - fogIntensity);
}
#endif
return fragColor;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Custom Color Node (HDRP)
# Custom Color Buffer Node (HDRP)

The Custom Color Node accesses the custom pass color buffer allocated by HDRP.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Access properties and data of custom render textures, including size, slice inde

| **Topic** | **Description** |
|--------------------------------------------------------|----------------------------------------------------------------|
| [Custom Render Texture Slice](Custom-Texture-Slice.md) | Access the custom render texture slice index and cubemap face. |
| [Custom Render Texture Size](Custom-Texture-Size.md) | Access the custom render texture size. |
| [Custom Render Texture Self](Custom-Texture-Self.md) | Access the custom render texture from the previous update. |
| [Custom Render Texture Self](Custom-Render-Texture-Self-Node.md) | Access the custom render texture from the previous update. |
| [Custom Render Texture Size](Custom-Render-Texture-Size-Node.md) | Access the custom render texture size. |
| [Slice Index / Cubemap Face](Slice-Index-Cubemap-Face-Node.md) | Access the custom render texture slice index and cubemap face. |

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sub Graph Dropdown node
# Dropdown node

The Sub Graph Dropdown node is a node representation of a Dropdown property. It allows you to create a custom dropdown menu on a Sub Graph node in its parent Shader Graph. You can specify the number of options that appear in the dropdown menu, and their names.
The Dropdown node is a node representation of a Dropdown property. It allows you to create a custom dropdown menu on a Subgraph node in its parent Shader Graph. You can specify the number of options that appear in the dropdown menu, and their names.

After you create a Dropdown property and add a Dropdown node to a Subgraph, the Subgraph node in any parent Shader Graph displays with a dropdown control.

Expand Down
12 changes: 9 additions & 3 deletions Packages/com.unity.shadergraph/Documentation~/Fraction-Node.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Fraction Node
# Fraction node

## Description
The Fraction node returns the fractional part of an input, also known as the decimal part. The range is 0 to 1. For example, the fractional part of 3.75 is 0.75.

Returns the fractional (or decimal) part of input **In**; which is greater than or equal to 0 and less than 1.
The Fraction node calculates the result using the following formula:

```
fractional_part = input - floor(input)
```

As a result, the node returns a positive value if you input a negative number. For example, the fractional part of -3.75 is 0.25.

## Ports

Expand Down
Loading