Skip to content

Commit 2e579c5

Browse files
sebastienlagardeanisunityremi-chapelainJulienIgnace-UnityJordanL8
authored
[7.x.x] Merge 7.x.x/hd/staging (#512)
* [7.x.x Backport] Fixed a weird behavior in the scalable settings drawing when the space becomes tiny (1212045). (#6507) * - Fixed a weird behavior in the scalable settings drawing when the space becomes tiny (1212045). * Small fix to avoid text overlapping too much Co-authored-by: Remi Chapelain <[email protected]> * Fixed an usage of a a compute buffer not bound (1229964) (#28) Co-authored-by: Anis <[email protected]> * Removed wrongly serialized fields in StaticLightingSky (#6441) * Fix issues in the post process system with RenderTexture being invalid in some cases. Causing rendering problems. #6480 * Update PostProcessSystem.cs * Fixed an issue where changing the default volume profile from another inspector would not update the default volume editor. #6493 * Hdrp/docs/glossary f number (#6523) * Update Glossary.md * Update Glossary.md * Clamp probes compression factor to 0 (#19) * path validation when creating new volume profile (#36) * [Backport 7.x.x] Fix various leaks in HDRP (#120) * Fixed a number of leak in HDRP # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.cs # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs * Update changelog * [7.x.x backport] Follow references when deleting unloading unused assets on shader graph save (case 1230996) (#128) * Follow references when unloading unneeded assets * changelog Co-authored-by: sebastienlagarde <[email protected]> * [7.x.x Backport] Fixed an issue with the specularFGD term being used when the material has a clear coat (lit shader). (#21) * Fixed an issue with the specularFGD term being used when the material has a clear coat (lit shader). * update ssr screenshot Co-authored-by: sebastienlagarde <[email protected]> * d Fix MSAA resolve when there is no motion vectors #1 * Fix issues causing planar probes to be broken with multiple cameras in the scene #4 * Pospow and SG triplanar fix #40 * Hdrp/fix/custom pass msaa rendering info #42 * Added disocclusion and ghosting to the glossary (#75) * Update the scripting API for FrameSettings, FrameSettingsOverrideMask and IBitArray (#110) * fix switch shader compilation (#111) * Update SceneViewDrawMode.cs (#118) * Fix culling of reflection probes that change position #121 * Fix null reference when processing light probe #131 * Fix black screen in XR when HDRP package is present but not used #137 * Fix default volume profile collapse #138 * Fix for white flash happening when changing lighting condition (like teleport) #140 * Added baked GI rp support caveat and made setting shadow filter quality clearer for deferred high. (#145) * Update AxF-Shader.md (#152) * Bind missing buffer #159 * [Backport 7.x.x] Diffusion Profile and Material references in HDRP materials are now correctly exported to unity packages. (#179) * Added external references inside a material to diffusion profiles and materials in order to handle Material export to a package correctly. # Conflicts: # com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs * Update changelog * Catch and handle NRefactory parser exceptions #6392 * [7.x.x backport] Fix quality settings UI and shadow mask UI #122 (#123) * Update HDRenderPipeline.cs * Update HDRenderPipeline.cs * Update HDRenderPipeline.cs * Update CHANGELOG.md * fix typo * fix typo 2 * Fixed the indirect diffuse texture not being ignored when it should (ray tracing disabled). (#284) * [7.x.x Backport] Fix pre/post pass sg properties #82 (#85) * Fix depth pre/post passes not correctly enabled when switching shaders on the material # Conflicts: # com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitMasterNode.cs # com.unity.render-pipelines.high-definition/Editor/Material/Unlit/HDShaderGUI.cs # com.unity.render-pipelines.high-definition/Editor/ShaderGraph/HDSubShaderUtilities.cs * Hide prepass and postpass in the material UI # Conflicts: # com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs Co-authored-by: sebastienlagarde <[email protected]> * Fixed a performance issue with stochastic ray traced area shadows. (#306) Co-authored-by: sebastienlagarde <[email protected]> * [Backport 7.x.x] Updated raytracing async compute warning. (#304) * Made more explicit the warning about raytracing and asynchronous compute. Also fixed the condition in which it appears. * Update changelog Co-authored-by: sebastienlagarde <[email protected]> * [Backport 7.x.x] Fixed a null ref exception in static sky when the default volume profile is invalid. (#303) * Fixed a null ref exception in static sky when the default volume profile is invalid. * Update changelog * [Backport 7.x.x] Fixed an error about procedural sky being logged by mistake. (#307) * Fixed an error about procedural sky being logged by mistake. * Update changelog Co-authored-by: sebastienlagarde <[email protected]> * [Backport 7.x.x] Fix flickering lighting in the scene and game view when lookdev is open. (#379) * Fixed flickering of the game/scene view when lookdev is running. * Update changelog * [7.x.x Backport] Fix issue with ambient probe not being correct with OnEnable/OnDemand probes (#317) * render until ambient probe is ready * remove comment * changelog * [Backport 7.x.x] Fixed some gcalloc in the debug window (#464) * Fixed some GCAlloc in the debug window # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/Debug/VolumeDebug.cs * Update changelog * [Backport 7.x.x] Hdrp/small ui update (#466) * Removed logic in the UI to disable parameters for contact shadows and fog volume components as it was going against the concept of the volume system. # Conflicts: # com.unity.render-pipelines.high-definition/Editor/Lighting/Shadow/ContactShadowsEditor.cs # com.unity.render-pipelines.high-definition/Editor/Sky/AtmosphericScattering/FogEditor.cs * update changelog * [Backport 7.x.x] PBR Sky renderer now shares its internal precomputation table between different instances. (#482) * PBR Sky renderer now shares its internal precomputation table between different instances. # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyRenderer.cs * Doc update * Update changelog * [Backport 7.x.x] New tooltip for camera background and fixed exposure when switching the background mode. (#480) * Put more information in Camera background type tooltip and fixed inconsistent exposure behavior when changing bg type. # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs * Update changelog * [Backport 7.x.x] Fixed asset preview being rendered white because of static lighting sky. (#479) * Fixed an issue where asset preview could be rendered white because of static lighting sky. Also fixed an issue where static lighting was not updated when removing the static lighting sky profile. # Conflicts: # com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs * Update changelog * Changed UI name, tooltip, and doc for maximum decals on screen (#232) Implements feedback from https://fogbugz.unity3d.com/f/cases/1189618/ * Update Custom-Post-Process.md (#233) * Update HDRP-Features.md (#235) * Hdrp/reflection probe scale perf #252 * HD: Switch to 1920x1080 default standalone resolution (#279) Well, the default is "fullscreen desktop resolution" anyway, so this does not change anything at default settings. But, if user unchecks the "default native fullscreen", then it was going into 1024x768 on Standalone platform. Which was the most popular resolution back in year 2005. In year 2019, the 1920x1080 is the most popular, so make that the default. See also: https://ono.unity3d.com/unity/unity/pull-request/105219/_/desktop/default-res (moved https://github.cds.internal.unity3d.com/unity/com.unity.template-hd/pull/33 to this new repo) * Makes sure quaternion is normalized and valid before converting to ma… #331 * Fix cookie srgb #297 * Updated forward and deferred rendering definitions (#350) * Update Forward-And-Deferred-Rendering.md * Update Forward-And-Deferred-Rendering.md * Update Light-Component.md (#357) * Hd/add layer modification on generated emissive mesh for area light #364 * Update Look-Dev-Environment-Library.md (#365) * Update Volumetric-Lighting.md (#402) Fixes https://fogbugz.unity3d.com/f/cases/1238592 * Hd/fix nullref while removing decal component #416 * Fix issue with Uber Post process shader when alpha is enabled #422 * Fix the bug (#430) * Fix issue causing not all baked reflection probes to be deleted #441 * Updated Decal Projector doc (#477) Updated Limitations section and added a disclaimer about decal shader stripping. * Look Dev docs refactor 2 #484 * [7.x.x Backport] Fix issue with corrupted values with Layer Lit when using multiply mode for vertex color (#425) * Saturate vertex color to avoid negative values. * changelog Co-authored-by: sebastienlagarde <[email protected]> * Fix Motion Vectors written by transparent when rendering with MSAA #315 * Fix issue with the resolve of motion vectors (#421) * fix issue with ShowPrePassAndPostPass * fix compilation issue in rendergraph * Fixed null reference exception in LookDev when setting the SRP to None #447 * Check reflection probe null pointer before use. (case 1244047) #456 * Remove max atlas probe alloc size in HDRP asset (#458) * Fixed max alloc planar size not taking in account the max cache size * Removed the max cache clamp on texture atlases * Fix few multi-editing issues with Emission UI #473 * Re-enable cubemap thumbnail gen only for d3d11 #487 * Hd/fix undo environmentlibrary lookdev #490 * Added system requirements and frame settings api docs (#510) * Added system requirements and frame settings api doc * Update System-Requirements.md Co-authored-by: sebastienlagarde <[email protected]> Co-authored-by: anisunity <[email protected]> Co-authored-by: Remi Chapelain <[email protected]> Co-authored-by: Anis <[email protected]> Co-authored-by: JulienIgnace-Unity <[email protected]> Co-authored-by: JordanL8 <[email protected]> Co-authored-by: FrancescoC-unity <[email protected]> Co-authored-by: Adrien de Tocqueville <[email protected]> Co-authored-by: slunity <[email protected]> Co-authored-by: Antoine Lelievre <[email protected]> Co-authored-by: Remi Slysz <[email protected]> Co-authored-by: Pavlos Mavridis <[email protected]> Co-authored-by: Fabien Houlmann <[email protected]> Co-authored-by: victor <[email protected]> Co-authored-by: fredericv-unity3d <[email protected]> Co-authored-by: Aras Pranckevičius <[email protected]> Co-authored-by: Emmanuel Turquin <[email protected]> Co-authored-by: skhiat <[email protected]>
1 parent 414f735 commit 2e579c5

File tree

16 files changed

+316
-47
lines changed

16 files changed

+316
-47
lines changed

com.unity.render-pipelines.core/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1414
- Fixed copy/pasting of Volume Components when loading a new scene
1515
- Fix LookDev's camera button layout.
1616
- Fix LookDev's layout vanishing on domain reload.
17+
- Fixed null reference exception in LookDev when setting the SRP to one not implementing LookDev (case 1245086)
18+
- Fix LookDev's undo/redo on EnvironmentLibrary (case 1234725)
1719

1820
## [7.3.0] - 2020-03-11
1921

com.unity.render-pipelines.core/Editor/LookDev/Context.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,18 @@ internal bool HasLibraryAssetChanged(EnvironmentLibrary environmentLibrary)
264264

265265
return m_EnvironmentLibraryGUID != AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(environmentLibrary));
266266
}
267+
268+
internal void FullReimportEnvironmentLibrary()
269+
{
270+
if (environmentLibrary == null)
271+
return;
272+
273+
// refresh AssetDatabase in case of undo/redo creating/destructing environment subasset
274+
string libraryPath = AssetDatabase.GetAssetPath(environmentLibrary);
275+
AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(environmentLibrary), ImportAssetOptions.DontDownloadFromCacheServer | ImportAssetOptions.ForceSynchronousImport | ImportAssetOptions.ForceUpdate | ImportAssetOptions.ImportRecursive);
276+
UpdateEnvironmentLibrary(AssetDatabase.LoadAssetAtPath<EnvironmentLibrary>(libraryPath));
277+
EditorUtility.SetDirty(environmentLibrary);
278+
}
267279
}
268280

269281
/// <summary>

com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.EnvironmentLibrarySidePanel.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,5 +463,13 @@ void OnFocus()
463463
((IEnvironmentDisplayer)this).Repaint();
464464
}
465465
}
466+
467+
void FullRefreshEnvironmentList()
468+
{
469+
if (LookDev.currentContext.environmentLibrary != null)
470+
LookDev.currentContext.FullReimportEnvironmentLibrary();
471+
472+
((IEnvironmentDisplayer)this).Repaint();
473+
}
466474
}
467475
}

com.unity.render-pipelines.core/Editor/LookDev/DisplayWindow.cs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
using UnityEngine;
44
using UnityEngine.UIElements;
55

6+
using RenderPipelineManager = UnityEngine.Rendering.RenderPipelineManager;
7+
68
namespace UnityEditor.Rendering.LookDev
79
{
810
/// <summary>Interface that must implement the viewer to communicate with the compositor and data management</summary>
@@ -257,9 +259,15 @@ void OnEnable()
257259

258260
ApplyLayout(viewLayout);
259261
ApplySidePanelChange(layout.showedSidePanel);
262+
263+
Undo.undoRedoPerformed += FullRefreshEnvironmentList;
260264
}
261265

262-
void OnDisable() => OnClosedInternal?.Invoke();
266+
void OnDisable()
267+
{
268+
Undo.undoRedoPerformed -= FullRefreshEnvironmentList;
269+
OnClosedInternal?.Invoke();
270+
}
263271

264272
void CreateToolbar()
265273
{
@@ -680,6 +688,17 @@ void OnGUI()
680688
rootVisualElement.styleSheets.Add(styleSheetLight);
681689
}
682690

691+
// [case 1245086] Guard in case the SRP asset is set to null (or to a not supported SRP) when the lookdev window is already open
692+
// Note: After an editor reload, we might get a null OnUpdateRequestedInternal and null SRP for a couple of frames, hence the check.
693+
if (!LookDev.supported && OnUpdateRequestedInternal !=null)
694+
{
695+
// Print an error and close the Lookdev window (to avoid spamming the console)
696+
Debug.LogError($"LookDev is not supported by this Scriptable Render Pipeline: "
697+
+ (RenderPipelineManager.currentPipeline == null ? "No SRP in use" : RenderPipelineManager.currentPipeline.ToString()));
698+
LookDev.Close();
699+
return;
700+
}
701+
683702
OnUpdateRequestedInternal?.Invoke();
684703
}
685704
}

com.unity.render-pipelines.core/Editor/LookDev/EnvironmentLibrary.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,21 @@ public class EnvironmentLibrary : ScriptableObject
3232
/// <returns>The created Environment</returns>
3333
public Environment Add()
3434
{
35+
Undo.SetCurrentGroupName("Add Environment");
36+
int group = Undo.GetCurrentGroup();
37+
3538
Environment environment = ScriptableObject.CreateInstance<Environment>();
3639
environment.name = "New Environment";
3740
Undo.RegisterCreatedObjectUndo(environment, "Add Environment");
3841

42+
Undo.RecordObject(this, "Add Environment");
3943
environments.Add(environment);
4044

4145
// Store this new environment as a subasset so we can reference it safely afterwards.
4246
AssetDatabase.AddObjectToAsset(environment, this);
4347

48+
Undo.CollapseUndoOperations(group);
49+
4450
// Force save / refresh. Important to do this last because SaveAssets can cause effect to become null!
4551
EditorUtility.SetDirty(this);
4652
AssetDatabase.SaveAssets();
@@ -54,11 +60,16 @@ public Environment Add()
5460
/// <param name="index">Index where to remove Environment</param>
5561
public void Remove(int index)
5662
{
63+
Undo.SetCurrentGroupName("Remove Environment");
64+
int group = Undo.GetCurrentGroup();
65+
5766
Environment environment = environments[index];
5867
Undo.RecordObject(this, "Remove Environment");
5968
environments.RemoveAt(index);
6069
Undo.DestroyObjectImmediate(environment);
6170

71+
Undo.CollapseUndoOperations(group);
72+
6273
// Force save / refresh
6374
EditorUtility.SetDirty(this);
6475
AssetDatabase.SaveAssets();

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
8686
- VFX: Removed irrelevant queues in render queue selection from HDRP outputs
8787
- VFX: Motion Vector are correctly renderered with MSAA [Case 1240754](https://issuetracker.unity3d.com/product/unity/issues/guid/1240754/)
8888
- Fixed a cause of NaN when a normal of 0-length is generated (usually via shadergraph).
89+
- Fixed error when undo a Reflection Probe removal in a prefab instance. (case 1244047)
90+
- Fixed various multi-editing issues when changing Emission parameters.
91+
- Fixed issue that prevented cubemap thumbnails from rendering (only on D3D11 and Metal).
8992

9093
### Changed
9194
- Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Frame Settings Scripting API
2+
3+
In the High Definition Render Pipelines (HDRP), [Frame Settings](Frame-Settings.md) control how a rendering component, such as a [Camera](HDRP-Camera.md), [Reflection Probe](Reflection-Probe.md), or [Planar Reflection Probe](Planar-Reflection-Probe.md), renders a Scene. You can specify default Frame Settings for your entire Project and then override them for a particular rendering component. This means that each Frame Setting has a default value, set in the [HDRP Asset](HDRP-Asset.md), then each individual rendering component in your Scene can have an override for it. This is useful if you have lower priority rendering components that do not need to use certain effects. To specify which default Frame Settings a rendering component overrides, each rendering component contains an [override mask](../api/UnityEngine.Rendering.HighDefinition.FrameSettingsOverrideMask.html). A mask is an array of bits, where each bit represents one of two states (0 for disabled and 1 for enabled). Each bit in the override mask represents the override state of a particular Frame Setting.
4+
5+
To get the final value of a Frame Setting for a particular rendering component, HDRP performs the following steps:
6+
7+
1. Checks the Project-wide default value for the Frame Setting. In this step, HDRP checks the current value stored for the Frame Setting in the HDRP Asset.
8+
2. Checks the rendering component's override mask to see if the bit that corresponds to the Frame Setting is set. The state of the Frame Setting's bit in the override mask corresponds to the state of the override checkbox to the left of the Frame Setting in the rendering component's Inspector.
9+
3. Gets the Frame Setting's override value from the rendering component's custom Frame Settings.
10+
4. Sanitizes the result. To lighten your Project, you can specify which features to use in the HDRP Asset. If the Frame Setting you try to modify affects an unavailable feature, Unity discards it in this final sanitization pass. To make sure it is not possible for HDRP to process features that are not available, you cannot access the sanitization process via scripting API.
11+
12+
## Modifying default Frame Settings
13+
14+
The Default Frame Settings are in the HDRP Asset, so it is not good practice to modify them at runtime. Instead, you can modify them in Edit mode in [Default Settings tab](Default-Settings-Window.md).
15+
16+
Note that you can set individual default Frame Settings for three types of rendering component:
17+
18+
- Cameras
19+
- Realtime Reflection Probes and Realtime Planar Reflection Probes
20+
- Baked/custom Reflection Probes and Baked/custom Planar Reflection Probe
21+
22+
There is currently no scripting API to modify default Frame Settings.
23+
24+
## Modifying Frame Settings for a particular rendering component
25+
26+
HDRP stores the Frame Settings for rendering components in additional data components attached to the rendering component. The additional data components are:
27+
28+
| **Rendering component** | **Additional data component** |
29+
| ----------------------- | ----------------------------- |
30+
| **Camera** | HDAdditionalCameraData |
31+
| **Reflection Probe** | HDAdditionalReflectionData |
32+
33+
To modify the value of a Frame Setting, the first step is to get a reference to the additional data component. To do this, either create a public variable and assign it in the Inspector, or use [GetComponent<T>()](https://docs.unity3d.com/ScriptReference/GameObject.GetComponent.html) where T is the additional data component type.
34+
35+
Next, access the Frame Settings override mask. This controls which Frame Settings to use overridden values for and is of type `FrameSettingsOverrideMask`. Accessing the Frame Settings override mask is different depending on whether you want to modify the Frame Settings of a Camera or a Reflection Probe:
36+
37+
- **Camera**: `HDAdditionalCameraData.renderingPathCustomFrameSettingsOverrideMask`
38+
- **Reflection Probe**: `HDAdditionalReflectionData.frameSettingsOverrideMask`
39+
40+
For information on the API available for `FrameSettingsOverrideMask`, including how to set/unset a bit in the mask, see [FrameSettingsOverrideMask Scripting API](#framesettingsoverridemask-scripting-api).
41+
42+
Finally, access the Frame Settings structure itself. This controls the actual value for each Frame Setting and is of type `FrameSettings`. Accessing the Frame Settings is also different depending on whether you want to modify the Frame Settings of a Camera or a Reflection Probe:
43+
44+
- **Camera**: `HDAdditionalCameraData.renderingPathCustomFrameSettings`
45+
- **Reflection Probe**: `HDAdditionalReflectionData.frameSettings`
46+
47+
For information on the API available for `FrameSettings`, including how to edit the value of a Frame Setting, see [FrameSettings Scripting API](framesettings-scripting-api).
48+
49+
## Frame Setting enumerations
50+
51+
To make it easier to set the value of some Frame Settings, HDRP provides the following enum types.
52+
53+
### LitShaderMode
54+
55+
An enum which helps to switch a rendering component between deferred and forward rendering.
56+
57+
For information on what each enum value does, see [LitShaderMode](../api/UnityEngine.Rendering.HighDefinition.LitShaderMode.html).
58+
59+
### LODBiasMode
60+
61+
An enum which defines how HDRP calculates a LOD bias.
62+
63+
For information on what each enum value does, see [LODBiasMode](../api/UnityEngine.Rendering.HighDefinition.LODBiasMode.html).
64+
65+
### MaximumLODLevelMode
66+
67+
An enum which defines how HDRP calculates the maximum LOD level.
68+
69+
For information on what each enum value does, see [MaximumLODLevelMode](../api/UnityEngine.Rendering.HighDefinition.MaximumLODLevelMode.html).
70+
71+
### FrameSettingsField
72+
73+
An enum where each entry represents a particular Frame Setting. For a list of entries in this enum, see [FrameSettingsField](../api/UnityEngine.Rendering.HighDefinition.FrameSettingsField.html).
74+
75+
As well as an entry for each Frame Settings, this enum also includes the value `FrameSettingsField.None` that is set to **-1** for convenience and internal usage.
76+
77+
## FrameSettingsOverrideMask Scripting API
78+
79+
This is a structure that has a single field which stores the override mask. For more information about this structure and the API it contains, see [FrameSettingsOverrideMask](../api/UnityEngine.Rendering.HighDefinition.FrameSettingsOverrideMask.html).
80+
81+
In the override mask, to allow you to easily access the bit for a given Frame Setting, HDRP provides the [FrameSettingsField](#framesettingsfield) enum. You can use this, for example, to find the bit responsible for overriding the **Opaque Objects** Frame Setting. To do this, you would do `this[(int)FrameSettingsField.OpaqueObjects]`.
82+
83+
The following example shows how to compare the `humanizedData` from a rendering component's override mask with the rendering component's custom Frame Settings. There are some custom Frame Settings set, but the mask is all zeros which means that this rendering component uses the default Frame Settings.
84+
85+
![](Images/FrameSettingsAPI-watch.png)
86+
87+
## FrameSettings Scripting API
88+
89+
This is a structure that contains information on how a rendering component should render the Scene. For more information about this structure and the API it contains, see [FrameSettings](../api/UnityEngine.Rendering.HighDefinition.FrameSettings.html).
90+
91+
### Example
92+
93+
The following example demonstrates a component that changes a Camera's Frame Settings so the Camera does not render opaque GameObjects. It has the public field `cameraToChange`, which represents the Camera to change the Frame Settings for, and the public function `RemoveOpaqueObjectsFromRendering`, which contains the logic to change the Camera's Frame Settings.
94+
95+
```
96+
using UnityEngine;
97+
using UnityEngine.Rendering.HighDefinition;
98+
99+
public class ChangeFrameSettings : MonoBehaviour
100+
{
101+
public Camera cameraToChange;
102+
103+
public void RemoveOpaqueObjectsFromRendering()
104+
{
105+
HDAdditionalCameraData hdCameraData = cameraToChange.GetComponent<HDAdditionalCameraData>();
106+
107+
hdCameraData.renderingPathCustomFrameSettingsOverrideMask.mask[(int)FrameSettingsField.OpaqueObjects] = true;
108+
109+
hdCameraData.renderingPathCustomFrameSettings.SetEnabled(FrameSettingsField.OpaqueObjects, false);
110+
}
111+
}
112+
```
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Requirements and compatibility
2+
3+
This page contains information on system requirements and compatibility of the High Definition Render Pipeline (HDRP) package.
4+
5+
## Unity Editor compatibility
6+
7+
The following table shows the compatibility of the High Definition Render Pipeline (HDRP) versions with different Unity Editor versions.
8+
9+
| **Package version** | **Minimum Unity version** | **Maximum Unity version** |
10+
| ------------------- | ------------------------- | ------------------------- |
11+
| 10.x | 2020.2 | 2020.2 |
12+
| 8.x / 9.x-preview | 2020.1 | 2020.1 |
13+
| 7.x | 2019.3 | 2019.4 |
14+
| 6.x | 2019.2 | 2019.2 |
15+
16+
## Render pipeline compatibility
17+
18+
Projects made using HDRP are not compatible with the Universal Render Pipeline (URP) or the Built-in Render Pipeline. Before you start development, you must decide which render pipeline to use in your Project. For information on choosing a render pipeline, see the [Render Pipelines](https://docs.unity3d.com/2019.3/Documentation/Manual/render-pipelines.html) section of the Unity Manual.
19+
20+
## Unity Player system requirements
21+
22+
This section describes the HDRP package’s target platform requirements. For platforms or use cases not covered in this section, general system requirements for the Unity Player apply.
23+
24+
For more information, see [System requirements for Unity](https://docs.unity3d.com/Manual/system-requirements.html).
25+
26+
HRDP is only compatible with the following platforms:
27+
28+
- Windows and Windows Store, with DirectX 11 or DirectX 12 and Shader Model 5.0
29+
- Modern consoles (Sony PS4 and Microsoft Xbox One)
30+
- MacOS (minimum version 10.13) using Metal graphics
31+
- Linux and Windows platforms with Vulkan
32+
33+
**Note: HDRP only works on these platforms if the device used supports Compute Shaders. HDRP does not support OpenGL or OpenGL ES devices.**
34+
35+
### Ray tracing
36+
37+
To use ray tracing in HDRP, there are hardware requirements you must meet. For information on these requirements, see [Getting started with ray tracing](Ray-Tracing-Getting-Started.md#HardwareRequirements).

com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* [Features List](HDRP-Features)
44
* [Comparison with the Built-in Render Pipeline](Feature-Comparison)
55
* Getting started
6+
* [System Requirements](System-Requirements.md)
67
* [Getting Started with HDRP](Getting-started-with-HDRP)
78
* [Upgrading to HDRP](Upgrading-To-HDRP)
89
* [Render Pipeline Wizard](Render-Pipeline-Wizard)
@@ -152,5 +153,6 @@
152153
* [Creating a Custom Sky](Creating-a-Custom-Sky)
153154
* [Creating a Custom Post-Process Effect](Custom-Post-Process)
154155
* [Creating a Custom Render Pass](Custom-Pass)
156+
* [Editing Frame Settings at Runtime](Frame-Settings-API.md)
155157
* [HDRP Glossary](Glossary)
156158
* [Known Issues and How To Fix Them](Known-Issues)

0 commit comments

Comments
 (0)