Skip to content

Commit 2320588

Browse files
Hd/fix framesettings ordering (#5323)
* Fix strange entry in the FrameSettings and add comments for better readability * Update CHANGELOG.md Co-authored-by: JulienIgnace-Unity <[email protected]>
1 parent 0f55c10 commit 2320588

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
366366
- Fixed an issue that clamped the volumetric clouds offset value (case 1357318).
367367
- Fixed the volumetric clouds having no control over the vertical wind (case 1354920).
368368
- Fixed case where the SceneView don't refresh when using LightExplorer with a running and Paused game (1354129)
369+
- Fixed wrong ordering in FrameSettings (Normalize Reflection Probes)
369370

370371
### Changed
371372
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard

com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/FrameSettingsUI.Drawers.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,11 @@ static internal void Drawer_SectionLightingSettings(SerializedFrameSettings seri
266266
area.AmmendInfo(FrameSettingsField.Volumetrics, ignoreDependencies: true);
267267
area.AmmendInfo(FrameSettingsField.ReprojectionForVolumetrics, ignoreDependencies: true);
268268
area.AmmendInfo(FrameSettingsField.TransparentSSR, ignoreDependencies: true);
269+
270+
//TODO: Remove hideUI when out of experimental. I don't like hideUI it make things more difficult to add a FrameSettings at a given position.
271+
// This should not be used except for experimental stuff (it is not compliant with the remaining of UX flows anyway)
269272
area.AmmendInfo(FrameSettingsField.ProbeVolume, hideInUI: !HDRenderPipelineGlobalSettings.Ensure().supportProbeVolumes);
273+
area.AmmendInfo(FrameSettingsField.NormalizeReflectionProbeWithProbeVolume, hideInUI: !HDRenderPipelineGlobalSettings.Ensure().supportProbeVolumes);
270274

271275
area.AmmendInfo(
272276
FrameSettingsField.SssQualityMode,

com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/OverridableFrameSettingsArea.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,18 @@ public static OverridableFrameSettingsArea GetGroupContent(int groupIndex, Frame
100100
return area;
101101
}
102102

103+
/// <summary>
104+
/// Ammend the info on a FrameSettings drawer in the generation process.
105+
/// </summary>
106+
/// <param name="field">Targeted FrameSettings.</param>
107+
/// <param name="overrideable">Override the method used to say if it will be overrideable or not. If not, the left checkbox will not be drawn.</param>
108+
/// <param name="ignoreDependencies">Ignore the dependencies when checking if this is overrideable. (Normally, only work if dependency is enabled).</param>
109+
/// <param name="customGetter">Custom method to get the value. Usefull for non boolean FrameSettings.</param>
110+
/// <param name="customSetter">Custom method to set the value. Usefull for non boolean FrameSettings.</param>
111+
/// <param name="overridedDefaultValue">Modify the default value displayed when override is disabled.</param>
112+
/// <param name="labelOverride">Override the given label with this new one.</param>
113+
/// <param name="hasMixedValues">Override the miltiple different state manually. Usefull when using customGetter and customSetter. This is static on the Editor run. But Editor is reconstructed if selection change so it should be ok.</param>
114+
/// <param name="hideInUI">/!\ WARNING: Use with caution. Should not be used with current UX flow. Only usage should be really special cases.</param>
103115
public void AmmendInfo(FrameSettingsField field, Func<bool> overrideable = null, bool ignoreDependencies = false, Func<object> customGetter = null, Action<object> customSetter = null, object overridedDefaultValue = null, string labelOverride = null, bool hasMixedValues = false, bool hideInUI = false)
104116
{
105117
var matchIndex = fields.FindIndex(f => f.field == field);

com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/FrameSettings.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public enum FrameSettingsField
106106
/// <summary>No Frame Settings.</summary>
107107
None = -1,
108108

109-
//rendering settings from 0 to 19
109+
//rendering settings (group 0)
110110
/// <summary>Specifies the Lit Shader Mode for Cameras using these Frame Settings use to render the Scene.</summary>
111111
[FrameSettingsField(0, autoName: LitShaderMode, type: FrameSettingsFieldAttribute.DisplayType.BoolAsEnumPopup, targetType: typeof(LitShaderMode), customOrderInGroup: 0, tooltip: "Specifies the Lit Shader Mode for Cameras using these Frame Settings use to render the Scene (Depends on \"Lit Shader Mode\" in current HDRP Asset).")]
112112
LitShaderMode = 0,
@@ -258,7 +258,7 @@ public enum FrameSettingsField
258258
[FrameSettingsField(0, autoName: MaterialQualityLevel, type: FrameSettingsFieldAttribute.DisplayType.Others, tooltip: "The material quality level to use.")]
259259
MaterialQualityLevel = 66,
260260

261-
//lighting settings: 20-39, 46-49
261+
//lighting settings (group 1)
262262
/// <summary>When enabled, Cameras using these Frame Settings render shadows.</summary>
263263
[FrameSettingsField(1, autoName: ShadowMaps, customOrderInGroup: 1, tooltip: "When enabled, Cameras using these Frame Settings render shadows.")]
264264
ShadowMaps = 20,
@@ -337,7 +337,13 @@ public enum FrameSettingsField
337337
[FrameSettingsField(1, autoName: DirectSpecularLighting, tooltip: "When enabled, Cameras that use these Frame Settings render Direct Specular lighting. This is a useful Frame Setting to use for baked Reflection Probes to remove view dependent lighting.")]
338338
DirectSpecularLighting = 38,
339339

340-
//async settings from 40 to 59
340+
/// <summary>When enabled, HDRP uses probe volumes for baked lighting.</summary>
341+
[FrameSettingsField(1, customOrderInGroup: 3, autoName: ProbeVolume, tooltip: "Enable to debug and make HDRP process Probe Volumes. Enabling this feature causes HDRP to process Probe Volumes for this Camera/Reflection Probe.")]
342+
ProbeVolume = 127,
343+
[FrameSettingsField(1, customOrderInGroup: 4, displayedName: "Normalize Reflection Probes", positiveDependencies: new[] { ProbeVolume })]
344+
NormalizeReflectionProbeWithProbeVolume = 126,
345+
346+
//async settings (group 2)
341347
/// <summary>When enabled, HDRP executes certain Compute Shader commands in parallel. This only has an effect if the target platform supports async compute.</summary>
342348
[FrameSettingsField(2, displayedName: "Asynchronous Execution", tooltip: "When enabled, HDRP executes certain Compute Shader commands in parallel. This only has an effect if the target platform supports async compute.")]
343349
AsyncCompute = 40,
@@ -357,7 +363,7 @@ public enum FrameSettingsField
357363
[FrameSettingsField(2, displayedName: "Volume Voxelizations", positiveDependencies: new[] { AsyncCompute }, tooltip: "When enabled, HDRP calculates volumetric voxelization asynchronously.")]
358364
VolumeVoxelizationsAsync = 45,
359365

360-
//lightLoop settings from 120 to 127
366+
//lightLoop settings (group 3)
361367
/// <summary>When enabled, HDRP uses FPTL for forward opaque.</summary>
362368
[FrameSettingsField(3, autoName: FPTLForForwardOpaque, tooltip: "When enabled, HDRP uses FPTL for forward opaque.")]
363369
FPTLForForwardOpaque = 120,
@@ -376,11 +382,6 @@ public enum FrameSettingsField
376382
/// <summary>When enabled, HDRP uses material variant classification to compute lighting.</summary>
377383
[FrameSettingsField(3, autoName: ComputeMaterialVariants, positiveDependencies: new[] { DeferredTile }, tooltip: "When enabled, HDRP uses material variant classification to compute lighting.")]
378384
ComputeMaterialVariants = 125,
379-
/// <summary>When enabled, HDRP uses probe volumes for baked lighting.</summary>
380-
[FrameSettingsField(1, customOrderInGroup: 3, autoName: ProbeVolume, tooltip: "Enable to debug and make HDRP process Probe Volumes. Enabling this feature causes HDRP to process Probe Volumes for this Camera/Reflection Probe.")]
381-
ProbeVolume = 127,
382-
[FrameSettingsField(1, customOrderInGroup: 4, displayedName: "Normalize Reflection Probes", positiveDependencies: new[] { ProbeVolume })]
383-
NormalizeReflectionProbeWithProbeVolume = 126,
384385

385386
//only 128 booleans saved. For more, change the BitArray used
386387
}

0 commit comments

Comments
 (0)