Skip to content

Internal/master #8142

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 12 commits into from
Apr 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
@@ -1,3 +1,7 @@
---
uid: um-srp-advanced-properties
---

# Advanced Properties

Unity Render Pipelines components expose standard properties by default that are suitable for most use-cases.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -754,16 +754,16 @@ static bool SetBakingContext(List<ProbeVolumePerSceneData> perSceneData)
for (int i = 0; i < perSceneData.Count; ++i)
{
var data = perSceneData[i];
var scene = data.gameObject.scene;
var sceneGUID = scene.GetGUID();
var sceneGUID = data.sceneGUID;
var bakingSet = ProbeVolumeBakingSet.GetBakingSetForScene(sceneGUID);

if (bakingSet == null)
{
if (isBakingSingleScene)
continue;

Debug.LogError($"Scene '{scene.name}' does not belong to any Baking Set. Please add it to a Baking Set in the Adaptive Probe Volumes tab of the Lighting Window.");
var sceneName = data.gameObject.scene.name;
Debug.LogError($"Scene '{sceneName}' does not belong to any Baking Set. Please add it to a Baking Set in the Adaptive Probe Volumes tab of the Lighting Window.");
return false;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using Unity.Collections;
#if UNITY_EDITOR
Expand Down Expand Up @@ -25,6 +26,7 @@ public class AdditionalGIBakeRequestsManager
public static AdditionalGIBakeRequestsManager instance { get { return s_Instance; } }

const float kInvalidSH = 1f;
const float kInvalidValidity = 1f;
const float kValidSHThresh = 0.33f;

private static Dictionary<int, SphericalHarmonicsL2> m_SHCoefficients = new Dictionary<int, SphericalHarmonicsL2>();
Expand Down Expand Up @@ -64,6 +66,7 @@ public void DequeueRequest(int probeInstanceID)
/// <param name ="sh"> The output SH coefficients that have been computed.</param>
/// <param name ="pos"> The position for which the computed SH coefficients are valid.</param>
/// <returns>Whether the request for light probe rendering has been fulfilled and sh is valid.</returns>
[Obsolete("Use RetrieveProbe instead.", false)]
public bool RetrieveProbeSH(int probeInstanceID, out SphericalHarmonicsL2 sh, out Vector3 pos)
{
if (m_SHCoefficients.ContainsKey(probeInstanceID))
Expand All @@ -78,6 +81,32 @@ public bool RetrieveProbeSH(int probeInstanceID, out SphericalHarmonicsL2 sh, ou
return false;
}

/// <summary>
/// Retrieve the result of a capture request, it will return false if the request ID is invalid.
/// </summary>
/// <param name ="probeInstanceID"> The instance ID of the probe doing the request.</param>
/// <param name ="pos"> The position for which the computed SH coefficients are valid.</param>
/// <param name ="sh"> The output SH coefficients that have been computed.</param>
/// <param name ="validity"> The output validity that has been computed.</param>
/// <returns>True if the request ID is valid.</returns>
public bool RetrieveProbe(EntityId probeInstanceID, out Vector3 pos, out SphericalHarmonicsL2 sh, out float validity)
{
if (m_SHCoefficients.ContainsKey(probeInstanceID))
{
sh = m_SHCoefficients[probeInstanceID];
pos = m_RequestPositions[probeInstanceID];
validity = m_SHValidity[probeInstanceID];

return true;
}

sh = new SphericalHarmonicsL2();
pos = Vector3.negativeInfinity;
validity = float.NegativeInfinity;

return false;
}

static internal bool GetPositionForRequest(int probeInstanceID, out Vector3 pos)
{
if (m_SHCoefficients.ContainsKey(probeInstanceID))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ internal void AddPendingSceneLoading(string sceneGUID, ProbeVolumeBakingSet baki
return;
}

if (m_CurrentBakingSet != null && bakingSet != m_CurrentBakingSet)
if (m_CurrentBakingSet != null && !m_CurrentBakingSet.HasSameSceneGUIDs(bakingSet))
{
// Trying to load data for a scene from a different baking set than currently loaded ones.
// This should not throw an error, but it's not supported
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1115,5 +1115,19 @@ internal int GetChunkGPUMemory(ProbeVolumeSHBands shBands)

return size;
}

internal bool HasSameSceneGUIDs(ProbeVolumeBakingSet other)
{
var otherSceneGUIDs = other.sceneGUIDs;
if (m_SceneGUIDs.Count != otherSceneGUIDs.Count)
return false;

for (var i = 0; i < m_SceneGUIDs.Count; ++i)
{
if (m_SceneGUIDs[i] != otherSceneGUIDs[i])
return false;
}
return true;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ int _HDREncoding;
// ACES2065-1: A gamut that covers the full XYZ space, part of the ACES specs. Mostly used for storage since it is harder to work with than ACEScg.
// WCG: Wide color gamut. This is defined as a color gamut that is wider than the Rec709 one.
// LMS: A color space represented by the response of the three cones of human eye (responsivity peaks Long, Medium, Short)
// OETF (Optical Eelectro Transfer Function): This is a function to goes from optical (linear light) to electro (signal transmitted to the display).
// EOTF (Eelectro Optical Transfer Function): The inverse of the OETF, used by the TV/Monitor.
// EETF (Eelectro-Electro Transfer Function): This is generally just a remapping function, we use the BT2390 EETF to perform range reduction based on the actual display.
// OETF (Optical-Electro Transfer Function): This is a function to goes from optical (linear light) to electro (signal transmitted to the display).
// EOTF (Electro-Optical Transfer Function): The inverse of the OETF, used by the TV/Monitor.
// EETF (Electro-Electro Transfer Function): This is generally just a remapping function, we use the BT2390 EETF to perform range reduction based on the actual display.
// PQ (Perceptual Quantizer): the EOTF used for HDR10 TVs. It works in the range [0, 10000] nits. Important to keep in mind that this represents an absolute intensity and not relative as for SDR. Sometimes this can be referenced as ST2084. As OETF we'll use the inverse of the PQ curve.
// scRGB: a wide color gamut that uses same color space and white point as sRGB, but with much wider coordinates. Used on windows when 16 bit depth is selected. Most of the color space is imaginary colors. Works differently than with PQ (encoding is linear).
// G22 (Gamma 2.2): the EOTF used for exact gamma 2.2 curve.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Bloom includes [advanced properties](https://docs.unity3d.com/Packages/com.unity
| **Property** | **Description** |
| -------------------------- | ------------------------------------------------------------ |
| **Resolution** | Use the drop-down to set the resolution at which HDRP processes the Bloom effect. If you target consoles that use a very high resolution (for example, 4k), select **Quarter,** because it's less resource-intensive.<br />&#8226; **Quarter**: Uses quarter the screen resolution.<br />&#8226; **Half**: Uses half the screen resolution.<br/>This property only appears when you enable [advanced properties](https://docs.unity3d.com/Packages/com.unity.render-pipelines.core@latest?subfolder=/manual/advanced-properties.html). |
| **High Quality Prefiltering** | Enable the checkbox to make HDRP use 13 samples instead of 4 during the prefiltering pass. This increases the resource intensity of the Bloom effect, but results in less flickering by small and bright objects like the sun.<br />This property only appears when you enable [additional properties](expose-all-additional-properties.md). |
| **High Quality Prefiltering** | Enable the checkbox to make HDRP use 13 samples instead of 4 during the prefiltering pass. This increases the resource intensity of the Bloom effect, but results in less flickering by small and bright objects like the sun.<br />This property only appears when you enable [additional properties](https://docs.unity3d.com/Packages/[email protected]/manual/advanced-properties.html). |
| **High Quality Filtering** | Enable the checkbox to make HDRP use bicubic filtering instead of bilinear filtering. This increases the resource intensity of the Bloom effect, but results in smoother visuals.<br />This property only appears when you enable [advanced properties](https://docs.unity3d.com/Packages/com.unity.render-pipelines.core@latest?subfolder=/manual/advanced-properties.html). |
| **Anamorphic** | Enable the checkbox to make the bloom effect take the **Anamorphism** property of the Camera into account. This stretches the bloom horizontally or vertically like it would on anamorphic sensors.<br />This property only appears when you enable [advanced properties](https://docs.unity3d.com/Packages/com.unity.render-pipelines.core@latest?subfolder=/manual/advanced-properties.html). |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ You can then use the **HD Sample Buffer** node and set **RenderingLayerMask** as
After you enable Light Layers, you can then use them to decouple Meshes from certain Lights in your Scene. To do this:

1. Click on a Light in the Hierarchy or the Scene view to view it in the Inspector.
2. Enable [additional properties](expose-all-additional-properties.md) in the **General** section to expose the **Rendering Layer Mask** property.
2. Enable [additional properties](https://docs.unity3d.com/Packages/[email protected]/manual/advanced-properties.html) in the **General** section to expose the **Rendering Layer Mask** property.
3. Use the **Rendering Layer Mask** property drop-down to select which Light Layers this Light affects.
4. Click on a Mesh Renderer or Terrain in the Hierarchy or the Scene view to view it in the Inspector.
5. Use the **Rendering Layer Mask** drop-down (See [MeshRenderer](https://docs.unity3d.com/Manual/class-MeshRenderer.html) for GameObjects or [OtherSettings](https://docs.unity3d.com/Manual/terrain-OtherSettings.html) for Terrain) to select which Light Layers affect this Mesh Renderer or Terrain. When you enable Light Layers, a Light only affects a Mesh Renderer or Terrain if they both use a matching Light Layer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ In HDRP, each individual Light component controls its own shadow biasing using t
- **Slope-Scale Depth Bias**
- **Normal Bias**

Find these settings under the **Shadows** section in the **Light** Inspector. If some property fields are missing, enable [additional properties](expose-all-additional-properties.md) to display them. For details on how each property controls the shadow biasing, see the [Light documentation](Light-Component.md).
Find these settings under the **Shadows** section in the **Light** Inspector. If some property fields are missing, enable [additional properties](https://docs.unity3d.com/Packages/[email protected]/manual/advanced-properties.html) to display them. For details on how each property controls the shadow biasing, see the [Light documentation](Light-Component.md).

Using high shadow bias values may result in light "leaking" through Meshes. This is where there is a visible gap between the shadow and its caster and leads to shadow shapes that don't accurately represent their casters.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
* [Configure build settings for different platforms](configure-build-settings-for-different-platforms.md)
* [Quality settings](quality-settings.md)
* [Frame Settings](frame-settings.md)
* [Expose all additional properties](expose-all-additional-properties.md)
* [Create an HDRP asset](create-an-hdrp-asset.md)
* [Scene setup](scene-setup.md)
* [Understand Volumes](understand-volumes.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ Use settings to configure the High Definition Render Pipeline (HDRP) for differe
| [Configure build settings for different platforms](configure-build-settings-for-different-platforms.md) | Install platform packages to build your project for different platforms. |
| [Quality settings](quality-settings.md) | Create additional HDRP Assets to override HDRP settings for different hardware and computer processing ability. |
| [Frame Settings](frame-settings.md) | Change HDRP camera and reflection settings. |
| [Expose all additional properties](expose-all-additional-properties.md) | Show additional properties in a component so you can fine-tune the behavior of the component. |
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ To set up lighting in your HDRP Project:

1. In the Hierarchy, select a Spot Light and view the Light component in the Inspector.
2. Go to **Emission** and set **Intensity** to 17000 **Lumen** to represent two 8500 Lumen light bulbs.
3. In the **Emission**, select the More menu (&#8942;) and enable [additional properties](expose-all-additional-properties.md).
3. In the **Emission**, select the More menu (&#8942;) and enable [additional properties](https://docs.unity3d.com/Packages/[email protected]/manual/advanced-properties.html).
4. Enable **Reflector** checkbox. This simulates a reflective surface behind the spot Light to adjust the visual intensity.

9. Make the light bulb Material emissive:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

To create foam on a water surface near a GameObject, follow these steps:

1. In the **Hierarchy** window, open the context menu (right-click) and select **Water > Surface**, then create a water surface.
1. In the **Hierarchy** window, open the context menu (right-click) and select **Water** > **Surface**, then create a water surface.

1. In the **Inspector** window of the water surface, in the **Water decals** section, enable **Foam**.
1. In the **Inspector** window of the water surface, in the **Water Decals** section, enable **Foam**.

1. In the **Hierarchy** window, right-click a GameObject and select **Water > Surface > Water decal**.
1. In the **Hierarchy** window, right-click a GameObject and select **Water** > **Surface** > **Water Decal**.

The new water decal is now a child of the GameObject.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,4 @@ sealed class GrayScaleEditor : VolumeComponentEditor
}
```

This custom editor isn't useful as it produces the same result as the editor that Unity creates. Custom Volume component editors also support an [additonal properties toggle](expose-all-additional-properties.md). To add it, you have to set the `hasAdvancedMode` override to true. Then, inside `OnInspectorGUI`, you can use the `isInAdvancedMode` Boolean to display more properties.
This custom editor isn't useful as it produces the same result as the editor that Unity creates. Custom Volume component editors also support an [additonal properties toggle](https://docs.unity3d.com/Packages/[email protected]/manual/advanced-properties.html). To add it, you have to set the `hasAdvancedMode` override to true. Then, inside `OnInspectorGUI`, you can use the `isInAdvancedMode` Boolean to display more properties.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

To enable mask and current water decals, follow these steps:

1. Go to **Edit** > **Project Settings**.
1. In the main menu, go to **Edit** > **Project Settings**.

1. In the **Project Settings** window, select the **Graphics** tab and enable **Enable Mask and Current Water Decals** in the **Water System** section.
1. In the **Project Settings** window, go to **Graphics**, and enable **Enable Mask and Current Water Decals** in the **Water System** section.
Loading