Skip to content

Fix range for HDRP Asset settings #4978

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 81 commits into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
5945333
[HDRP] Fix AxF debug output in certain configurations (#4641)
pmavridis May 26, 2021
64a6c13
Fix SSR accumulation white flash (#4648)
FrancescoC-unity May 26, 2021
f49b710
Display Info Box when MSAA + ray tracing is onr (#4627)
FrancescoC-unity May 26, 2021
05cc16a
Fix distortion when resizing the window in player builds with the Gra…
pmavridis May 28, 2021
2325e3f
Add support for the camera bridge in the graphics compositor (#4599)
pmavridis May 28, 2021
c09379f
Merge branch 'master' into hd/bugfix
sebastienlagarde May 28, 2021
b5962c9
Fix Jittered Project Matrix Infinite Far Clip Plane (#4638)
johnpars May 29, 2021
77b6b7f
Fixed a memory leak related to not disposing of the RTAS at the end H…
anisunity May 29, 2021
bf941a9
Fix custom pass utils Blur + Copy overdraw. (#4623)
alelievr May 29, 2021
806dfbe
Fix draw procedural invalid pass idx 1 on first template load (#4632)
FrancescoC-unity May 29, 2021
88779ea
Changed light reset to preserve type (#4624)
adrien-de-tocqueville May 29, 2021
30fffd5
Revert "Add support for the camera bridge in the graphics compositor …
sebastienlagarde May 29, 2021
aabbb4b
AxF carpaint: Fix a compilation issue on Vulkan until the cpp HLSLcc …
slunity May 29, 2021
dfdb311
Revert "Revert "Add support for the camera bridge in the graphics com…
sebastienlagarde May 29, 2021
891fda0
revert: Fix distortion when resizing the window in player builds with…
sebastienlagarde May 29, 2021
7b17e06
Merge branch 'master' into hd/bugfix
sebastienlagarde May 29, 2021
32df1bf
Merge branch 'master' into hd/bugfix
sebastienlagarde May 29, 2021
8fd1108
Fixed the ray traced sub subsurface scattering debug mode not display…
anisunity May 29, 2021
0032b9c
Fix for discrepancies in saturation and intensity between screen spac…
FrancescoC-unity May 29, 2021
41716f0
Fix a Divide-by-Zero Warning for some Anisotropic Models (Fabric, Lit…
johnpars May 29, 2021
333c800
[HDRP] Fix VfX lit particle AOV output color space (#4646)
pmavridis May 29, 2021
809316c
[HDRP][Path Tracing] Fixed transparent unlit (#4605)
eturquin May 31, 2021
7b1ad29
Merge branch 'master' into hd/bugfix
sebastienlagarde May 31, 2021
08a578d
Fix distortion with MSAA (#4711)
sebastienlagarde May 31, 2021
3c418c0
Fix contact shadow debug views (#4720)
FrancescoC-unity May 31, 2021
352f65d
Update Decal-Projector.md (#4695)
adrien-de-tocqueville May 31, 2021
acc5073
[HDRP] Fixed nullref when deleting the texture asset assigned in a lo…
alelievr May 31, 2021
fd54a00
Merge branch 'master' into hd/bugfix
sebastienlagarde May 31, 2021
1672dc6
Fix decal layer enum (#4753)
sebastienlagarde Jun 2, 2021
c40c5c5
Fix typo
sebastienlagarde Jun 3, 2021
b443d6e
Fixed reflection probes being injected into the ray tracing light clu…
anisunity Jun 7, 2021
bc1d498
Ignore hybrid duplicated reflection probes during light baking (#4663)
adrien-de-tocqueville Jun 7, 2021
99bc6fd
Fix double sided option moving when toggling it in the material UI (#…
alelievr Jun 7, 2021
4a184af
Merge branch 'master' into hd/bugfix
sebastienlagarde Jun 7, 2021
d2368ba
Fix formatting
sebastienlagarde Jun 7, 2021
e5521be
Merge branch 'master' into hd/bugfix
sebastienlagarde Jun 7, 2021
97a953e
Fix volumetric fog in planar reflections (#4736)
FrancescoC-unity Jun 7, 2021
419850b
Fix motion blur compute dispatch size (#4737)
adrien-de-tocqueville Jun 7, 2021
fc7efde
- Updated the recursive rendering documentation (case 1338639). (#4759)
anisunity Jun 7, 2021
ca93d88
Fix issue with OnDemand directional shadow map being corrupted when r…
FrancescoC-unity Jun 7, 2021
c674c41
Fix cropping issue with the compositor camera bridge (#4802)
pmavridis Jun 7, 2021
e47a172
Fix for unused resources in depth of field (#4796)
Adrian1066 Jun 8, 2021
131d1cd
Merge branch 'master' into hd/bugfix
sebastienlagarde Jun 8, 2021
666d37f
Merge branch 'master' into hd/bugfix
sebastienlagarde Jun 9, 2021
61518ea
Removing the word Radii from exposure settings (#4854)
FrancescoC-unity Jun 9, 2021
85ebbc2
[HDRP][Path Tracing] Support for shadow mattes (#4745)
eturquin Jun 10, 2021
ad127f5
Revert "[HDRP][Path Tracing] Support for shadow mattes (#4745)"
sebastienlagarde Jun 10, 2021
2c08712
Fixed the transparent cutoff not working properly in semi-transparent…
anisunity Jun 10, 2021
83ddbed
Use non jittered projection in outline pass (#4836)
adrien-de-tocqueville Jun 10, 2021
2d9d391
[HDRP][Path Tracing] Sky settings now properly taken into account whe…
eturquin Jun 10, 2021
30cbb05
Fix Resolution Issues for Physically Based Depth of Field (#4848)
johnpars Jun 14, 2021
5c6b711
Fixed bug introduced by sky-for-recorder support. (#4906)
eturquin Jun 14, 2021
3cb7354
[Fogbugz 1341576] Memory leaks when the player is paused, and the use…
kecho Jun 15, 2021
1ee6c2d
Merge branch 'master' into hd/bugfix
sebastienlagarde Jun 16, 2021
7615d7b
[HDRP] Fixed shadergraph double save (#4916)
alelievr Jun 16, 2021
be0e48e
Merge master
sebastienlagarde Jun 16, 2021
30135ea
Write 0 instead of micro sized motion vectors + fix extremely fast ve…
FrancescoC-unity Jun 16, 2021
df51161
[HDRP] Fix material upgrader (#4821)
alelievr Jun 16, 2021
2bc152b
[HDRP] Fix custom pass volume not executed in scene view (#4860)
alelievr Jun 16, 2021
bac78c1
Merge branch 'master' of https://github.com/Unity-Technologies/Graphi…
JulienIgnace-Unity Jun 17, 2021
b0442c6
Fix reflection probe tootltip (#4890)
adrien-de-tocqueville Jun 17, 2021
51af23d
Updated the Physically Based Sky documentation for baked lights (#4891)
adrien-de-tocqueville Jun 17, 2021
7f5b564
Fixed remapping of depth pyramid debug (#4893)
JulienIgnace-Unity Jun 17, 2021
24b3ea9
Fix wobble-like (or tearing-like) SSAO issues when temporal reproject…
FrancescoC-unity Jun 17, 2021
3f2772b
Fix Asymmetric Projection Matrices and Fog / Pathtracing (#4926)
johnpars Jun 17, 2021
4d1c13c
Merge branch 'master' into hd/bugfix
sebastienlagarde Jun 17, 2021
0bc3a8b
Merge master
sebastienlagarde Jun 18, 2021
0833363
Revert: Fix wobble-like (or tearing-like) SSAO issues when temporal r…
sebastienlagarde Jun 18, 2021
b307e87
Merge branch 'master' into hd/bugfix
sebastienlagarde Jun 18, 2021
cf4b12c
Fix range for HDRP Asset settings
adrien-de-tocqueville Jun 28, 2021
2f4a545
Fix GBuffer depth debug mode (#5054)
adrien-de-tocqueville Jul 6, 2021
1772558
Fixed Volume Gizmo size when rescaling parent GameObject (#4915)
adrien-de-tocqueville Jul 8, 2021
d88d1eb
Fix Vertex Color Mode documentation (#4976)
adrien-de-tocqueville Jul 8, 2021
6692daf
Merge master
sebastienlagarde Jul 8, 2021
8ef3637
Fix wobble-like (or tearing-like) SSAO issues when temporal reproject…
FrancescoC-unity Jul 8, 2021
5dd669e
Fix formatting in NestedOverrideCameraRendering
sebastienlagarde Jul 8, 2021
c623adc
Merge branch 'hd/bugfix' into hd/hdrp-settings-fix
adrien-de-tocqueville Jul 9, 2021
7b35cbc
code doc
adrien-de-tocqueville Jul 9, 2021
925899d
Merge branch 'master' into hd/hdrp-settings-fix
sebastienlagarde Jul 12, 2021
129ec8d
Merge branch 'master' into hd/hdrp-settings-fix
adrien-de-tocqueville Jul 13, 2021
a3ae0f6
Merge branch 'master' into hd/hdrp-settings-fix
sebastienlagarde Jul 13, 2021
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
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed white flash with SSR when resetting camera history (case 1335263).
- Fixed VFX flag "Exclude From TAA" not working for some particle types.
- Fixed Dof and MSAA. DoF is now using the min depth of the per-pixel MSAA samples when MSAA is enabled. This removes 1-pixel ringing from in focus objects (case 1347291).
- Fixed parameter ranges in HDRP Asset settings.

### Changed
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public class Styles
// Fog
public static readonly GUIContent FogSettingsSubTitle = EditorGUIUtility.TrTextContent("Volumetric Fog");
public static readonly GUIContent FogSettingsBudget = EditorGUIUtility.TrTextContent("Volumetric Fog Budget");
public static readonly GUIContent FogSettingsRatio = EditorGUIUtility.TrTextContent("Volumetric Fog Ratio");
public static readonly GUIContent FogSettingsRatio = EditorGUIUtility.TrTextContent("Resolution Depth Ratio");

public static readonly GUIContent materialQualityLevelContent = EditorGUIUtility.TrTextContent("Default Material Quality Level", "");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,10 @@ static void Drawer_SectionShadows(SerializedHDRenderPipelineAsset serialized, Ed
{
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportShadowMask, Styles.supportShadowMaskContent);

EditorGUI.BeginChangeCheck();
EditorGUILayout.DelayedIntField(serialized.renderPipelineSettings.hdShadowInitParams.maxShadowRequests, Styles.maxRequestContent);
if (EditorGUI.EndChangeCheck())
serialized.renderPipelineSettings.hdShadowInitParams.maxShadowRequests.intValue = Mathf.Max(1, serialized.renderPipelineSettings.hdShadowInitParams.maxShadowRequests.intValue);

if (!serialized.renderPipelineSettings.supportedLitShaderMode.hasMultipleDifferentValues)
{
Expand Down Expand Up @@ -374,7 +377,11 @@ static void DrawLightShadow(
using (new EditorGUI.IndentLevelScope())
{
scalableSetting.ValueGUI<int>(Styles.shadowResolutionTiers);

EditorGUI.BeginChangeCheck();
EditorGUILayout.DelayedIntField(resolutionProperty, Styles.maxShadowResolution);
if (EditorGUI.EndChangeCheck())
resolutionProperty.intValue = Mathf.Max(1, resolutionProperty.intValue);

EditorGUILayout.LabelField(Styles.shadowLightAtlasSubTitle, EditorStyles.boldLabel);

Expand Down Expand Up @@ -689,14 +696,14 @@ static void Drawer_SectionVTSettings(SerializedHDRenderPipelineAsset serialized,
static void DrawDepthOfFieldQualitySetting(SerializedHDRenderPipelineAsset serialized, int tier)
{
{
EditorGUILayout.LabelField(Styles.nearBlurSubTitle);
EditorGUILayout.LabelField(Styles.nearBlurSubTitle, EditorStyles.miniLabel);
++EditorGUI.indentLevel;
{
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.NearBlurSampleCount.GetArrayElementAtIndex(tier), Styles.sampleCountQuality);
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.NearBlurMaxRadius.GetArrayElementAtIndex(tier), Styles.maxRadiusQuality);
}
--EditorGUI.indentLevel;
EditorGUILayout.LabelField(Styles.farBlurSubTitle);
EditorGUILayout.LabelField(Styles.farBlurSubTitle, EditorStyles.miniLabel);
++EditorGUI.indentLevel;
{
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.FarBlurSampleCount.GetArrayElementAtIndex(tier), Styles.sampleCountQuality);
Expand Down Expand Up @@ -864,8 +871,27 @@ static void Drawer_SectionRenderingUnsorted(SerializedHDRenderPipelineAsset seri
--EditorGUI.indentLevel;
}

EditorGUI.BeginChangeCheck();
serialized.renderPipelineSettings.lodBias.ValueGUI<float>(Styles.LODBias);
if (EditorGUI.EndChangeCheck())
{
for (var i = 0; i < serialized.renderPipelineSettings.lodBias.GetSchemaLevelCount(); ++i)
{
var prop = serialized.renderPipelineSettings.lodBias.values.GetArrayElementAtIndex(i);
prop.SetInline(Mathf.Max(0.01f, prop.GetInline<float>()));
}
}

EditorGUI.BeginChangeCheck();
serialized.renderPipelineSettings.maximumLODLevel.ValueGUI<int>(Styles.maximumLODLevel);
if (EditorGUI.EndChangeCheck())
{
for (var i = 0; i < serialized.renderPipelineSettings.maximumLODLevel.GetSchemaLevelCount(); ++i)
{
var prop = serialized.renderPipelineSettings.maximumLODLevel.values.GetArrayElementAtIndex(i);
prop.SetInline(Mathf.Clamp(prop.GetInline<int>(), 0, 7));
}
}

EditorGUILayout.Space(); //to separate with following sub sections
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ public bool TryGetLevelValue<T>(int level, out T value)
return false;
}
}

public int GetSchemaLevelCount()
{
var schema = ScalableSettingSchema.GetSchemaOrNull(new ScalableSettingSchemaId(schemaId.stringValue))
?? ScalableSettingSchema.GetSchemaOrNull(ScalableSettingSchemaId.With3Levels);

return schema.levelCount;
}
}

internal static class SerializedScalableSettingUI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public struct GlobalPostProcessSettings
/// </summary>
public const int k_MaxLutSize = 65;

[Range(k_MinLutSize, k_MaxLutSize)]
[SerializeField]
int m_LutSize;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,28 +172,35 @@ internal GlobalLightingQualitySettings()
internal static GlobalLightingQualitySettings NewDefault() => new GlobalLightingQualitySettings();

// SSAO
/// <summary>Ambient Occlusion step count for each quality level.</summary>
/// <summary>Ambient Occlusion step count for each quality level. The array must have one entry per scalable setting level, and elements must be between 2 and 32.</summary>
[Range(2, 32)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Range Attribut only work for inspector display.

You need to transform the field visibility and use a property to actually ensure we cannot go over ranges by scripts.

E.G.:

public int toto = 42;

should become

[Range(2, 64)]
[FormerlySerializedAs("toto")]
private int m_Toto = 42;

public int toto
{
    get => m_Toto;
    set 
    {
        m_Toto = Mathf.Clamp(value, 2, 64);
    }
}

Also, I never tried the attribute on an array. Have you tested it really clamp in the inspector for each cells? (being curious here)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the range tag works on an array, it's pretty cool.
For the property part, i don't see how to do that with array though, because i can't define a set/get on the array elements. I could change them to objects and use indexers, but that changes the way serialization works. I would get

AOStepCount:
    values: 200000000600000010000000

instead of

AOStepCount: 200000000600000010000000

which requires a migration and also breaks existing code accessing the values using serializedproperties, and I don't think there's a way around that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha yes. I don't see how we can do it nicely without migration nor reimplementing the array :/ So lets drop that for array for now. But then please add comments on the limitation in the documentation of these fields.


The good things to do would be to have the array private and an accessor method like

private int[] m_Toto;
public void SetToto(int index, int value); // can also check out of range
public int GetToto(int index); // can also check out of range

because here, even the size can be changed by script as we can reassign a whole new array and if I am not wrong, it seams that the size is driven by the mechanism here and not fully editable.
But doing this is a breaking API change :/ So I assume we don't go this way right now. (@JulienIgnace-Unity for awareness)


By the way, changing things for a SerializedProperty path is acceptable. It is not direct public API anyway but more a reflection like mechanism.

Copy link
Contributor Author

@adrien-de-tocqueville adrien-de-tocqueville Jul 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually there is kind of a way. It would require having both:

  • the array for serializing (but moved to private with [SerializedField])
  • a new public non serialized IntRangeParameter object, with indexer to preserve the API and the custom setter (I am not sure if that would be considered an API change though, do you know ?)
  • use the trick described here to copy the data from one to the other before and after serialization

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nevermind it wouldn't work, they would need to both have the same name

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well at this point you could go this way. But it is almost like reimplementing the array

public class ClassContainingArrayThatChangedRange
{
    [FormerlySerializedAs("toto")]
    [SerializedField]
    [Range(2, 64)]
    int[] m_Toto;
    
    public struct TotoAccessor
    {
        private ClassContainingArrayThatChangedRange reference;
        public int[int index]
        {
            get => reference.m_Toto[index];  //also check out of range
            set => reference.m_Toto[index] = Mathf.Clamp(value, 2, 64);  //also check out of range
        }
    
        public int length => reference.m_Toto.length;
        
        //any other relevant array API
        
        TotoStruct(ClassContainingArrayThatChangedRange encapsulatedClass)
            => reference = encapsulatedClass;
    }
    
    [System.NonSerialized]
    public TotoAccessor toto = new TotoAccessor(this); // or assign it in constructor
}

ISerializationCallbackReceiver have a small cost at each serialization/Deserialization. I am not sur of the usage of those array and I am pretty sur it only works on MonoBehaviour and we are in a custom class here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking API change are :

  • previous API deprecated or modified (hard change)
  • additional public API that don't modify what existed before (soft change)

Soft change are most of the time ok. In SemVer it would be in the minor update if we followed it completely. While Hard change require a deprecation plan and should only be in major change in SemVer.
Now that we are bound to unity version, it is realease management that define what is acceptable or not. I know they allowed soft changes in several cases so I assume it would be ok to do that without changing major unity version.

public int[] AOStepCount = new int[s_QualitySettingCount];
/// <summary>Ambient Occlusion uses full resolution buffer for each quality level.</summary>
/// <summary>Ambient Occlusion uses full resolution buffer for each quality level. The array must have one entry per scalable setting level.</summary>
public bool[] AOFullRes = new bool[s_QualitySettingCount];
/// <summary>Ambient Occlusion maximum radius for each quality level.</summary>
/// <summary>Ambient Occlusion maximum radius for each quality level. The array must have one entry per scalable setting level, and elements must be between 16 and 256.</summary>
[Range(16, 256)]
public int[] AOMaximumRadiusPixels = new int[s_QualitySettingCount];
/// <summary>Ambient Occlusion uses bilateral upsample for each quality level.</summary>
/// <summary>Ambient Occlusion uses bilateral upsample for each quality level. The array must have one entry per scalable setting level.</summary>
public bool[] AOBilateralUpsample = new bool[s_QualitySettingCount];
/// <summary>Ambient Occlusion direction count for each quality level.</summary>
/// <summary>Ambient Occlusion direction count for each quality level. The array must have one entry per scalable setting level, and elements must be between 1 and 6.</summary>
[Range(1, 6)]
public int[] AODirectionCount = new int[s_QualitySettingCount];

// Contact Shadows
/// <summary>Contact shadow sample count for each quality level.</summary>
/// <summary>Contact shadow sample count for each quality level. The array must have one entry per scalable setting level, and elements must be between 4 and 64.</summary>
[Range(4, 64)]
public int[] ContactShadowSampleCount = new int[s_QualitySettingCount];

// Screen Space Reflections
/// <summary>Maximum number of rays for Screen Space Reflection for each quality level.</summary>
/// <summary>Maximum number of rays for Screen Space Reflection for each quality level. The array must have one entry per scalable setting level, and elements must above 0.</summary>
[Min(0)]
public int[] SSRMaxRaySteps = new int[s_QualitySettingCount];

// Screen Space Global Illumination
/// <summary>Screen space global illumination step count for the ray marching.</summary>
/// <summary>Screen space global illumination step count for the ray marching. The array must have one entry per scalable setting level, and elements must above 0.</summary>
[Min(0)]
public int[] SSGIRaySteps = new int[s_QualitySettingCount];

/// <summary>Flag that enables the first denoising pass.</summary>
public bool[] SSGIDenoise = new bool[s_QualitySettingCount];
/// <summary>Flag that defines if the denoiser should be evaluated at half resolution.</summary>
Expand All @@ -204,62 +211,79 @@ internal GlobalLightingQualitySettings()
public bool[] SSGISecondDenoise = new bool[s_QualitySettingCount];

// Ray Traced Ambient Occlusion
/// <summary>Controls the length of ray traced ambient occlusion rays.</summary>
/// <summary>Controls the length of ray traced ambient occlusion rays. The array must have one entry per scalable setting level, and elements must above 0.01.</summary>
[Min(0.01f)]
public float[] RTAORayLength = new float[s_QualitySettingCount];
/// <summary>Number of samples for evaluating the effect.</summary>
/// <summary>Number of samples for evaluating the effect. The array must have one entry per scalable setting level, and elements must be between 1 and 64.</summary>
[Range(1, 64)]
public int[] RTAOSampleCount = new int[s_QualitySettingCount];
/// <summary>Defines if the ray traced ambient occlusion should be denoised.</summary>
/// <summary>Defines if the ray traced ambient occlusion should be denoised. The array must have one entry per scalable setting level.</summary>
public bool[] RTAODenoise = new bool[s_QualitySettingCount];
/// <summary>Controls the radius of the ray traced ambient occlusion denoiser.</summary>
/// <summary>Controls the radius of the ray traced ambient occlusion denoiser. The array must have one entry per scalable setting level, and elements must be between 0.001 and 1.</summary>
[Range(0.001f, 1.0f)]
public float[] RTAODenoiserRadius = new float[s_QualitySettingCount];

// Ray Traced Global Illumination
/// <summary>Controls the length of ray traced global illumination rays.</summary>
/// <summary>Controls the length of ray traced global illumination rays. The array must have one entry per scalable setting level, and elements must above 0.01.</summary>
[Min(0.01f)]
public float[] RTGIRayLength = new float[s_QualitySettingCount];
/// <summary>Controls if the effect should be computed at full resolution.</summary>
/// <summary>Controls if the effect should be computed at full resolution. The array must have one entry per scalable setting level.</summary>
public bool[] RTGIFullResolution = new bool[s_QualitySettingCount];
/// <summary>Clamp value used to reduce the variance in the integration signal.</summary>
/// <summary>Clamp value used to reduce the variance in the integration signal. The array must have one entry per scalable setting level, and elements must be between 0.001 and 10.</summary>
[Range(0.001f, 10.0f)]
public float[] RTGIClampValue = new float[s_QualitySettingCount];
/// <summary>Radius for the up-sample pass.</summary>
/// <summary>Radius for the up-sample pass. The array must have one entry per scalable setting level, and elements must be between 2 and 4.</summary>
[Range(2, 4)]
public int[] RTGIUpScaleRadius = new int[s_QualitySettingCount];
/// <summary>Controls the number of ray steps for hybrid tracing.</summary>
/// <summary>Controls the number of ray steps for hybrid tracing. The array must have one entry per scalable setting level, and elements must above 0.</summary>
[Min(0)]
public int[] RTGIRaySteps = new int[s_QualitySettingCount];
/// <summary>Flag that enables the first denoising pass.</summary>
/// <summary>Flag that enables the first denoising pass. The array must have one entry per scalable setting level.</summary>
public bool[] RTGIDenoise = new bool[s_QualitySettingCount];
/// <summary>Flag that defines if the denoiser should be evaluated at half resolution.</summary>
/// <summary>Flag that defines if the denoiser should be evaluated at half resolution. The array must have one entry per scalable setting level.</summary>
public bool[] RTGIHalfResDenoise = new bool[s_QualitySettingCount];
/// <summary>Flag that defines the radius of the first denoiser.</summary>
/// <summary>Flag that defines the radius of the first denoiser. The array must have one entry per scalable setting level, and elements must be between 0.001 and 1.0.</summary>
[Range(0.001f, 1.0f)]
public float[] RTGIDenoiserRadius = new float[s_QualitySettingCount];
/// <summary>Flag that enables the second denoising pass.</summary>
/// <summary>Flag that enables the second denoising pass. The array must have one entry per scalable setting level.</summary>
public bool[] RTGISecondDenoise = new bool[s_QualitySettingCount];

// Ray Traced Reflections
/// <summary>Controls the minimal smoothness.</summary>
/// <summary>Controls the minimal smoothness. The array must have one entry per scalable setting level, and elements must be between 0 and 1.</summary>
[Range(0.0f, 1.0f)]
public float[] RTRMinSmoothness = new float[s_QualitySettingCount];
/// <summary>Controls the minimal smoothness.</summary>
/// <summary>Controls the minimal smoothness. The array must have one entry per scalable setting level, and elements must be between 0 and 1.</summary>
[Range(0.0f, 1.0f)]
public float[] RTRSmoothnessFadeStart = new float[s_QualitySettingCount];
/// <summary>Controls the length of ray traced reflection rays.</summary>
/// <summary>Controls the length of ray traced reflection rays. The array must have one entry per scalable setting level, and elements must above 0.01.</summary>
[Min(0.01f)]
public float[] RTRRayLength = new float[s_QualitySettingCount];
/// <summary>Clamp value used to reduce the variance in the integration signal.</summary>
/// <summary>Clamp value used to reduce the variance in the integration signal. The array must have one entry per scalable setting level, and elements must be between 0.001 and 10.</summary>
[Range(0.001f, 10.0f)]
public float[] RTRClampValue = new float[s_QualitySettingCount];
/// <summary>Controls if the effect should be computed at full resolution.</summary>
/// <summary>Controls if the effect should be computed at full resolution. The array must have one entry per scalable setting level.</summary>
public bool[] RTRFullResolution = new bool[s_QualitySettingCount];
/// <summary>Controls if the effect should be computed at full resolution.</summary>
/// <summary>Controls if the effect should be computed at full resolution. The array must have one entry per scalable setting level, and elements must above 0.</summary>
[Min(0)]
public int[] RTRRayMaxIterations = new int[s_QualitySettingCount];
/// <summary>Flag that enables the first denoising pass.</summary>
/// <summary>Flag that enables the first denoising pass. The array must have one entry per scalable setting level.</summary>
public bool[] RTRDenoise = new bool[s_QualitySettingCount];
/// <summary>Flag that defines the radius of the first denoiser.</summary>
/// <summary>Flag that defines the radius of the first denoiser. The array must have one entry per scalable setting level, and elements must be between 1 and 32.</summary>
[Range(1, 32)]
public int[] RTRDenoiserRadius = new int[s_QualitySettingCount];
/// <summary>Flag that defines smooth denoising status.</summary>
/// <summary>Flag that defines smooth denoising status. The array must have one entry per scalable setting level.</summary>
public bool[] RTRSmoothDenoising = new bool[s_QualitySettingCount];

// TODO: Volumetric fog quality
/// <summary>Controls which control mode should be used to define the volumetric fog parameters.</summary>
/// <summary>Controls which control mode should be used to define the volumetric fog parameters. The array must have one entry per scalable setting level.</summary>
public FogControl[] Fog_ControlMode = new FogControl[s_QualitySettingCount];
/// <summary>Controls the budget of the volumetric fog effect.</summary>
/// <summary>Controls the budget of the volumetric fog effect. The array must have one entry per scalable setting level, and elements must be between 0 and 1.</summary>
[Range(0.0f, 1.0f)]
public float[] Fog_Budget = new float[s_QualitySettingCount];
/// <summary>Controls how the budget is shared between screen resolution and depth.</summary>
/// <summary>Controls how the budget is shared between screen resolution and depth. The array must have one entry per scalable setting level, and elements must be between 0 and 1.</summary>
[Range(0.0f, 1.0f)]
public float[] Fog_DepthRatio = new float[s_QualitySettingCount];

// TODO: Shadows. This needs to be discussed further as there is an idiosyncracy here as we have different level of quality settings,
//some for resolution per light (4 levels) some per volume (which are 3 levels everywhere). This needs to be discussed more.
}
Expand Down
Loading