Skip to content

Internal/2021.3/staging #8140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
68d7a85
DOCG-6505 Remove backported blit / Scriptable Renderer Feature pages …
markg-unity Jan 22, 2025
18f520f
[Port] [2021.3] DOCG-6491 Custom render passes and volumes documentation
markg-unity Jan 24, 2025
64a31ce
[Port] [2021.3] Fix issue where padding was different between tabs in…
svc-reach-platform-support Feb 1, 2025
32be7e6
[Port] [2021.3] UUM-92512: Light Cookie Atlas is leaking
svc-reach-platform-support Feb 4, 2025
9385293
21.3 Fix truncated color value warning.
eh-unity Feb 7, 2025
deff058
[UUM-63636] Fix for 2021.3.X: Terrain Detail objects are not rendered…
bslapc Feb 10, 2025
3ff8613
[21.3] Bump SRP packages to 12.1.16
theopnv Feb 18, 2025
9a59d4a
[Backport 2021.3][UUM-87636] Fix sprite instancing with 2d shaders
kennytann Feb 27, 2025
fe3c37a
[2021.3][UUM-90792] Fix camera sorting layer not breaking batch for U…
kennytann Feb 27, 2025
d8dcdc2
[Port] [2021.3] [Port] [2022.3] Graphics docs feedback fixes February…
svc-reach-platform-support Feb 27, 2025
ae0ae24
[Port] [2021.3] DOCG-6644 Clarify URP shadows shader example
svc-reach-platform-support Feb 27, 2025
4dbbb8b
2021.3: Fixed the generation of new artifact ID of ShaderGraph on eve…
Saiprasad945 Mar 3, 2025
06e1d95
[Port] [2021.3] DOCG-5799 Clarify Sample Graphics Buffer and custom t…
markg-unity Mar 3, 2025
a6b5ac6
[Port] [2021.3] Minor feedback fixes in Graphics package docs
svc-reach-platform-support Mar 6, 2025
0351a45
[Port] [2021.3] [2d] Fix Case UUM-90726
svc-reach-platform-support Mar 6, 2025
90eb487
[Port] [2021.3] ShaderGraph: remove duplicate LIGHTMAP_ON and DIRLIGH…
svc-reach-platform-support Mar 18, 2025
f6cd568
[Port] [2021.3] [UUM-85456] Fix missing fog parameters in sprite subt…
svc-reach-platform-support Mar 18, 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
8 changes: 8 additions & 0 deletions Packages/com.unity.render-pipelines.core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [12.1.15] - 2025-02-13

This version is compatible with Unity 2021.3.49f1.

### Fixed
- Rendering Debugger - Keep the correct selected panel when entering and exiting from playmode.
- Avoid that the same volume can be registered more than 1 time in the VolumeManager.

## [12.1.14] - 2024-04-03

This version is compatible with Unity 2021.3.38f1.
Expand Down
2 changes: 1 addition & 1 deletion Packages/com.unity.render-pipelines.core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.unity.render-pipelines.core",
"description": "SRP Core makes it easier to create or customize a Scriptable Render Pipeline (SRP). SRP Core contains reusable code, including boilerplate code for working with platform-specific graphics APIs, utility functions for common rendering operations, and shader libraries. The code in SRP Core is use by the High Definition Render Pipeline (HDRP) and Universal Render Pipeline (URP). If you are creating a custom SRP from scratch or customizing a prebuilt SRP, using SRP Core will save you time.",
"version": "12.1.15",
"version": "12.1.16",
"unity": "2021.3",
"displayName": "Core RP Library",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [12.1.15] - 2025-02-13

This version is compatible with Unity 2021.3.49f1.

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

## [12.1.14] - 2024-04-03

This version is compatible with Unity 2021.3.38f1.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "com.unity.render-pipelines.high-definition-config",
"description": "Configuration files for the High Definition Render Pipeline.",
"version": "12.1.15",
"version": "12.1.16",
"unity": "2021.3",
"displayName": "High Definition RP Config",
"dependencies": {
"com.unity.render-pipelines.core": "12.1.15"
"com.unity.render-pipelines.core": "12.1.16"
}
}
20 changes: 20 additions & 0 deletions Packages/com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [12.1.15] - 2025-02-13

This version is compatible with Unity 2021.3.49f1.

### Changed
- Transparent materials now appear opaque when using Mipmap Streaming debug views for increased clarity.

### Fixed
- Fixed graphical issue when resizing Reflection Probe sizes on macOS
- Fixed an issue where the Mipmap Streaming debug views would show up incorrectly when certain features were enabled (SRP Batcher, Volumetric Fog, Volumetric Clouds, ...).
- Fixed an issue where certain Mipmap Streaming debug views (for example: "Mip Count") would not show up correctly on Metal.
- Reimporting ShaderGraph assets no longer triggers a UnityVCS/Perfoce local checkout.
- Fixed sun flicker where the sun is close to cloud boundaries.
- Added clamp to HairAngleWorld to prevent nan from FastASin.
- Fixed an issue where cascade shadows and distance shadowmask were not blended properly.
- Fixed wrong SSR when using a shader graph with a clear coat value of 0.
- Fixed HDRP sky rendering when Camera Relative Rendering is disabled.
- Fixed black line artifacts on top of the screen with DRS and downsampled SSAO.
- Fixed an issue where the padding in the Lighting window was different between tabs.

## [12.1.14] - 2024-04-03

This version is compatible with Unity 2021.3.38f1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ HDRP ray tracing in Unity has the following limitations:
- Ray tracing isn't supported when rendering [Reflection Probes](Reflection-Probe.md).
- HDRP doesn't support [orthographic projection](HDRP-Camera.md). If you enable orthographic projection mode, you might experience rendering problems for Transparent Materials, volumetrics and planar reflections.
- Ray Traced and Screen Space effects won't appear recursively in [Ray Traced Reflections](Ray-Traced-Reflections.md), [Ray Traced Global Illumination](Ray-Traced-Global-Illumination.md) or [Recursive Ray Tracing](Ray-Tracing-Recursive-Rendering.md). This means, for example, you won't be able to see [Screen Space Global Illumination](Override-Screen-Space-GI.md) in [ray-traced reflection](Ray-Traced-Reflections.md).
- Doesn't support water.

### Unsupported shader graph nodes for ray tracing

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ HDRP path tracing in Unity 2020.2 has the following limitations:
- MSAA.
- [Graphics.DrawMesh](https://docs.unity3d.com/ScriptReference/Graphics.DrawMesh.html).
- [Streaming Virtual Texturing](https://docs.unity3d.com/Documentation/Manual/svt-streaming-virtual-texturing.html).

- Vertex animation, for example wind deformation of vegetation.

### Unsupported shader graph nodes for path tracing

When building your custom shaders using shader graph, some nodes are incompatible with ray/path tracing. You need either to avoid using them or provide an alternative behavior using the [ray tracing shader node](SGNode-Raytracing-Quality). Here is the list of the incompatible nodes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace UnityEditor.Rendering.HighDefinition
{
Expand All @@ -16,16 +17,7 @@ class HDLightingWindowEnvironmentSectionEditor : LightingWindowEnvironmentSectio
{
class Styles
{
public static GUIStyle headerStyle;
static Styles()
{
headerStyle = new GUIStyle(EditorStyles.foldoutHeader);
headerStyle.fontStyle = FontStyle.Bold;
headerStyle.fontSize = 12;
headerStyle.margin = new RectOffset(17, 0, 0, 0);
headerStyle.padding = new RectOffset(16, 1, 0, 0);
headerStyle.fixedHeight = 21;
}
public static readonly GUIStyle inspectorTitle = "IN Title";
}

class SerializedStaticLightingSky
Expand Down Expand Up @@ -78,6 +70,8 @@ bool toggleValue
}
}

static MethodInfo k_FoldoutTitlebar;

public override void OnEnable()
{
m_SerializedActiveSceneLightingSky = new SerializedStaticLightingSky(GetStaticLightingSkyForScene(EditorSceneManager.GetActiveScene()));
Expand Down Expand Up @@ -149,35 +143,20 @@ public override void OnInspectorGUI()

void DrawGUI()
{
Rect mainSeparator = EditorGUILayout.GetControlRect(GUILayout.Height(1));
mainSeparator.xMin -= 3;
mainSeparator.xMax += 4;
EditorGUI.DrawRect(mainSeparator, EditorGUIUtility.isProSkin
? new Color32(26, 26, 26, 255)
: new Color32(127, 127, 127, 255));

Rect line = EditorGUILayout.GetControlRect();
line.xMin -= 3;
line.xMax += 4;
line.y -= 2;
line.yMax += 4;
if (k_FoldoutTitlebar == null)
{
var flags = BindingFlags.NonPublic | BindingFlags.Static;
Type[] args = new Type[] { typeof(Rect), typeof(GUIContent), typeof(bool), typeof(bool) };
k_FoldoutTitlebar = typeof(EditorGUI).GetMethod("FoldoutTitlebar", flags, null, args, null);
}

toggleValue = EditorGUI.Foldout(line, toggleValue, EditorGUIUtility.TrTextContent("Environment (HDRP)", "Sky lighting environment for active Scene"), Styles.headerStyle);
var labelRect = GUILayoutUtility.GetRect(GUIContent.none, Styles.inspectorTitle, GUILayout.ExpandWidth(true));
var label = EditorGUIUtility.TrTextContent("Environment (HDRP)", "Sky lighting environment for active Scene");

EditorGUI.DrawRect(line, EditorGUIUtility.isProSkin
? new Color(1f, 1f, 1f, 0.03f)
: new Color(1f, 1f, 1f, 0.2f));
toggleValue = (bool)k_FoldoutTitlebar.Invoke(null, new object[] { labelRect, label, toggleValue, true });

if (m_ToggleValue)
{
Rect separator = EditorGUILayout.GetControlRect(GUILayout.Height(1));
separator.xMin -= 3;
separator.xMax += 4;
separator.y -= 1;
EditorGUI.DrawRect(separator, EditorGUIUtility.isProSkin
? new Color32(48, 48, 48, 255)
: new Color32(186, 186, 186, 255));

++EditorGUI.indentLevel;

//cannot use SerializeProperty due to logic in the property
Expand Down
10 changes: 5 additions & 5 deletions Packages/com.unity.render-pipelines.high-definition/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.unity.render-pipelines.high-definition",
"description": "The High Definition Render Pipeline (HDRP) is a high-fidelity Scriptable Render Pipeline built by Unity to target modern (Compute Shader compatible) platforms. HDRP utilizes Physically-Based Lighting techniques, linear lighting, HDR lighting, and a configurable hybrid Tile/Cluster deferred/Forward lighting architecture and gives you the tools you need to create games, technical demos, animations, and more to a high graphical standard.",
"version": "12.1.15",
"version": "12.1.16",
"unity": "2021.3",
"displayName": "High Definition RP",
"dependencies": {
Expand All @@ -11,10 +11,10 @@
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.terrain": "1.0.0",
"com.unity.render-pipelines.core": "12.1.15",
"com.unity.shadergraph": "12.1.15",
"com.unity.visualeffectgraph": "12.1.15",
"com.unity.render-pipelines.high-definition-config": "12.1.15"
"com.unity.render-pipelines.core": "12.1.16",
"com.unity.shadergraph": "12.1.16",
"com.unity.visualeffectgraph": "12.1.16",
"com.unity.render-pipelines.high-definition-config": "12.1.16"
},
"keywords": [
"graphics",
Expand Down
21 changes: 21 additions & 0 deletions Packages/com.unity.render-pipelines.universal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,27 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Version Updated
The version number for this package has increased due to a version update of a related graphics package.

## [12.1.15] - 2025-02-13

This version is compatible with Unity 2021.3.49f1.

### Fixed
- Fixed an issue where cookie sampling looks corrupt when targeting mobile platforms.
- Fixed compiler error when using single precision on Mobile targets
- Disable fallback behavior on FSR EASU shader to prevent build errors on machines with old GPUs
- Reduced banding on FSR upscaled render target by changing render target formats
- Fixed an issue where glClientWaitSync: Expected application to have kicked everything until job: 96089 (possibly by calling glFlush)" are thrown in the Android Player on some devices with PowerVR Rogue GE8320 GPU.
- Fixed camera offset in the UI editor for the RenderObject RenderFeature.
- Fixed shadow-map sampling artifacts present when using the Unlit DrawMode in the SceneView.
- Disabled depth priming for cameras with depth only render targets.
- Fixed multiview support for the XR Occlusion Mesh pass.
- Stop spamming about c-buffer layout mispatch in GPU-instancing-enabled speed tree materials when enabling Rendering Layers.
- Fixed a redundant empty line in a tooltip for Cast Shadows toggle in the URP Asset for Additional lights.
- Fixed sorting the Reflection Probe by resolution.
- Universal RP: Fixed an issue where Camera view is not rendered on PowerVR Rogue GE8320 GPU'S if Shadows are enabled in URP Asset and Camera stack contains Overlay Camera's.
- Fixed light cookie texture memory leak when entering Playmode.
- Fixed Implicit truncation of vector type shader warning.

## [12.1.14] - 2024-04-03

This version is compatible with Unity 2021.3.38f1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Universal RP will try to use the best resolution according to the number of shad

## Shadow atlases

Universal RP renders all real-time shadows for a frame using one common shadow map atlas for all punctual light shadows (i.e shadows for Spot Lights and Point Lights), and an other shadow map atlas for Directional Light shadows.
Universal RP renders all real-time shadows for a frame using one common shadow map atlas for all punctual light shadows (i.e shadows for Spot Lights and Point Lights), and another shadow map atlas for Directional Light shadows.

Set the size of these atlases in your Unity Project’s [Universal Render Pipeline Asset](universalrp-asset.md). The atlas size determines the maximum resolution of shadows in your Scene.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,16 @@
* [Use shadows in a custom URP shader](use-built-in-shader-methods-shadows.md)
* [URP ShaderLab Pass tags](urp-shaders/urp-shaderlab-pass-tags.md)
* [Custom rendering and post-processing](customizing-urp.md)
* [Custom render passes](renderer-features/custom-rendering-passes.md)
* [Custom render pass workflow in URP](renderer-features/custom-rendering-pass-workflow-in-urp.md)
* [Scriptable Render Passes](renderer-features/scriptable-render-passes.md)
* [Scriptable Render Passes](renderer-features/intro-to-scriptable-render-passes.md)
* [Write a Scriptable Render Pass](renderer-features/write-a-scriptable-render-pass.md)
* [Inject a pass via scripting](customize/inject-render-pass-via-script.md)
* [Scriptable Renderer Features](renderer-features/scriptable-renderer-features/scriptable-renderer-features-landing.md)
* [Introduction to Scriptable Renderer Features](renderer-features/scriptable-renderer-features/intro-to-scriptable-renderer-features.md)
* [Inject a custom render pass using a Scriptable Renderer Feature](renderer-features/scriptable-renderer-features/inject-a-pass-using-a-scriptable-renderer-feature.md)
* [Apply a Scriptable Renderer Feature to a specific camera type](renderer-features/scriptable-renderer-features/apply-scriptable-feature-to-specific-camera.md)
* [Example of a complete Scriptable Renderer Feature](renderer-features/create-custom-renderer-feature.md)
* [Scriptable Renderer Feature and Scriptable Render Pass API reference](renderer-features/scriptable-renderer-features/scriptable-renderer-feature-reference.md)
* [Custom render pass workflow in URP](renderer-features/custom-rendering-pass-workflow-in-urp.md)
* [Scriptable Render Passes](renderer-features/scriptable-render-passes.md)
* [Introduction to Scriptable Render Passes](renderer-features/intro-to-scriptable-render-passes.md)
* [Inject a pass via scripting](customize/inject-render-pass-via-script.md)
* [Restrict a render pass to a scene area](customize/restrict-render-pass-scene-area.md)
* [Scriptable Renderer Features](renderer-features/scriptable-renderer-features/scriptable-renderer-features-landing.md)
* [Introduction to Scriptable Renderer Features](renderer-features/scriptable-renderer-features/intro-to-scriptable-renderer-features.md)
* [Apply a Scriptable Renderer Feature to a specific camera type](renderer-features/scriptable-renderer-features/apply-scriptable-feature-to-specific-camera.md)
* [Example of a complete Scriptable Renderer Feature](renderer-features/create-custom-renderer-feature.md)
* [Perform a full screen blit in Single Pass Instanced rendering in XR](renderer-features/how-to-fullscreen-blit-in-xr-spi.md)
* [Optimization](urp-optimization.md)
* [Rendering Debugger](features/rendering-debugger.md)
* [Optimize for better performance](optimize-for-better-performance.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ With the scene set up, the following steps show how to create and apply a post-p
3. Select the **Layer** dropdown and choose one of the layers created when you set up the scene.
4. Select the camera you want to apply this effect to.
5. In the Inspector window, go to **Environment** > **Volume Mask** and select the same layer that you chose for the GameObject.
6. Repeat stpes 1-5 for each GameObject and Camera pair that your scene requires.
6. Repeat steps 1-5 for each GameObject and Camera pair that your scene requires.

> [!NOTE]
> Some effects apply to all cameras in a scene by default. As a result of this, you might need to add the same effect to each volume. This overrides the effects from other volumes on individual cameras with the new values that you set.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Restrict a render pass to a scene area in URP

To restrict a render pass to a specific area of a scene, add a [volume](../Volumes.md) to the scene, then add code to your render pass and your shader to check if the camera is inside the volume.

Follow these steps:

1. Update your shader code to enable or disable your custom rendering effect based on a Boolean value.

For example, add the following code to your shader:

```hlsl
Pass
{
...

// Add a variable to enable or disable your custom rendering effect
float _Enabled;

...

float4 Frag(Varyings input) : SV_Target0
{
...

// Return the color with the effect if the variable is 1, or the original color if the variable is 0
if (_Enabled == 1){
return colorWithEffect;
} else {
return originalColor;
}
}
}
```

2. Create a script that implements the `VolumeComponent` class. This creates a volume override component that you can add to a volume.

```c#
using UnityEngine;
using UnityEngine.Rendering;

public class MyVolumeOverride : VolumeComponent
{
}
```

3. In the **Hierarchy** window, select the **Add** (**+**) button, then select **GameObject** > **Volume** > **Box Volume**.

4. In the **Inspector** window for the new box volume, under **Volume**, select **New** to create a new volume profile.

5. Select **Add override**, then select your volume override component, for example **My Volume Override**.

6. Add a property to the volume override script. Unity adds the property in the **Inspector** window of the volume override.

For example:

```c#
public class MyVolumeOverride : VolumeComponent
{
// Add an 'Effect Enabled' checkbox to the Volume Override, with a default value of true.
public BoolParameter effectEnabled = new BoolParameter(true);
}
```

5. In your custom pass, use the `GetComponent` API to get the volume override component and check the value of the property.

For example:

```c#
class myCustomPass : ScriptableRenderPass
{

...

public void Setup(Material material)
{
// Get the volume override component
MyVolumeOverride myOverride = VolumeManager.instance.stack.GetComponent<MyVolumeOverride>();

// Get the value of the 'Effect Enabled' property
bool effectStatus = myOverride.effectEnabled.overrideState ? myOverride.effectEnabled.value : false;
}
}
```

6. Pass the value of the property to the variable you added to the shader code.

For example:

```c#
class myCustomPass : ScriptableRenderPass
{

...

public void Setup(Material material)
{
MyVolumeOverride myOverride = VolumeManager.instance.stack.GetComponent<MyVolumeOverride>();
bool effectStatus = myOverride.effectEnabled.overrideState ? myOverride.effectEnabled.value : false;

// Pass the value to the shader
material.SetFloat("_Enabled", effectStatus ? 1 : 0);
}
}
```

Your custom rendering effect is now enabled when the camera is inside the volume, and disabled when the camera is outside the volume.

## Additional resources

- [Write a Scriptable Render Pass](../renderer-features/write-a-scriptable-render-pass.md)
- [Volumes in URP](../volumes.md)
- [Writing custom shaders in URP](../writing-custom-shaders-urp.md)
Loading