Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3edbdc8
[Port] [6000.0] [UUM-141743][6000.6][URP 2D] Fix Light2D serializatio…
kennytann Jun 30, 2026
5610b60
[Port] [6000.0] DOCG-8707 Clarify render queue requirement for Scene …
svc-reach-platform-support Jun 30, 2026
8468621
[Port] [6000.0] [URP] [UUM-141980] Fix Bloom missing in Player when D…
Jul 3, 2026
684b27a
[Port] [6000.0] DOCG-8907 - Removed irrelevant paragraph from Shader …
svc-reach-platform-support Jul 3, 2026
3bf5394
[Port][6000.0][UUM-136214][URP 2D] Refresh light batching debugger on…
kennytann Jul 12, 2026
1d4d2bc
[Port] [6000.0] Updated units in shader graph node documentation
svc-reach-platform-support Jul 14, 2026
24ad7d9
[Port] [6000.0] Add backbuffer check to RenderObjectsPass for foveation
svc-reach-platform-support Jul 17, 2026
67adf2c
[Port] [6000.0] [HDRP][XR] Update ClearBuffer2D to support XR views
svc-reach-platform-support Jul 20, 2026
978c53d
[PORT][6000.0] docg-8934: implement pages fix titles mg
markg-unity Jul 22, 2026
5209d72
[Port] [6000.0] Fixed a typo in the HDRP Tessellation reference page
svc-reach-platform-support Jul 22, 2026
8dd774f
[Port] [6000.0] Fixed grammatical errors in HDRP Volumetric Clouds Vo…
svc-reach-platform-support Jul 22, 2026
c627df0
[6000.0] Green up Monitored HDRP: backport trunk test and CI fixes
CianNoonanUnity Jul 22, 2026
aa6cc89
[Port][6000.0]docg-8935: update attribute operator list and create ne…
marta-malberti Jul 29, 2026
5578484
[6000.0] Monitored URP: backport trunk fixes and baselines to green t…
CianNoonanUnity Aug 5, 2026
6e4bfd4
[Port] [6000.0] docg-8976: updating 4 missing attributes in attribute…
svc-reach-platform-support Aug 6, 2026
055aa70
[Port] [6000.0] DOCG-8641 Update HDRP runtime lights documentation
markg-unity Aug 11, 2026
886e7a3
[Port] [6000.0] Use SRP compatible Stereo rendering checks for mipmap…
dovydas-girskas-unity3d Aug 12, 2026
19dbc52
[Port] [6000.0] [STP] Fix TAA feedback artifacts on Vulkan (UUM-139455)
svc-reach-platform-support Aug 12, 2026
094e03f
[Port] [6000.0] docg-8933: Check subheading and create new landing pa…
svc-reach-platform-support Aug 12, 2026
d014f7c
[Port] [6000.0] docg-9082: Create reference and landing pages for 'ou…
svc-reach-platform-support Aug 21, 2026
06cc142
[Port] [6000.0] [VFX] Frustum culling using the wrong shader variable…
svc-reach-platform-support Aug 21, 2026
1bf3e7d
[Port] [6000.0] [XR] Fix lighting artifacts from renderViewportScale …
svc-reach-platform-support Aug 31, 2026
5c9c289
[Port] [6000.0] [docg-9066] Fix smoothstep keyboard shortcut in shade…
svc-reach-platform-support Sep 7, 2026
638fdfa
[Port] [6000.0] [UUM-151058] Disallow re-categorizing built-in attrib…
svc-reach-platform-support Sep 7, 2026
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
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions Packages/com.unity.render-pipelines.core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fixed
- Fixed a `variant DISABLE_TEXTURE2D_X_ARRAY not found` shader error when copying MSAA textures on OpenGL ES 3.1 drivers that lack per-sample shading (`gl_SampleID`); these devices now fall back to a regular blit instead.

Version Updated
The version number for this package has increased due to a version update of a related graphics package.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,8 @@
#define STP_TAA_Q 0
#endif

#if defined(SHADER_API_SWITCH) || defined(SHADER_API_SWITCH2)
#define STP_BUG_SAT_INF 1
#endif

// Enable workarounds that help us avoid issues on Metal
#if defined(SHADER_API_METAL)
// Relying on infinity behavior causes issues in the on-screen inline pass calculations
// We expect this option to be required on Metal because the shading language spec states that the fast-math
// option is on by default which disables support for proper INF handling.
#define STP_BUG_SAT_INF 1
#endif

#if defined(SHADER_API_PSSL)
// No guaranteed INF/NaN arithmetic on these platforms (fast-math by default)
#if defined(SHADER_API_VULKAN) || defined(SHADER_API_METAL) || defined(SHADER_API_SWITCH) || defined(SHADER_API_SWITCH2) || defined(SHADER_API_PSSL) || defined(SHADER_API_WEBGPU)
#define STP_BUG_SAT_INF 1
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,15 @@ internal static bool CanCopyMSAA()
return false;
}

// The MSAA pass fetches samples via SV_SampleIndex (gl_SampleID), which needs per-sample
// shading. On GLES that comes with the ES3.2/AEP tier; plain-ES3.1 drivers (e.g. RPi5/V3D,
// no GL_OES_sample_variables) ship the pass but reject it at load, and passCount only
// reflects build-target support. Scope to GLES so backends that support the non-array
// Texture2DMS + SV_SampleIndex path (e.g. WebGPU) keep the sample-preserving copy.
if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.OpenGLES3
&& !SystemInfo.supportsMultisampled2DArrayTextures)
return false;

// This test works since the second pass has the following pragmas and will not be compiled if they are not supported
// #pragma target 4.5
// #pragma require msaatex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1579,6 +1579,10 @@ public void IntraFrameMemoryAliasing_WhenEnabled_ResourcesCanBeReusedWithinSameF
int pass1ResourceID = default;
int pass2ResourceID = default;

// The compute passes below need UAV access to an RGBA8 texture (see TODO), which e.g. macOS OpenGLCore lacks.
if (!SystemInfo.IsFormatSupported(GraphicsFormat.R8G8B8A8_UNorm, GraphicsFormatUsage.LoadStore))
Assert.Ignore("Random-write access to R8G8B8A8_UNorm is not supported on this device.");

m_RenderGraphTestPipeline.recordRenderGraphBody = (context, camera, cmd) =>
{
// Enable intra-frame memory aliasing
Expand Down Expand Up @@ -1646,6 +1650,10 @@ public void IntraFrameMemoryAliasing_WhenDisabled_ResourcesCannotBeReusedWithinS
int pass1ResourceID = default;
int pass2ResourceID = default;

// The compute passes below need UAV access to an RGBA8 texture (see TODO in the WhenEnabled test), which e.g. macOS OpenGLCore lacks.
if (!SystemInfo.IsFormatSupported(GraphicsFormat.R8G8B8A8_UNorm, GraphicsFormatUsage.LoadStore))
Assert.Ignore("Random-write access to R8G8B8A8_UNorm is not supported on this device.");

m_RenderGraphTestPipeline.recordRenderGraphBody = (context, camera, cmd) =>
{
// Disable intra-frame memory aliasing
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ The following property is only available in Master Stacks. In the [Layered Lit T
- Motion vectors do not work correctly if the tessellation factor differs for vertices between two frames.

## Performance
- Enabling the Tessellation option have an extra GPU cost, even if the tessellationFactor is 0.0 or 1.0. It is recommened to have additional LOD with shader without tessellation enabled for good performance.
- Tessellation is an expensive GPU operation and it is often lest costly to pre-tessellate a mesh and doing vertex displacement than doing the tessellation process, but it have the benefit of being adapatative.
- Enabling the Tessellation option has an extra GPU cost, even if the tessellationFactor is 0.0 or 1.0. It is recommended to have additional LOD with shader without tessellation enabled for good performance.
- Tessellation is an expensive GPU operation and it is often less costly to pre-tessellate a mesh and do vertex displacement than to do the tessellation process, but it has the benefit of being adaptive.
Original file line number Diff line number Diff line change
Expand Up @@ -4,65 +4,66 @@ The High Definition Render Pipeline (HDRP) extends Unity's [Light](https://docs.

## Create a new light

HDRP provides a utility function that adds both the Light and HDAdditionalLightData components to a GameObject, and sets up its dependencies. The function is `AddHDLight` and it takes an [HDLightTypeAndShape](xref:UnityEngine.Rendering.HighDefinition.GameObjectExtension.AddHDLight(UnityEngine.GameObject,UnityEngine.Rendering.HighDefinition.HDLightTypeAndShape)) as a parameter which sets the Light's type and shape. The light unit for the intensity will be determined depending on the light type and shape. To learn more about light units and shapes, see the [Light documentation](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/manual/Light-Component.html).
HDRP provides a utility function that adds both the Light and HDAdditionalLightData components to a GameObject, and sets up its dependencies. The function is [`AddHDLight`](xref:UnityEngine.Rendering.HighDefinition.GameObjectExtension.AddHDLight*). The light unit for the intensity will be determined depending on the light type and shape. To learn more about light units and shapes, refer to [Create and configure light sources](Light-Component.md).

```cs
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;

public class LightScript : MonoBehaviour
{
void Start()
{
var light = gameObject.AddHDLight(HDLightTypeAndShape.ConeSpot);
var hdLight = gameObject.AddHDLight(LightType.Spot);
var lightComponent = hdLight.GetComponent<Light>();

// Setup light parameters here
}
}
```

There is also a [RemoveHDLight]((https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/api/UnityEngine.Rendering.HighDefinition.GameObjectExtension.html#UnityEngine_Rendering_HighDefinition_GameObjectExtension_AddHDLight_UnityEngine_GameObject_UnityEngine_Rendering_HighDefinition_HDLightTypeAndShape_)) method to remove the light created with AddHDLight.
There is also a [RemoveHDLight](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/api/UnityEngine.Rendering.HighDefinition.GameObjectExtension.html#UnityEngine_Rendering_HighDefinition_GameObjectExtension_RemoveHDLight_UnityEngine_GameObject_) method to remove the light created with AddHDLight.

Note: Another good way of spawning lights is simply by spawning prefabs of lights you configured in the editor, this is also more efficient than manually adding components and setting values.

## Edit an existing Light
## Change the intensity

HDRP does not use the data stored in the Light component. Instead it stores Light data in another component called `HDAdditionalLightData`. To access a property, use the `HDAdditionalLightData` component, even if the property is visible in the Light component Inspector.
Set the light intensity using the Light component. Follow these steps:

### Change the intensity and color
1. Set the units using the `lightUnit` property of the Light component. For example:

There are multiple ways of changing the intensity of a light by script. You can either use the **SetIntensity** or assign directly the intensity value but keep in mind that the value you set will use the current light unit of the light component.
```cs
lightComponent.lightUnit = LightUnit.Lumen;
```

Set light intensity in a specified unit:
1. Set the intensity using the `ConvertIntensity` method of the `LightUnitUtils` class, to convert to the correct unit for the light type and shape.

```cs
light.SetIntensity(5000, LightUnit.Lumen); // Intensity for a street lamp
```
For example:

Set light intensity using the current light unit:
```cs
LightUnit nativeUnit = LightUnitUtils.GetNativeLightUnit(lightComponent.type);
lightComponent.intensity = LightUnitUtils.ConvertIntensity(lightComponent, 600f, LightUnit.Lumen, nativeUnit);
```

```cs
light.intensity = 1200;
```
## Change the color

Set light color:
Set the light color using the HDAdditionalLightData component. For example:

```cs
light.color = Color.red;
hdLight.color = Color.red;
```

Set light color temperature in Kelvin:

```cs
light.SetColor(Color.white, 1900); // 1900K is the color of a candle
hdLight.SetColor(Color.white, 1900); // 1900K is the color of a candle
```

Note: when you set the color/intensity of the light, it also affects the emissive plane color of area lights if enabled.

## Animate lights

Light in HDRP can be animated like regular lights, though an important thing to note is that the values recorded in the animation are coming from both the HDAdditionalLightData component and Light component as you can see in the image below.

![Light-Animation-Example](Images/LightAnimationExample.png)
Light in HDRP can be animated like regular lights, though an important thing to note is that the values recorded in the animation are coming from both the HDAdditionalLightData component and Light component.

Also, animated lights have a slightly more expensive cost on the CPU because of the additional calculation that needs to be made when light values are changing.
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ Also, there is variations in the green and blue channels to specify more of less

![A rectangular texture with 8 bands of 32 pixels each. The first 3 bands are thin clouds at different heights. The next band is a tall fluffy cloud. The next 3 bands are clouds that get spottier at different heights. The final band is a curving vertical cloud. The edge at 96 pixels maps to the top-left of the sky, and the edge at 128 pixels maps to the center of the sky. The final image is a tower of layered cloud, with smaller clouds scattered nearby.)](Images/Volumetric-Clouds-manual-lut.png)

Here is an example cloud LUT that can be used in manual mode. On the top image, the LUT is divided into 8 32px wide parts, each representing a cloud type with a specific profile and altitude. (stratus on the left and cumulus on the right)
On the bottom left, the cloud map uses grayscale values to map which type of clouds is used. For exemple a radial gradient using thoses values creates a circular cloud as seen on the bottom right using the profile set on the cloud LUT.
Here is an example cloud LUT that can be used in manual mode. On the top image, the LUT is divided into 8 32px wide parts, each representing a cloud type with a specific profile and altitude (stratus on the left and cumulus on the right).
On the bottom left, the cloud map uses grayscale values to map which type of clouds is used. For example, a radial gradient using those values creates a circular cloud as seen on the bottom right using the profile set on the cloud LUT.
For more examples, you can get the [environment samples](HDRP-Sample-Content.html#environment-samples) from the package manager.

**Note**: This cloud map is formatted differently to the cloud map that the [Cloud Layer](create-simple-clouds-cloud-layer.md) feature uses.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace UnityEditor.VFX.HDRP
{
[VFXHelpURL("Context-OutputStripQuad")]
[VFXInfo(name = "Output ParticleStrip|HDRP Lit|Quad", category = "#3Output Strip", experimental = true, synonyms = new []{ "Trail", "Ribbon" })]
class VFXLitQuadStripOutput : VFXAbstractParticleHDRPLitOutput
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ RW_TEXTURE2D_X(float4, _Buffer2D);
[numthreads(8, 8, 1)]
void ClearBuffer2DMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
UNITY_XR_ASSIGN_VIEW_INDEX(dispatchThreadID.z);

if (any(dispatchThreadID.xy >= (uint2)_BufferSize.xy))
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/AtmosphericScattering/AtmosphericScattering.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Builtin/BuiltinData.hlsl"

#define unity_CameraWorldClipPlanes _FrustumPlanes

void VFXEncodeMotionVector(float2 motionVec, out float4 outBuffer)
{
EncodeMotionVector(motionVec, outBuffer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,12 @@ private static class Styles
SerializedProperty m_LightType;
SerializedProperty m_LightColor;
SerializedProperty m_LightIntensity;
SerializedProperty m_UseNormalMap;
SerializedProperty m_ShadowsEnabled;
SerializedProperty m_ShadowIntensity;
SerializedProperty m_ShadowSoftness;
SerializedProperty m_ShadowSoftnessFalloffIntensity;
SerializedProperty m_ShadowVolumeIntensity;
SerializedProperty m_ShadowVolumeIntensityEnabled;
SerializedProperty m_ApplyToSortingLayers;
SerializedProperty m_VolumetricIntensity;
SerializedProperty m_VolumetricEnabled;
SerializedProperty m_BlendStyleIndex;
Expand All @@ -147,12 +145,9 @@ private static class Styles
SerializedProperty m_PointOuterAngle;
SerializedProperty m_PointInnerRadius;
SerializedProperty m_PointOuterRadius;
SerializedProperty m_DeprecatedPointLightSprite;

// Shape Light Properties
SerializedProperty m_ShapeLightParametricRadius;
SerializedProperty m_ShapeLightFalloffSize;
SerializedProperty m_ShapeLightParametricSides;
SerializedProperty m_ShapeLightSprite;

SavedBool m_BlendingSettingsFoldout;
Expand Down Expand Up @@ -227,14 +222,12 @@ void OnEnable()
m_LightType = serializedObject.FindProperty("m_LightType");
m_LightColor = serializedObject.FindProperty("m_Color");
m_LightIntensity = serializedObject.FindProperty("m_Intensity");
m_UseNormalMap = serializedObject.FindProperty("m_UseNormalMap");
m_ShadowsEnabled = serializedObject.FindProperty("m_ShadowsEnabled");
m_ShadowIntensity = serializedObject.FindProperty("m_ShadowIntensity");
m_ShadowSoftness = serializedObject.FindProperty("m_ShadowSoftness");
m_ShadowSoftnessFalloffIntensity = serializedObject.FindProperty("m_ShadowSoftnessFalloffIntensity");
m_ShadowVolumeIntensity = serializedObject.FindProperty("m_ShadowVolumeIntensity");
m_ShadowVolumeIntensityEnabled = serializedObject.FindProperty("m_ShadowVolumeIntensityEnabled");
m_ApplyToSortingLayers = serializedObject.FindProperty("m_ApplyToSortingLayers");
m_VolumetricIntensity = serializedObject.FindProperty("m_LightVolumeIntensity");
m_VolumetricEnabled = serializedObject.FindProperty("m_LightVolumeEnabled");
m_BlendStyleIndex = serializedObject.FindProperty("m_BlendStyleIndex");
Expand All @@ -249,12 +242,9 @@ void OnEnable()
m_PointOuterAngle = serializedObject.FindProperty("m_PointLightOuterAngle");
m_PointInnerRadius = serializedObject.FindProperty("m_PointLightInnerRadius");
m_PointOuterRadius = serializedObject.FindProperty("m_PointLightOuterRadius");
m_DeprecatedPointLightSprite = serializedObject.FindProperty("m_DeprecatedPointLightCookieSprite");

// Shape Light
m_ShapeLightParametricRadius = serializedObject.FindProperty("m_ShapeLightParametricRadius");
m_ShapeLightFalloffSize = serializedObject.FindProperty("m_ShapeLightFalloffSize");
m_ShapeLightParametricSides = serializedObject.FindProperty("m_ShapeLightParametricSides");
m_ShapeLightSprite = serializedObject.FindProperty("m_LightCookieSprite");

m_AnyBlendStyleEnabled = false;
Expand Down Expand Up @@ -574,8 +564,8 @@ void DrawSpotLight(SerializedObject serializedObject)
DrawInnerAndOuterSpotAngle(m_PointInnerAngle, m_PointOuterAngle, Styles.InnerOuterSpotAngle);
EditorGUILayout.Slider(m_FalloffIntensity, 0, 1, Styles.generalFalloffIntensity);

if (m_DeprecatedPointLightSprite.objectReferenceValue != null)
EditorGUILayout.PropertyField(m_DeprecatedPointLightSprite, Styles.pointLightSprite);
if (m_ShapeLightSprite.objectReferenceValue != null)
EditorGUILayout.PropertyField(m_ShapeLightSprite, Styles.pointLightSprite);

m_SortingLayerDropDown.OnTargetSortingLayers(serializedObject, targets, Styles.generalSortingLayerPrefixLabel, AnalyticsTrackChanges);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static void ShowExample()
private int shadowCount = 0;

// Variables used for refresh view
private bool doRefresh;
static bool doRefresh;
private int cachedSceneHandle;
private Vector3 cachedCamPos;
private int totalLightCount;
Expand Down Expand Up @@ -356,11 +356,19 @@ private void CreateGUI()
private void OnEnable()
{
EditorApplication.playModeStateChanged += OnPlayModeStateChanged;

#if UNITY_EDITOR
SortingLayer.onLayerChanged += QueueRefresh;
#endif
}

private void OnDisable()
{
EditorApplication.playModeStateChanged -= OnPlayModeStateChanged;

#if UNITY_EDITOR
SortingLayer.onLayerChanged -= QueueRefresh;
#endif
}

void OnPlayModeStateChanged(PlayModeStateChange playModeState)
Expand Down Expand Up @@ -528,7 +536,7 @@ private void ResetDirty()
doRefresh = false;
}

public void QueueRefresh()
internal static void QueueRefresh()
{
doRefresh = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public override void OnInspectorGUI()

if ((ShadowCaster2D.ShadowCastingSources)m_CastingSource.intValue == ShadowCaster2D.ShadowCastingSources.ShapeEditor)
ShadowCaster2DInspectorGUI<ShadowCaster2DShadowCasterShapeTool>();
else if (EditorToolManager.IsActiveTool<ShadowCaster2DShadowCasterShapeTool>())
else if (Path2D.EditorToolManager.IsActiveTool<ShadowCaster2DShadowCasterShapeTool>())
ToolManager.RestorePreviousTool();

if(m_ShadowShape2DProvider != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,20 +186,20 @@ private void OnDestroy()
private void HandleActivation()
{
if (m_IsActive == false && ToolManager.IsActiveTool(this))
Activate();
ActivateTool();
else if (m_IsActive)
Deactivate();
DeactivateTool();
}

private void Activate()
private void ActivateTool()
{
m_IsActive = true;
RegisterCallbacks();
InitializeCache();
OnActivate();
}

private void Deactivate()
private void DeactivateTool()
{
OnDeactivate();
DestroyCache();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ void UpdateApplyToSortingLayersArray(object layerSelectionDataObject)
}

if (EditorWindow.HasOpenInstances<LightBatchingDebugger>())
{
var debugger = EditorWindow.GetWindow<LightBatchingDebugger>();
debugger?.QueueRefresh();
}
LightBatchingDebugger.QueueRefresh();
}

void OnNoSortingLayerSelected(object selectionData)
Expand Down
Loading
Loading