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
72ce073
[Port] [6000.3] Revert fix for performance regression caused by incor…
svc-reach-platform-support Jan 7, 2026
19a70ab
[Port] [6000.3] [Render Graph Viewer] Gather Debug data and properly …
svc-reach-platform-support Jan 7, 2026
dae1d97
[Port] [6000.3] docg-7366: Fix links
svc-reach-platform-support Jan 8, 2026
a080ac0
[Port] [6000.3] DOCG-8269 Remove typo in HDRP Fog Volume docs
svc-reach-platform-support Jan 9, 2026
c3563b9
[Port] [6000.3] Fix Frame Debugger disconnecting when Render Graph Vi…
svc-reach-platform-support Jan 9, 2026
d7b24e9
[Port] [6000.3] Fix issue with depth priming where intermediate textu…
svc-reach-platform-support Jan 11, 2026
e213167
[Port] [6000.3] UUM-129941 : Fix incorrect APV baking when using samp…
olivierprat Jan 11, 2026
44192ea
[Port] [6000.3] Refactor the Shader Graph doc section about Custom Li…
svc-reach-platform-support Jan 13, 2026
92ef7b3
[6.3] Move SRP GPU jobs to Azure A10s
theo-at-unity Jan 13, 2026
c493712
[Port] [6000.3] [UUM-129871] Fix performance regression and insuffici…
svc-reach-platform-support Jan 13, 2026
22b3512
[Port] [6000.3] [UUM-131589] Prevent subgraph node starting drag on d…
svc-reach-platform-support Jan 14, 2026
56990ba
[Port] [6000.3] [VFX] Fix leak of new Mesh with BakeSDF API
svc-reach-platform-support Jan 20, 2026
12e21ca
[Port] [6000.3] Fixed precision for shadows over large distances
svc-reach-platform-support Jan 20, 2026
2fa1f62
[Port] [6000.3] [UUM-128839] Fix point light shadow artifact when sof…
svc-reach-platform-support Jan 21, 2026
d6be21c
Disable unstable Materials tests
AngelaDematte Jan 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 @@ -306,13 +306,13 @@ public BakingBatch(Vector3Int cellCount, ProbeReferenceVolume refVolume)
maxBrickCount = cellCount * ProbeReferenceVolume.CellSize(refVolume.GetMaxSubdivision());
inverseScale = ProbeBrickPool.kBrickCellCount / refVolume.MinBrickSize();
offset = refVolume.ProbeOffset();

// Initialize NativeHashMaps with reasonable initial capacity
// Using a larger capacity to reduce allocations during baking
positionToIndex = new NativeHashMap<int, int>(100000, Allocator.Persistent);
uniqueBrickSubdiv = new NativeHashMap<int, int>(100000, Allocator.Persistent);
}

public void Dispose()
{
if (positionToIndex.IsCreated)
Expand Down Expand Up @@ -1098,7 +1098,7 @@ static void BakeDelegate(ref float progress, ref bool done)
{
FixSeams(
s_BakeData.positionRemap,
s_BakeData.originalPositions,
s_BakeData.sortedPositions,
s_BakeData.lightingJob.irradiance,
s_BakeData.lightingJob.validity,
s_BakeData.lightingJob.occlusion,
Expand Down Expand Up @@ -1323,7 +1323,7 @@ internal static void FixSeams(
NativeArray<Vector4> skyOcclusion,
NativeArray<uint> renderingLayerMasks)
{
// Seams are caused are caused by probes on the boundary between two subdivision levels
// Seams are caused by probes on the boundary between two subdivision levels
// The idea is to find first them and do a kind of dilation to smooth the values on the boundary
// the dilation process consits in doing a trilinear sample of the higher subdivision brick and override the lower subdiv with that
// We have to mark the probes on the boundary as valid otherwise leak reduction at runtime will interfere with this method
Expand Down Expand Up @@ -1443,7 +1443,8 @@ Vector3Int GetCellPositionFromVoxel(Vector3Int voxelToLookup, int cellSizeInBric
{
uint renderingLayerMask = renderingLayerMasks[positionRemap[index]];
bool commonRenderingLayer = (renderingLayerMask & probeRenderingLayerMask) != 0;
if (!commonRenderingLayer) continue; // We do not use this probe contribution if it does not share at least a common rendering layer
if (!commonRenderingLayer)
continue; // We do not use this probe contribution if it does not share at least a common rendering layer
}

// Do the lerp in compressed format to match result on GPU
Expand Down Expand Up @@ -1512,7 +1513,7 @@ static void ApplyPostBakeOperations()
var chunkSizeInProbes = ProbeBrickPool.GetChunkSizeInProbeCount();
var hasVirtualOffsets = m_BakingSet.settings.virtualOffsetSettings.useVirtualOffset;
var hasRenderingLayers = m_BakingSet.useRenderingLayers;

if (!ValidateBakingCellsSize(bakingCellsArray, chunkSizeInProbes, hasVirtualOffsets, hasRenderingLayers))
return; // Early exit if validation fails

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ public PlayerConnection(IConnectionState connectionState, UnityEngine.Events.Uni
EditorConnection.instance.Initialize();
EditorConnection.instance.RegisterConnection(m_OnPlayerConnected);
EditorConnection.instance.RegisterDisconnection(m_OnPlayerDisconnected);

EditorApplication.quitting += OnEditorQuitting;
}

public void Dispose()
Expand All @@ -35,27 +33,15 @@ public void Dispose()
EditorConnection.instance.UnregisterConnection(m_OnPlayerConnected);
EditorConnection.instance.UnregisterDisconnection(m_OnPlayerDisconnected);

// NOTE: There is a bug where editor crashes if we call DisconnectAll during shutdown flow. In this case
// it's fine to skip the disconnect as the player will get notified of it anyway.
if (!m_EditorQuitting)
EditorConnection.instance.DisconnectAll();

m_ConnectionState.Dispose();
m_ConnectionState = null;

EditorApplication.quitting -= OnEditorQuitting;
}
}

public void OnConnectionDropdownIMGUI()
{
PlayerConnectionGUILayout.ConnectionTargetSelectionDropdown(m_ConnectionState, EditorStyles.toolbarDropDown, 250);
}

void OnEditorQuitting()
{
m_EditorQuitting = true;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ void SetSelectedExecutionIndex(int executionIndex)
if (m_SelectedExecutionIndex != executionIndex)
{
m_SelectedExecutionIndex = executionIndex;
UpdateCurrentDebugData();
UpdateCurrentDebugData(true);
}

// Using a custom toolbar menu instead of default Dropdown in order to get access to allowDuplicateNames,
Expand Down Expand Up @@ -2032,7 +2032,7 @@ void UpdateStatusLabel()

string connectionStatus = m_IsDeviceConnected ? "Online" : "Offline";

bool isEditor = m_ConnectedDeviceName == "Editor";
bool isEditor = m_ConnectedDeviceName == k_EditorName;
string sourceLabel = isEditor ? "Source: Editor" : $"Source: {m_ConnectedDeviceName} ({connectionStatus})";

bool hasCapture = HasValidDebugData && m_LastDataCaptureTime != DateTime.MinValue;
Expand All @@ -2052,7 +2052,8 @@ void UpdateCurrentDebugData(bool force = false)
{
m_CurrentDebugData = RenderGraphDebugSession.GetDebugData(m_SelectedRenderGraph, selectedExecutionItem.id);

if (HasValidDebugData)
// Update timestamp when we get valid data, or when forcing an update
if (HasValidDebugData || force)
m_LastDataCaptureTime = DateTime.Now;
}
else
Expand All @@ -2066,6 +2067,8 @@ void UpdateCurrentDebugData(bool force = false)
currentGraphDropdown.style.display = DisplayStyle.None;
if (currentExecutionToolbarMenu != null)
currentExecutionToolbarMenu.style.display = DisplayStyle.None;

m_LastDataCaptureTime = DateTime.MinValue;
}

UpdateStatusLabel();
Expand Down Expand Up @@ -2170,6 +2173,7 @@ void OnPlayerConnected(int playerID)
void OnPlayerDisconnected(int playerID)
{
m_IsDeviceConnected = false;
m_ConnectedDeviceName = k_EditorName;

if (!m_Paused)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,27 @@ public static void EndSession()
}
}

public static List<string> GetRegisteredGraphs() => s_CurrentDebugSession.debugDataContainer.GetRenderGraphs();
public static List<string> s_EmptyRegisteredGraphs = new();
public static List<string> GetRegisteredGraphs()
{
if (s_CurrentDebugSession == null || s_CurrentDebugSession.debugDataContainer == null)
{
return s_EmptyRegisteredGraphs;
}

return s_CurrentDebugSession.debugDataContainer.GetRenderGraphs();
}

public static List<DebugExecutionItem> GetExecutions(string graphName) => s_CurrentDebugSession.debugDataContainer.GetExecutions(graphName);
public static List<DebugExecutionItem> s_EmptyExecutions = new();
public static List<DebugExecutionItem> GetExecutions(string graphName)
{
if (s_CurrentDebugSession == null || s_CurrentDebugSession.debugDataContainer == null)
{
return s_EmptyExecutions;
}

return s_CurrentDebugSession.debugDataContainer.GetExecutions(graphName);
}

public static DebugData GetDebugData(string renderGraph, EntityId executionId)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ real ConvertLuminanceToEv(real luminance)

// Non physically based hack to limit light influence to attenuationRadius.
// Square the result to smoothen the function.
real DistanceWindowing(real distSquare, real rangeAttenuationScale, real rangeAttenuationBias)
real DistanceWindowing(float distSquare, real rangeAttenuationScale, real rangeAttenuationBias)
{
// If (range attenuation is enabled)
// rangeAttenuationScale = 1 / r^2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void SampleShadow_GetTexelWeights_Tent_7x7(real offset, out real4 texelsWeightsA
}

// 3x3 Tent filter (45 degree sloped triangles in U and V)
void SampleShadow_ComputeSamples_Tent_3x3(real4 shadowMapTexture_TexelSize, real2 coord, out real fetchesWeights[4], out real2 fetchesUV[4])
void SampleShadow_ComputeSamples_Tent_3x3(real4 shadowMapTexture_TexelSize, float2 coord, out real fetchesWeights[4], out real2 fetchesUV[4])
{
// tent base is 3x3 base thus covering from 9 to 12 texels, thus we need 4 bilinear PCF fetches
real2 tentCenterInTexelSpace = coord.xy * shadowMapTexture_TexelSize.zw;
Expand Down Expand Up @@ -186,7 +186,7 @@ void SampleShadow_ComputeSamples_Tent_3x3(real4 shadowMapTexture_TexelSize, real
(fetchesWeights)[8] = fetchesWeightsU.z * fetchesWeightsV.z; \
}

void SampleShadow_ComputeSamples_Tent_5x5(real4 shadowMapTexture_TexelSize, real2 coord, out real fetchesWeights[9], out real2 fetchesUV[9])
void SampleShadow_ComputeSamples_Tent_5x5(real4 shadowMapTexture_TexelSize, float2 coord, out real fetchesWeights[9], out real2 fetchesUV[9])
{
SampleShadow_ComputeSamples_Tent_Filter_5x5(real, shadowMapTexture_TexelSize, coord, fetchesWeights, fetchesUV);
}
Expand Down Expand Up @@ -254,7 +254,7 @@ void SampleShadow_ComputeSamples_Tent_5x5(real4 shadowMapTexture_TexelSize, real



void SampleShadow_ComputeSamples_Tent_7x7(real4 shadowMapTexture_TexelSize, real2 coord, out real fetchesWeights[16], out real2 fetchesUV[16])
void SampleShadow_ComputeSamples_Tent_7x7(real4 shadowMapTexture_TexelSize, float2 coord, out real fetchesWeights[16], out real2 fetchesUV[16])
{
SampleShadow_ComputeSamples_Tent_Filter_7x7(real, shadowMapTexture_TexelSize, coord, fetchesWeights, fetchesUV);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ These settings appear when you select the Fog’s material in the Asset window.
| **Fog Volume options** | | |
| | **Single Scattering Albedo** | Control the color of each fog particle. The fog’s density doesn’t affect this color. |
| | **Fog Distance** | Control how far you can see through the fog in meters. This controls how far the light passes through fog to affect how opaque it appears. A value of 0 makes the fog appear opaque. |
| | **Blend mode** | Determine how this fog shader blends with existing fog in the scene. This property overwrites the Blend mode you set in the Surface Options:<br />&#8226; **Overwrite:** Replaces existing fog in the volume area with this fog shader.Presented **content strategy** initiatives to leads in key team meetings.&#8226;**Additive:** Adds the color and density of this fog shader to other fog in the scene. This is the default value.<br /> **Multiply:** Multiplies the color and density of this fog shader with other fog in the scene. You can use this to create effects relative to a specific fog density.<br />&#8226; **Min:** Determines the minimum density value of this fog shader and the scene fog inside its bounding box. For example, a value of 0 appears to remove fog in a certain area.<br />&#8226; **Max:** Determines the maximum density value of this fog shader and the scene fog inside its bounding box. |
| | **Blend mode** | Determine how this fog shader blends with existing fog in the scene. This property overwrites the Blend mode you set in the Surface Options:<br />&#8226; **Overwrite:** Replaces existing fog in the volume area with this fog shader.<br/>&#8226;**Additive:** Adds the color and density of this fog shader to other fog in the scene. This is the default value.<br /> **Multiply:** Multiplies the color and density of this fog shader with other fog in the scene. You can use this to create effects relative to a specific fog density.<br />&#8226; **Min:** Determines the minimum density value of this fog shader and the scene fog inside its bounding box. For example, a value of 0 appears to remove fog in a certain area.<br />&#8226; **Max:** Determines the maximum density value of this fog shader and the scene fog inside its bounding box. |
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
Expand All @@ -17,7 +16,6 @@ internal class HDRPBuildData : IDisposable
public List<HDRenderPipelineAsset> renderPipelineAssets { get; private set; } = new List<HDRenderPipelineAsset>();
public bool playerNeedRaytracing { get; private set; }
public bool stripDebugVariants { get; private set; } = true;
public bool dynamicLightmapsUsed { get; private set; }
public bool waterDecalMaskAndCurrent { get; private set; }
public Dictionary<int, ComputeShader> rayTracingComputeShaderCache { get; private set; } = new();
public Dictionary<int, ComputeShader> computeShaderCache { get; private set; } = new();
Expand Down Expand Up @@ -71,43 +69,13 @@ public HDRPBuildData(BuildTarget buildTarget, bool isDevelopmentBuild)
m_Instance = this;
}

public void SetDynamicLightmapsUsedInBuildScenes()
{
dynamicLightmapsUsed = DynamicLightmapsUsedInBuildScenes();
}

static bool DynamicLightmapsUsedInBuildScenes()
{
var originalSetup = EditorSceneManager.GetSceneManagerSetup();

bool dynamicLightmapsUsed = false;
foreach (EditorBuildSettingsScene scene in EditorBuildSettings.scenes)
{
if (!scene.enabled) continue;

EditorSceneManager.OpenScene(scene.path, OpenSceneMode.Single);

if (Lightmapping.HasDynamicGILightmapTextures())
{
dynamicLightmapsUsed = true;
break;
}
}

if (originalSetup.Length > 0)
EditorSceneManager.RestoreSceneManagerSetup(originalSetup);

return dynamicLightmapsUsed;
}

public void Dispose()
{
renderPipelineAssets?.Clear();
rayTracingComputeShaderCache?.Clear();
computeShaderCache?.Clear();
playerNeedRaytracing = false;
stripDebugVariants = true;
dynamicLightmapsUsed = false;
waterDecalMaskAndCurrent = false;
buildingPlayerForHDRenderPipeline = false;
runtimeShaders = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ public void OnPreprocessBuild(BuildReport report)
bool isDevelopmentBuild = (report.summary.options & BuildOptions.Development) != 0;
m_BuildData = new HDRPBuildData(EditorUserBuildSettings.activeBuildTarget, isDevelopmentBuild);

// Since the HDRPBuildData instance is used in a lot of places, doing this check here ensures that it is done before the build starts.
m_BuildData.SetDynamicLightmapsUsedInBuildScenes();

if (m_BuildData.buildingPlayerForHDRenderPipeline)
{
// Now that we know that we are on HDRP we need to make sure everything is correct, otherwise we break the build.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
Expand Down Expand Up @@ -71,10 +70,8 @@ protected override bool DoShadersStripper(HDRenderPipelineAsset hdrpAsset, Shade
// Remove editor only pass
bool isSceneSelectionPass = snippet.passName == "SceneSelectionPass";
bool isScenePickingPass = snippet.passName == "ScenePickingPass";

bool isEnlightenSupported = SupportedRenderingFeatures.active.enlighten && ((int)SupportedRenderingFeatures.active.lightmapBakeTypes | (int)LightmapBakeType.Realtime) != 0;
bool metaPassUnused = (snippet.passName == "META") && (!isEnlightenSupported || !HDRPBuildData.instance.dynamicLightmapsUsed);

bool metaPassUnused = (snippet.passName == "META") && (SupportedRenderingFeatures.active.enlighten == false ||
((int)SupportedRenderingFeatures.active.lightmapBakeTypes | (int)LightmapBakeType.Realtime) == 0);
bool editorVisualization = inputData.shaderKeywordSet.IsEnabled(m_EditorVisualization);
if (isSceneSelectionPass || isScenePickingPass || metaPassUnused || editorVisualization)
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,12 @@ float4 EvaluateCookie_Punctual(LightLoopContext lightLoopContext, LightData ligh
return cookie;
}

real PunctualLightAttenuationWithDistanceModification(real4 distances, real rangeAttenuationScale, real rangeAttenuationBias,
real PunctualLightAttenuationWithDistanceModification(float4 distances, real rangeAttenuationScale, real rangeAttenuationBias,
real lightAngleScale, real lightAngleOffset)
{
real distSq = distances.y;
real distRcp = distances.z; //distance contains light size modification. See ModifyDistancesForFillLighting
real distProj = distances.w;
float distSq = distances.y;
float distRcp = distances.z; //distance contains light size modification. See ModifyDistancesForFillLighting
float distProj = distances.w;
real cosFwd = distProj * rcp(distances.x); //we recompute inv distance here

real attenuation = min(distRcp, 1.0 / PUNCTUAL_LIGHT_THRESHOLD);
Expand Down
Loading