Skip to content

Commit 4b87e7e

Browse files
sebastienlagardeJulienIgnace-Unityadrien-de-tocquevilleFrancescoC-unityJordanL8
authored
Merge 7.x.x/hd/staging (#2635)
* Added a warning when trying to bake with static lighting being in an invalid state. * Fix light resolution scalable settings in the Light Explorer #2470 * Better tooltip for exposure weight on emission fields. #1821 * Fix rendering of custom passes in the Custom Pass Volume inspector #1824 * Updated the implementation details for pb sky (#1872) * Add disclaimer about object motion vectors not working in the scene view (#1900) * Update Render-Pipeline-Debug-Window.md * Update Render-Pipeline-Debug-Window.md * Fix double addition to sorted volume lists #1916 * fix case 1244430 removing camera comp from prefab #1953 * Fix nan in the pbr sky #1983 * [HDRP][LookDev] Ensure stylesheet are loaded before applying them on Domain Reload (#1985) * Fix Custom Post Process affecting preview cameras #1988 * Fix matcap preferences serialization issue #2013 * Remove XRSystemTests #2241 * HDRP - Fix XR shadows culling #2263 * Adding support for CloudRendering to HDRP #2436 * Fix volument component creation via script #2369 * [Backport 7.x.x] Fix issue with previous frame exposure texture being not null, but containing garbage (#2620) * Fix * Changelog Co-authored-by: sebastienlagarde <[email protected]> * [Backport 7.x.x] Fixed error Maximum allowed thread group count is 65535 when resolution is very high (#2622) * Fix * changelog Co-authored-by: sebastienlagarde <[email protected]> Co-authored-by: JulienIgnace-Unity <[email protected]> Co-authored-by: Adrien de Tocqueville <[email protected]> Co-authored-by: FrancescoC-unity <[email protected]> Co-authored-by: JordanL8 <[email protected]> Co-authored-by: Martin Thorzen <[email protected]> Co-authored-by: jenniferd-unity <[email protected]> Co-authored-by: Antoine Lelievre <[email protected]> Co-authored-by: Fabien Houlmann <[email protected]> Co-authored-by: Andrew Spiering <[email protected]>
1 parent 42ba491 commit 4b87e7e

File tree

23 files changed

+149
-137
lines changed

23 files changed

+149
-137
lines changed

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

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -216,24 +216,48 @@ event Action IViewDisplayer.OnUpdateRequested
216216
StyleSheet styleSheet = null;
217217
StyleSheet styleSheetLight = null;
218218

219-
void OnEnable()
219+
void ReloadStyleSheets()
220220
{
221-
//Stylesheet
222-
// Try to load stylesheet. Timing can be odd while upgrading packages (case 1219692).
223-
// In this case, it will be fixed in OnGUI. Though it can spawn error while reimporting assets.
224-
// Waiting for filter on stylesheet (case 1228706) to remove last error.
225-
if (styleSheet == null || styleSheet.Equals(null))
221+
if(styleSheet == null || styleSheet.Equals(null))
226222
{
227223
styleSheet = AssetDatabase.LoadAssetAtPath<StyleSheet>(Style.k_uss);
228-
if (styleSheet != null && !styleSheet.Equals(null))
229-
rootVisualElement.styleSheets.Add(styleSheet);
224+
if(styleSheet == null || styleSheet.Equals(null))
225+
{
226+
//Debug.LogWarning("[LookDev] Could not load Stylesheet.");
227+
return;
228+
}
230229
}
231-
if (!EditorGUIUtility.isProSkin && styleSheetLight != null && !styleSheetLight.Equals(null))
230+
231+
if(!rootVisualElement.styleSheets.Contains(styleSheet))
232+
rootVisualElement.styleSheets.Add(styleSheet);
233+
234+
//Additively load Light Skin
235+
if(!EditorGUIUtility.isProSkin)
232236
{
233-
styleSheetLight = AssetDatabase.LoadAssetAtPath<StyleSheet>(Style.k_uss_personal_overload);
234-
if (styleSheetLight != null && !styleSheetLight.Equals(null))
237+
if(styleSheetLight == null || styleSheetLight.Equals(null))
238+
{
239+
styleSheetLight = AssetDatabase.LoadAssetAtPath<StyleSheet>(Style.k_uss_personal_overload);
240+
if(styleSheetLight == null || styleSheetLight.Equals(null))
241+
{
242+
//Debug.LogWarning("[LookDev] Could not load Light skin.");
243+
return;
244+
}
245+
}
246+
247+
if(!rootVisualElement.styleSheets.Contains(styleSheetLight))
235248
rootVisualElement.styleSheets.Add(styleSheetLight);
236249
}
250+
}
251+
252+
void OnEnable()
253+
{
254+
//Stylesheet
255+
// Try to load stylesheet. Timing can be odd while upgrading packages (case 1219692).
256+
// In this case, it will be fixed in OnGUI. Though it can spawn error while reimporting assets.
257+
// Waiting for filter on stylesheet (case 1228706) to remove last error.
258+
// On Editor Skin change, OnEnable is called and stylesheets need to be reloaded (case 1278802).
259+
if(EditorApplication.isUpdating)
260+
ReloadStyleSheets();
237261

238262
//Call the open function to configure LookDev
239263
// in case the window where open when last editor session finished.
@@ -681,14 +705,11 @@ void OnGUI()
681705
// rootVisualElement.styleSheets.Add(styleSheetLight);
682706
//}
683707
}
684-
else
685-
{
686-
//deal with missing style when domain reload...
687-
if (!rootVisualElement.styleSheets.Contains(styleSheet))
688-
rootVisualElement.styleSheets.Add(styleSheet);
689-
if (!EditorGUIUtility.isProSkin && !rootVisualElement.styleSheets.Contains(styleSheetLight))
690-
rootVisualElement.styleSheets.Add(styleSheetLight);
691-
}
708+
if(EditorApplication.isUpdating)
709+
return;
710+
711+
//deal with missing style on domain reload...
712+
ReloadStyleSheets();
692713

693714
// [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
694715
// Note: After an editor reload, we might get a null OnUpdateRequestedInternal and null SRP for a couple of frames, hence the check.

com.unity.render-pipelines.core/Runtime/Volume/VolumeManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ public void Register(Volume volume, int layer)
124124
// Look for existing cached layer masks and add it there if needed
125125
foreach (var kvp in m_SortedVolumes)
126126
{
127-
if ((kvp.Key & (1 << layer)) != 0)
127+
// We add the volume to sorted lists only if the layer match and if it doesn't contain the volume already.
128+
if ((kvp.Key & (1 << layer)) != 0 && !kvp.Value.Contains(volume))
128129
kvp.Value.Add(volume);
129130
}
130131

com.unity.render-pipelines.core/Runtime/Volume/VolumeProfile.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ public VolumeComponent Add(Type type, bool overrides = false)
7575
throw new InvalidOperationException("Component already exists in the volume");
7676

7777
var component = (VolumeComponent)CreateInstance(type);
78+
#if UNITY_EDITOR
79+
component.hideFlags = HideFlags.HideInInspector | HideFlags.HideInHierarchy;
80+
component.name = type.Name;
81+
#endif
7882
component.SetAllOverridesTo(overrides);
7983
components.Add(component);
8084
isDirty = true;

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,26 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [7.5.2] - 2020-09-14
88

9+
### Added
10+
- Added a warning when trying to bake with static lighting being in an invalid state.
11+
912
### Fixed
1013
- Fixed a null ref exception when baking reflection probes.
14+
- Fixed shadow resolution settings level in the light explorer.
15+
- Fixed rendering of custom passes in the Custom Pass Volume inspector
16+
- Fixed issue with volume manager trying to access a null volume.
17+
- Fixed an issue that caused a null reference when deleting camera component in a prefab. (case 1244430)
18+
- Fixed nan in pbr sky
19+
- Fixed Light skin not properly applied on the LookDev when switching from Dark Skin (case 1278802)
20+
- Fixed Custom Post Processes affecting preview cameras.
21+
- Fixed serialization issue with matcap scale intensity.
22+
- Fixed XR shadows culling
23+
- Fixed volument component creation via script.
24+
- Fixed issue with exposure history being uninitialized on second frame.
25+
- Fixed error Maximum allowed thread group count is 65535 when resolution is very high.
26+
27+
### Changed
28+
- Removed XRSystemTests. The GC verification is now done during playmode tests (case 1285012).
1129

1230
## [7.5.1] - 2020-09-02
1331

com.unity.render-pipelines.high-definition/Documentation~/Override-Physically-Based-Sky.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ To make this section visible, disable **Earth Preset**.
106106

107107
This sky type is a practical implementation of the method outlined in the paper [Precomputed Atmospheric Scattering](http://www-ljk.imag.fr/Publications/Basilic/com.lmc.publi.PUBLI_Article@11e7cdda2f7_f64b69/article.pdf) (Bruneton and Neyret, 2008).
108108

109-
This technique assumes that you always view the Scene from above the surface of the planet. This means that if you go below the planet's surface, the sky renders black. Where the surface of the planet is depends on whether you enable or disable **Spherical Mode**:
109+
This technique assumes that you always view the Scene from above the surface of the planet. This means that if a camera goes below the planet's surface, the sky renders as it would do if the camera was at ground level. Where the surface of the planet is depends on whether you enable or disable **Spherical Mode**:
110110

111111
* If you enable **Spherical Mode**, the **Planetary Radius** and **Planet Center Position** properties define where the surface is. In this mode, the surface is at the distance set in **Planetary Radius** away from the position set in **Planet Center Position**.
112112
* Otherwise, the **Sea Level** property defines where the surface is. In this mode, the surface stretches out infinitely on the xz plane and **Sea Level** sets its world space height.

com.unity.render-pipelines.high-definition/Documentation~/Render-Pipeline-Debug-Window.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ The **Rendering** panel has tools that you can use to visualize various HDRP ren
140140

141141
| **Debug Option** | **Description** |
142142
| ----------------------------- | ------------------------------------------------------------ |
143-
| **Fullscreen Debug Mode** | Use the drop-down to select a rendering mode to display as an overlay on the screen.<br/>&#8226; **Motion Vectors**: Select this option to display motion vectors.<br/>&#8226; **NaN Tracker**: Select this option to display an overlay that highlights [NaN](<https://en.wikipedia.org/wiki/NaN>) values. |
143+
| **Fullscreen Debug Mode** | Use the drop-down to select a rendering mode to display as an overlay on the screen.<br/>&#8226; **Motion Vectors**: Select this option to display motion vectors. Note that object motion vectors are not visible in the Scene view.<br/>&#8226; **NaN Tracker**: Select this option to display an overlay that highlights [NaN](<https://en.wikipedia.org/wiki/NaN>) values. |
144144
| **MipMaps** | Use the drop-down to select a mipmap streaming property to debug.<br/>&#8226; **None**: Select this option to disable this debug feature.<br/>&#8226; **MipRatio**: Select this option to display a heat map of pixel to texel ratio. A blue tint represents areas with too little Texture detail (the Texture is too small). A bed tint represents areas with too much Texture detail (the Texture is too large for the screen area). If the debugger shows the original colour for a pixel, this means that the level of detail is just right.<br/>&#8226; **MipCount**: Select this option to display mip count as grayscale from black to white as the number of mips increases (for up to 14 mips, or 16K size). Red inidates Textures with more than 14 mips. Magenta indicates Textures with 0 mips or that the Shader does not support mip count.<br/>&#8226; **MipCountReduction**: Select this option to display the difference between the current mip count and the original mip count as a green scale. A brighter green represents a larger reduction (that mip streaming saves more Texture memory). Magenta means that the debugger does not know the original mip count.<br/>&#8226; **StreamingMipBudget**: Select this option to display the mip status due to streaming budget. Green means that streaming Textures saves some memory. Red means that mip levels are lower than is optimal, due to full Texture memory budget. White means that streaming Textures saves no memory.<br/>&#8226; **StreamingMip**: Select this option to display the same information as **StreamingMipBudget**, but to apply the colors to the original Textures. |
145145
| **- Terrain Texture** | Use the drop-down to select the terrain Texture to debug the mipmap for. This property only appears when you select an option other than **None** from the **MipMaps** drop-down. |
146146
| **Color Picker - Debug Mode** | Use the drop-down to select the format of the color picker display. |

com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightExplorerExtension.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ protected virtual LightingExplorerTableColumn[] GetHDLightColumns()
426426
var shadowResolution = lightData.shadowResolution;
427427

428428
EditorGUI.BeginChangeCheck();
429-
var (level, useOverride) = SerializedScalableSettingValueUI.LevelFieldGUI(r, GUIContent.none, ScalableSettingSchema.GetSchemaOrNull(ScalableSettingSchemaId.With3Levels), shadowResolution.level, shadowResolution.useOverride);
429+
var (level, useOverride) = SerializedScalableSettingValueUI.LevelFieldGUI(r, GUIContent.none, ScalableSettingSchema.GetSchemaOrNull(ScalableSettingSchemaId.With4Levels), shadowResolution.level, shadowResolution.useOverride);
430430
if (EditorGUI.EndChangeCheck())
431431
{
432432
Undo.RecordObject(lightData, "Changed contact shadow resolution");

com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/DecalSurfaceInputsUIBlock.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class Styles
3434
public static GUIContent useEmissionIntensityText = new GUIContent("Use Emission Intensity", "When enabled, this Material separates emission color and intensity. This makes the Emission Map into an LDR color and exposes the Emission Intensity property.");
3535
public static GUIContent emissionMapText = new GUIContent("Emission Map", "Specifies a map (RGB) that the Material uses for emission.");
3636
public static GUIContent emissiveIntensityText = new GUIContent("Emission Intensity", "Sets the overall strength of the emission effect.");
37-
public static GUIContent emissiveExposureWeightText = new GUIContent("Exposure weight", "Control the percentage of emission to expose.");
37+
public static GUIContent emissiveExposureWeightText = new GUIContent("Exposure weight", "Controls how the camera exposure influences the perceived intensity of the emissivity. A weight of 0 means that the emissive intensity is calculated ignoring the exposure; increasing this weight progressively increases the influence of exposure on the final emissive value.");
3838

3939
public static GUIContent[] maskMapText =
4040
{

com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/EmissionUIBlock.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class Styles
2727
public static GUIContent useEmissiveIntensityText = new GUIContent("Use Emission Intensity", "Specifies whether to use to a HDR color or a LDR color with a separate multiplier.");
2828
public static GUIContent emissiveIntensityText = new GUIContent("Emission Intensity", "");
2929
public static GUIContent emissiveIntensityFromHDRColorText = new GUIContent("The emission intensity is from the HDR color picker in luminance", "");
30-
public static GUIContent emissiveExposureWeightText = new GUIContent("Exposure weight", "Control the percentage of emission to expose.");
30+
public static GUIContent emissiveExposureWeightText = new GUIContent("Exposure weight", "Controls how the camera exposure influences the perceived intensity of the emissivity. A weight of 0 means that the emissive intensity is calculated ignoring the exposure; increasing this weight progressively increases the influence of exposure on the final emissive value.");
3131

3232
public static GUIContent UVEmissiveMappingText = new GUIContent("Emission UV mapping", "");
3333
public static GUIContent texWorldScaleText = new GUIContent("World Scale", "Sets the tiling factor HDRP applies to Planar/Trilinear mapping.");

com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraEditor.cs

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,32 @@ public void RemoveComponent(Camera camera, IEnumerable<Component> dependencies)
7777
return;
7878
}
7979

80-
Undo.SetCurrentGroupName("Remove HD Camera");
81-
var additionalCameraData = camera.GetComponent<HDAdditionalCameraData>();
82-
if (additionalCameraData)
80+
var isAssetEditing = EditorUtility.IsPersistent(camera);
81+
try
8382
{
84-
Undo.DestroyObjectImmediate(additionalCameraData);
83+
if (isAssetEditing)
84+
{
85+
AssetDatabase.StartAssetEditing();
86+
}
87+
88+
Undo.SetCurrentGroupName("Remove HD Camera");
89+
var additionalCameraData = camera.GetComponent<HDAdditionalCameraData>();
90+
if (additionalCameraData != null)
91+
{
92+
Undo.DestroyObjectImmediate(additionalCameraData);
93+
}
94+
95+
Undo.DestroyObjectImmediate(camera);
96+
}
97+
finally
98+
{
99+
if (isAssetEditing)
100+
{
101+
AssetDatabase.StopAssetEditing();
102+
}
85103
}
86-
Undo.DestroyObjectImmediate(camera);
87104
}
88-
105+
89106
[MenuItem("CONTEXT/Camera/Reset", false, 0)]
90107
static void ResetCamera(MenuCommand menuCommand)
91108
{

0 commit comments

Comments
 (0)