Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
3e817bf
Upgrade Remaining ShaderGraph Projects to GTF v9
giorgospetkakis Aug 21, 2025
9da0282
Terrain/fix/playstation shadergraph issues
jonbro Aug 21, 2025
12dc25c
Fix Custom Function node ref page issues (user feedback)
sebastienduverne Aug 21, 2025
79c6fdc
DOCG-7257: Fix typo
ocarrere Aug 21, 2025
28ed9e6
DOCG-7262: Link to latest version of Manual docs
ocarrere Aug 21, 2025
536c718
DOCG-7358 Scene Color Node docs improvements
markg-unity Aug 21, 2025
8f3394a
[content automatically redacted] touching PlatformDependent folder
utjkaz Aug 21, 2025
80807a5
Proper workaround for changes to vector logic intrinsics in HLSL 2021
laylaarab Aug 22, 2025
46b1310
Fix infinite intensity bug
ApoorvaJ Aug 22, 2025
8b76aad
fix terrain sample asset
jonbro Aug 22, 2025
b58894a
Added the use of RenderingLayersTexture to the RenderGraph builder in…
nanho-lee Aug 22, 2025
d00981d
[6000.3][UUM-111385] Fix WebGL 2D with shadowed lighting
kennytann Aug 22, 2025
ce87e50
Fix Multiple errors occur when setting the Render Object Event to Aft…
Aug 22, 2025
ad9d59a
Render 3d as 2d v3 Code Cleanup
unity-cchu Aug 22, 2025
9750983
DOCG-7195 Update volumetric fog with light layers note
markg-unity Aug 22, 2025
92c56c2
[UUM-101919][6000.3][2D] Fix Light Batching Debugger UI constantly re…
kennytann Aug 25, 2025
8def3b6
[UUM-114242] Graphics/SRP/RenderGraph - Reduce version number of reso…
axoloto Aug 26, 2025
dce3de4
Regenerate broken meta file for RestirCandidateTemporal.urtshader
laylaarab Aug 26, 2025
d414b77
docg-7654: Remove text related to missing screenshot
ocarrere Aug 26, 2025
5d6768b
[Render Pipeline Converter] Refactor UI and converter state handling,…
alex-vazquez-unity3d Aug 26, 2025
ed3e01b
Fix obsolete API usage in when creating new URP Post-process Volume S…
arttu-peltonen Aug 26, 2025
132a2a0
Introducing IntermediateTestureMode.Never option for URP asset
RSlysz Aug 27, 2025
779e2fe
Graphics/uum 56935
Paulm-Unity Aug 27, 2025
6e72a1a
Port callbacks used for async APV baking
belgaard Aug 27, 2025
6ade65a
[WBTR] Fix player builds with SG Terrain materials
not-wyatt Aug 27, 2025
f1f0a94
DOCG-7369 Improve Object node docs
markg-unity Aug 27, 2025
77b50c5
DOCG-7288 port descript fix
Sam-Unity Aug 27, 2025
c8d4d18
Fix missing asset icon when creating certain assets in URP/HDRP
arttu-peltonen Aug 27, 2025
25e8ad9
Fix MaterialUpgraderTests instability
arttu-peltonen Aug 27, 2025
b62a4e4
Add missing IPostprocessBuildWithReport interface
arttu-peltonen Aug 27, 2025
dee0428
[Port] [6000.3] [6000.4][CI] Enable XR test compatibility for 2D CI
svc-reach-platform-support Sep 2, 2025
444d845
[Port] [6000.3] [SG]Fix for UUM-115058
svc-reach-platform-support Sep 2, 2025
4da2983
[Port] [6000.3] UUM-115123 - Disallow GPU Driven for MeshRenderers wh…
svc-reach-platform-support Sep 3, 2025
102049d
[Port] [6000.3] DOCG-7365 Shader Graph feedback improvements
svc-reach-platform-support Sep 3, 2025
83cddc0
[Port] [6000.3] Graphics/sg/terrain shadergraph UI fixes
svc-reach-platform-support Sep 3, 2025
2c96b7b
[Port] [6000.3] [UUM-115779] Fix artifacts caused by tiled deferred l…
svc-reach-platform-support Sep 3, 2025
cac5bb6
[Backport 6000.3] Add UITK Basic Template for Shader Graph.
ncerone-unity Sep 4, 2025
73b2485
[Port] [6000.3] Render Pipeline Converter - Small UI and UX fixes
svc-reach-platform-support Sep 4, 2025
0d45bf8
[Port] [6000.3] DOCG-7264: Remove screenshots from node landing page
ocarrere Sep 4, 2025
046c462
[Port] [6000.3] docg-7781: Fix typo
svc-reach-platform-support Sep 4, 2025
4fff30f
Disable unstable TerrainShadow tests in DXR project on all platforms
ericksson Sep 5, 2025
c0f0605
[Port] [6000.3] UUM-116018 : Fix GRDLightMaps test
svc-reach-platform-support Sep 5, 2025
02b882b
[Port] [6000.3] [UUM-115691] - Automatically Springs back to Local on…
svc-reach-platform-support Sep 8, 2025
4f6c796
6.3 URP - Improve Y-Flip detection for intermediate render passes whe…
robinb-u3d Sep 8, 2025
60c9e91
[Port] [6000.3] terrain shadergraph - fix default layermask color
svc-reach-platform-support Sep 9, 2025
dcbb6a9
[Port] [6000.3] VisualTreeAsset - Fix warnings button support for Tem…
svc-reach-platform-support Sep 9, 2025
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 @@ -37,6 +37,10 @@ internal class RenderGraphTestPipelineAsset : RenderPipelineAsset<RenderGraphTes

public RenderGraph renderGraph;

public RenderTextureUVOriginStrategy renderTextureUVOriginStrategy;

public bool invalidContextForTesting;

protected override RenderPipeline CreatePipeline()
{
return new RenderGraphTestPipelineInstance(this);
Expand Down Expand Up @@ -76,7 +80,8 @@ protected override void Render(ScriptableRenderContext renderContext, List<Camer
commandBuffer = cmd,
scriptableRenderContext = renderContext,
currentFrameIndex = Time.frameCount,
invalidContextForTesting = false
invalidContextForTesting = asset.invalidContextForTesting,
renderTextureUVOriginStrategy = asset.renderTextureUVOriginStrategy
};

try
Expand All @@ -99,10 +104,14 @@ protected override void Render(ScriptableRenderContext renderContext, List<Camer
return;
}

renderContext.ExecuteCommandBuffer(cmd);
if (rgParams.invalidContextForTesting == false)
{
renderContext.ExecuteCommandBuffer(cmd);
}

CommandBufferPool.Release(cmd);
}

renderContext.Submit();
}
}
Expand Down Expand Up @@ -175,6 +184,7 @@ public void Cleanup()
[TearDown]
public void CleanupRenderGraph()
{
m_RenderGraphTestPipeline.invalidContextForTesting = false;
// Cleaning all Render Graph resources and data structures
// Nothing remains, Render Graph in next test will start from scratch
m_RenderGraph.ForceCleanup();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,11 @@ void OnAutoPlayStatusChanged(ChangeEvent<bool> evt)
autoPlayToggle.text = evt.newValue ? L10n.Tr("Auto Update") : L10n.Tr("Pause");
m_Paused = evt.newValue;

if (!m_Paused && !m_IsDeviceConnected && m_ConnectedDeviceName != k_EditorName)
{
ConnectDebugSession<RenderGraphEditorLocalDebugSession>();
}

UpdateStatusLabel();

// Force update when unpausing
Expand Down Expand Up @@ -2100,7 +2105,7 @@ void CreateGUI()
else
{
m_ConnectedDeviceName = k_EditorName;
m_IsDeviceConnected = false;
m_IsDeviceConnected = true;
}

connectionState.Dispose(); // Dispose it immediately after use
Expand Down Expand Up @@ -2157,15 +2162,22 @@ void OnPlayerDisconnected(int playerID)
}
}

ConnectDebugSession<RenderGraphEditorLocalDebugSession>();
if (!m_Paused)
{
ConnectDebugSession<RenderGraphEditorLocalDebugSession>();
}
else
{
UpdateStatusLabel();
}
}

internal void ConnectDebugSession<TSession>()
where TSession : RenderGraphDebugSession, new()
{
if (typeof(TSession) == typeof(RenderGraphEditorLocalDebugSession))
{
if (!m_IsDeviceConnected)
if (m_ConnectedDeviceName == "Unknown" || m_ConnectedDeviceName == k_EditorName)
{
m_ConnectedDeviceName = k_EditorName;
m_IsDeviceConnected = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static void CreateVolumeProfile()
0,
ScriptableObject.CreateInstance<CreateVolumeProfileAction>(),
"New Volume Profile.asset",
null,
CoreUtils.GetIconForType<VolumeProfile>(),
null
);
}
Expand All @@ -40,7 +40,7 @@ public static void CreateVolumeProfileWithCallback(string fullPath, Action<Volum
assetCreator.GetInstanceID(),
assetCreator,
fullPath,
null,
CoreUtils.GetIconForType<VolumeProfile>(),
null);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ private static void AllowGPUDrivenRenderingRecursively(Transform transform, bool
private void OnValidate()
{
OnDisable();
OnEnable();
if (enabled)
OnEnable();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,19 @@ public void CullAllPasses(bool isCulled)
}
}

public TextureUVOrigin GetTextureUVOrigin(in TextureHandle targetHandle)
{
if (targetHandle.handle.IsValid())
{
ref readonly ResourceUnversionedData unversionedData = ref UnversionedResourceData(targetHandle.handle);
return unversionedData.textureUVOrigin == TextureUVOriginSelection.TopLeft ? TextureUVOrigin.TopLeft : TextureUVOrigin.BottomLeft;
}
else
{
return TextureUVOrigin.BottomLeft;
}
}

// Helper to loop over native passes
public ref struct NativePassIterator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ internal struct RenderGraphInputInfo
public string debugName;
public bool disablePassCulling;
public bool disablePassMerging;
public RenderTextureUVOriginStrategy renderTextureUVOriginStrategy;
}

internal RenderGraphInputInfo graph;
Expand Down Expand Up @@ -69,7 +70,7 @@ public void Cleanup()
}

public bool Initialize(RenderGraphResourceRegistry resources, List<RenderGraphPass> renderPasses, RenderGraphDebugParams debugParams, string debugName, bool useCompilationCaching,
int graphHash, int frameIndex)
int graphHash, int frameIndex, RenderTextureUVOriginStrategy renderTextureUVOriginStrategy)
{
bool cached = false;
if (!useCompilationCaching)
Expand All @@ -82,6 +83,7 @@ public bool Initialize(RenderGraphResourceRegistry resources, List<RenderGraphPa
graph.disablePassCulling = debugParams.disablePassCulling;
graph.disablePassMerging = debugParams.disablePassMerging;
graph.debugName = debugName;
graph.renderTextureUVOriginStrategy = renderTextureUVOriginStrategy;

Clear(clearContextData: !useCompilationCaching);

Expand Down Expand Up @@ -141,6 +143,9 @@ public void Compile(RenderGraphResourceRegistry resources)
DetectMemoryLessResources();

PrepareNativeRenderPasses();

if (graph.renderTextureUVOriginStrategy == RenderTextureUVOriginStrategy.PropagateAttachmentOrientation)
PropagateTextureUVOrigin();
}

public void Clear(bool clearContextData)
Expand All @@ -164,6 +169,7 @@ internal enum NativeCompilerProfileId
NRPRGComp_TryMergeNativePasses,
NRPRGComp_FindResourceUsageRanges,
NRPRGComp_DetectMemorylessResources,
NRPRGComp_PropagateTextureUVOrigin,
NRPRGComp_ExecuteInitializeResources,
NRPRGComp_ExecuteBeginRenderpassCommand,
NRPRGComp_ExecuteDestroyResources,
Expand All @@ -173,7 +179,7 @@ internal enum NativeCompilerProfileId
void ValidatePasses()
{
if (RenderGraph.enableValidityChecks)
{
{
int tilePropertiesPassIndex = -1;
for (int passId = 0; passId < graph.m_RenderPasses.Count; passId++)
{
Expand Down Expand Up @@ -468,8 +474,9 @@ void CullUnusedRenderPasses()
}

// Update graph based on freshly culled nodes, remove any connection to them
// We start from the latest passes to the first ones as we might need to decrement the version number of unwritten resources
var numPasses = ctx.passData.Length;
for (int passIndex = 0; passIndex < numPasses; passIndex++)
for (int passIndex = numPasses - 1; passIndex >= 0; passIndex--)
{
ref readonly var pass = ref ctx.passData.ElementAt(passIndex);

Expand Down Expand Up @@ -756,6 +763,62 @@ void PrepareNativeRenderPasses()
}
}

void PropagateTextureUVOrigin()
{
using (new ProfilingScope(ProfilingSampler.Get(NativeCompilerProfileId.NRPRGComp_PropagateTextureUVOrigin)))
{
// Work backwards through the native pass list and propagate the texture uv origin we store with to
// any texture attachments that are not explicitly known (usually intermediate memoryless attachments).
for (int passIdx = contextData.nativePassData.Length - 1; passIdx >= 0; --passIdx)
{
ref NativePassData nativePassData = ref contextData.nativePassData.ElementAt(passIdx);

// Find a texture attachment that is storing to find out the orientation for this pass.
int attachmentsCount = nativePassData.attachments.size;
int firstStoreAttachmentIndex = 0;
TextureUVOriginSelection storeUVOrigin = TextureUVOriginSelection.Unknown;
for (int attIdx = 0; attIdx < attachmentsCount; ++attIdx)
{
ref NativePassAttachment nativePassAttachment = ref nativePassData.attachments[attIdx];
if (nativePassAttachment.storeAction != RenderBufferStoreAction.DontCare)
{
if (nativePassAttachment.handle.type == RenderGraphResourceType.Texture) // Only textures have orientation
{
ref ResourceUnversionedData resData = ref contextData.UnversionedResourceData(nativePassAttachment.handle);
storeUVOrigin = resData.textureUVOrigin; // Inherit the orientation of the store if we are currently storing to an unknown orientation.
firstStoreAttachmentIndex = attIdx;
break;
}
}
}

// Update any texture attachments with an unknown uv origin to the one we are going to use for storing and validate
// we don't have a mixture of uv origins on the texture attachment list as this would mean something is going to be
// read/written upside down.
for (int attIdx = 0; attIdx < attachmentsCount; ++attIdx)
{
ref NativePassAttachment nativePassAttachment = ref nativePassData.attachments[attIdx];

if (nativePassAttachment.handle.type == RenderGraphResourceType.Texture)
{
ref ResourceUnversionedData resData = ref contextData.UnversionedResourceData(nativePassAttachment.handle);
if (storeUVOrigin != TextureUVOriginSelection.Unknown && resData.textureUVOrigin != TextureUVOriginSelection.Unknown && resData.textureUVOrigin != storeUVOrigin)
{
ref NativePassAttachment firstStoreNativePassAttachment = ref nativePassData.attachments[firstStoreAttachmentIndex];
var firstStoreAttachmentName = graph.m_ResourcesForDebugOnly.GetRenderGraphResourceName(firstStoreNativePassAttachment.handle);
var name = graph.m_ResourcesForDebugOnly.GetRenderGraphResourceName(nativePassAttachment.handle);

throw new InvalidOperationException($"From pass '{contextData.passNames[nativePassData.firstGraphPass]}' to pass '{contextData.passNames[nativePassData.lastGraphPass]}' when trying to store resource '{name}' of type {nativePassAttachment.handle.type} at index {nativePassAttachment.handle.index} - "
+ RenderGraph.RenderGraphExceptionMessages.IncompatibleTextureUVOriginStore(firstStoreAttachmentName, storeUVOrigin, name, resData.textureUVOrigin));
}

resData.textureUVOrigin = storeUVOrigin;
}
}
}
}
}

static bool IsGlobalTextureInPass(RenderGraphPass pass, ResourceHandle handle)
{
foreach (var g in pass.setGlobalsList)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ internal struct ResourceUnversionedData
public readonly bool discard; // graph.m_Resources.GetTextureResourceDesc(fragment.resource).discardBuffer;
public readonly bool bindMS;

public TextureUVOriginSelection textureUVOrigin;

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public string GetName(CompilerContextData ctx, ResourceHandle h) => ctx.GetResourceName(h);

public ResourceUnversionedData(IRenderGraphResource rll, ref RenderTargetInfo info, ref TextureDesc desc, bool isResourceShared)
public ResourceUnversionedData(TextureResource rll, ref RenderTargetInfo info, ref TextureDesc desc, bool isResourceShared)
{
isImported = rll.imported;
isShared = isResourceShared;
Expand All @@ -59,6 +61,7 @@ public ResourceUnversionedData(IRenderGraphResource rll, ref RenderTargetInfo in
clear = desc.clearBuffer;
discard = desc.discardBuffer;
bindMS = info.bindMS;
textureUVOrigin = rll.textureUVOrigin;
}

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;
textureUVOrigin = TextureUVOriginSelection.Unknown;
}

public ResourceUnversionedData(IRenderGraphResource rll, ref RayTracingAccelerationStructureDesc _, bool isResourceShared)
Expand All @@ -107,13 +111,15 @@ public ResourceUnversionedData(IRenderGraphResource rll, ref RayTracingAccelerat
clear = false;
discard = false;
bindMS = false;
textureUVOrigin = TextureUVOriginSelection.Unknown;
}

public void InitializeNullResource()
{
firstUsePassID = -1;
lastUsePassID = -1;
lastWritePassID = -1;
textureUVOrigin = TextureUVOriginSelection.Unknown;
}
}

Expand Down Expand Up @@ -276,11 +282,12 @@ public void Initialize(RenderGraphResourceRegistry resources)
{
case (int)RenderGraphResourceType.Texture:
{
var tex = rll as TextureResource;
resources.GetRenderTargetInfo(h, out var info);
ref var desc = ref (rll as TextureResource).desc;
ref var desc = ref tex.desc;
bool isResourceShared = resources.IsRenderGraphResourceShared(h);

unversionedData[t][r] = new ResourceUnversionedData(rll, ref info, ref desc, isResourceShared);
unversionedData[t][r] = new ResourceUnversionedData(tex, ref info, ref desc, isResourceShared);
break;
}
case (int)RenderGraphResourceType.Buffer:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal NativePassCompiler CompileNativeRenderGraph(int graphHash)
if (nativeCompiler == null)
nativeCompiler = new NativePassCompiler(m_CompilationCache);

bool compilationIsCached = nativeCompiler.Initialize(m_Resources, m_RenderPasses, m_DebugParameters, name, m_EnableCompilationCaching, graphHash, m_ExecutionCount);
bool compilationIsCached = nativeCompiler.Initialize(m_Resources, m_RenderPasses, m_DebugParameters, name, m_EnableCompilationCaching, graphHash, m_ExecutionCount, m_renderTextureUVOriginStrategy);
if (!compilationIsCached)
nativeCompiler.Compile(m_Resources);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ internal static string UseDepthWithColorFormat(GraphicsFormat colorFormat) =>
internal static string UseTransientTextureInWrongPass(int transientIndex) =>
$"This pass is using a transient resource from a different pass (pass index {transientIndex}). A transient resource should only be used in a single pass.";

internal static string IncompatibleTextureUVOrigin(TextureUVOriginSelection origin, string attachmentType, string attachmentName, RenderGraphResourceType attachmentResourceType, int attachmentResourceIndex, TextureUVOriginSelection attachmentOrigin) =>
$"TextureUVOrigin `{origin}` is not compatible with existing {attachmentType} attachment `{attachmentType}` of type `{attachmentResourceType}` at index `{attachmentResourceIndex}` with TextureUVOrigin `{attachmentOrigin}`";

internal static string IncompatibleTextureUVOriginUseTexture(TextureUVOriginSelection origin) =>
$"UseTexture() of a resource with `{origin}` is not compatible with Unity's standard UV origin for texture reading {TextureUVOrigin.BottomLeft}. Are you trying to UseTexture() on a backbuffer?";

// RenderGraphPass
internal const string k_MoreThanOneResourceForMRTIndex =
"You can only bind a single texture to a single index in a multiple render texture (MRT). Verify your indexes are correct.";
Expand Down Expand Up @@ -141,7 +147,7 @@ internal static string UseTransientTextureInWrongPass(int transientIndex) =>

internal const string k_AttachmentsDoNotMatch =
"Low level rendergraph error: Attachments in renderpass do not match.";

internal const string k_MultisampledShaderResolveInvalidAttachmentSetup =
"Low level rendergraph error: last subpass with shader resolve must have one color attachment.";

Expand All @@ -165,6 +171,9 @@ internal static string UsingLegacyRenderGraph(string passName) =>
" You cannot use legacy passes with the Native Render Pass Compiler." +
" The APIs that are compatible with the Native Render Pass Compiler are AddUnsafePass, AddComputePass and AddRasterRenderPass.";

internal static string IncompatibleTextureUVOriginStore(string firstAttachmentName, TextureUVOriginSelection firstAttachmentOrigin, string secondAttachmentName, TextureUVOriginSelection secondAttachmentOrigin) =>
$"Texture attachment {firstAttachmentName} with uv origin {firstAttachmentOrigin} does not match with texture attachment {secondAttachmentName} with uv origin {secondAttachmentOrigin}. Storing both would result in contents being flipped.";

internal static string GetExceptionMessage(RenderGraphState state)
{
string caller = GetHigherCaller();
Expand Down
Loading