Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a7f878c
stabilize CoC if taa is enabled
pmavridis Jul 6, 2020
ac9bd91
Fixes related to CoC clamping
pmavridis Jul 6, 2020
d30c2af
Improve DoF when TAA is active by using different samples each frame
pmavridis Jul 6, 2020
0475bd9
Add UI option to run the new physically based DoF
pmavridis Jul 6, 2020
518498d
Update documentation with the new option
pmavridis Jul 6, 2020
3f55086
Fix issue with mip maps when switching DoF techniques
pmavridis Jul 7, 2020
e0852fe
Improve documentation
pmavridis Jul 7, 2020
b9ac1ef
Clean-up C# code
pmavridis Jul 7, 2020
108a54d
Minor changes in the shader
pmavridis Jul 7, 2020
05afe0d
Fix near-far blending and cleanup unused code
pmavridis Jul 7, 2020
78089ab
clean-up shader code
pmavridis Jul 7, 2020
d562971
more shader shader clean-up + fix weigths
pmavridis Jul 7, 2020
16394b5
more shader shader clean-up
pmavridis Jul 7, 2020
7cb6509
back-to-front blending clean-up
pmavridis Jul 7, 2020
4dac900
Make Manual CoC work for the new dof
pmavridis Jul 8, 2020
e587d55
Changelog
pmavridis Jul 8, 2020
406c007
Change min aperture to 0.7
pmavridis Jul 8, 2020
db8607c
Add info box when physically based dof is enabled
pmavridis Jul 9, 2020
3596ad3
Add info box when physically based dof is enabled
pmavridis Jul 9, 2020
afdd56a
Add s specialized TAA configuration for use with DoF and also stabili…
pmavridis Jul 9, 2020
b8b8f8a
Do not increase sample count when taa is off
pmavridis Jul 9, 2020
6d7d521
Fix issue in disc sampling
pmavridis Jul 9, 2020
ec428cf
Fix profiling scope for CoC
pmavridis Jul 9, 2020
449be5e
Fix for adaptive search radius
pmavridis Jul 10, 2020
68e86e4
Review feadback
pmavridis Jul 10, 2020
f9835c7
Review feadback 2
pmavridis Jul 10, 2020
3cb3a4e
Fix non-uniform ring weights
pmavridis Jul 10, 2020
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 @@ -160,6 +160,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added decal layer system similar to light layer. Mesh will receive a decal when both decal layer mask matches.
- Added shader graph nodes for rendering a complex eye shader.
- Added more controls to contact shadows and increased quality in some parts.
- Added a physically based option in DoF volume.

### Fixed
- Fix when rescale probe all direction below zero (1219246)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Depth Of Field includes [more options](More-Options.html) that you must manually
| -------------------------- | ------------------------------------------------------------ |
| **Resolution** | Use the drop-down to set the resolution at which HDRP processes the depth of field effect. If you target consoles that use a very high resolution (for example, 4k), select **Quarter,** because it is 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 [more options](More-Options.html). |
| **High Quality Filtering** | Enable the checkbox to make HDRP use bicubic filtering instead of bilinear filtering. This increases the resource intensity of the Depth Of Field effect, but results in smoother visuals.<br />This property only appears when you enable [more options](More-Options.html). |
| **Physically Based** | Enable the checkbox to make HDRP use a more accurate but slower physically-based technique for the computation of Deph-of-Field. It is highly recommended to enable [Temporal anti-aliasing (TAA)](Anti-Aliasing) at the same time, for improved quality and performance.|

<a name="PhysicalCameraSettings"></a>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ static partial class Styles

public static GUIContent k_NearFocusEnd = new GUIContent("End", "Sets the distance from the Camera at which the near field does not blur anymore.");
public static GUIContent k_FarFocusEnd = new GUIContent("End", "Sets the distance from the Camera at which the far field blur reaches its maximum blur radius.");
public static GUIContent k_PhysicallyBased = new GUIContent("PhysicallyBased", "Uses a more accurate but slower physically based method to compute DoF.");

public static readonly string InfoBox = "Physically Based DoF currently has a high performance overhead. Enabling TAA is highly recommended when using this option.";
}

SerializedDataParameter m_FocusMode;
Expand All @@ -41,6 +44,7 @@ static partial class Styles
// Advanced settings
SerializedDataParameter m_HighQualityFiltering;
SerializedDataParameter m_Resolution;
SerializedDataParameter m_PhysicallyBased;

public override bool hasAdvancedMode => true;

Expand All @@ -66,6 +70,7 @@ public override void OnEnable()

m_HighQualityFiltering = Unpack(o.Find("m_HighQualityFiltering"));
m_Resolution = Unpack(o.Find("m_Resolution"));
m_PhysicallyBased = Unpack(o.Find("m_PhysicallyBased"));
}

public override void OnInspectorGUI()
Expand Down Expand Up @@ -132,6 +137,9 @@ public override void OnInspectorGUI()
EditorGUILayout.LabelField("Advanced Tweaks", EditorStyles.miniLabel);
PropertyField(m_Resolution);
PropertyField(m_HighQualityFiltering);
PropertyField(m_PhysicallyBased);
if(m_PhysicallyBased.value.boolValue == true)
EditorGUILayout.HelpBox(Styles.InfoBox, MessageType.Info);
GUI.enabled = true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public class GeneralSection
public static readonly GUIContent sampleCountQuality = EditorGUIUtility.TrTextContent("Sample Count");
public static readonly GUIContent resolutionQuality = EditorGUIUtility.TrTextContent("Resolution");
public static readonly GUIContent highQualityFiltering = EditorGUIUtility.TrTextContent("High Quality Filtering");
public static readonly GUIContent dofPhysicallyBased = EditorGUIUtility.TrTextContent("Physically Based");
public static readonly GUIContent maxSamplesQuality = EditorGUIUtility.TrTextContent("Max Samples");

public static readonly GUIContent SSAOQualitySettingSubTitle = EditorGUIUtility.TrTextContent("Screen Space Ambient Occlusion");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ static void DrawDepthOfFieldQualitySetting(SerializedHDRenderPipelineAsset seria

EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.DoFResolution.GetArrayElementAtIndex(tier), Styles.resolutionQuality);
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.DoFHighFilteringQuality.GetArrayElementAtIndex(tier), Styles.highQualityFiltering);
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.DoFPhysicallyBased.GetArrayElementAtIndex(tier), Styles.dofPhysicallyBased);
--EditorGUI.indentLevel;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class SerializedPostProcessingQualitySettings
public SerializedProperty FarBlurMaxRadius;
public SerializedProperty DoFResolution;
public SerializedProperty DoFHighFilteringQuality;
public SerializedProperty DoFPhysicallyBased;

// Motion Blur
public SerializedProperty MotionBlurSampleCount;
Expand All @@ -36,6 +37,7 @@ public SerializedPostProcessingQualitySettings(SerializedProperty root)
FarBlurMaxRadius = root.Find((GlobalPostProcessingQualitySettings s) => s.FarBlurMaxRadius);
DoFResolution = root.Find((GlobalPostProcessingQualitySettings s) => s.DoFResolution);
DoFHighFilteringQuality = root.Find((GlobalPostProcessingQualitySettings s) => s.DoFHighQualityFiltering);
DoFPhysicallyBased = root.Find((GlobalPostProcessingQualitySettings s) => s.DoFPhysicallyBased);

// Motion Blur
MotionBlurSampleCount = root.Find((GlobalPostProcessingQualitySettings s) => s.MotionBlurSampleCount);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,23 @@ public bool highQualityFiltering
set { m_HighQualityFiltering.value = value; }
}

public bool physicallyBased
{
get
{
if (!UsesQualitySettings())
{
return m_PhysicallyBased.value;
}
else
{
int qualityLevel = (int)quality.levelAndOverride.level;
return GetPostProcessingQualitySettings().DoFPhysicallyBased[qualityLevel];
}
}
set { m_PhysicallyBased.value = value; }
}

/// <summary>
/// Specifies the resolution at which HDRP processes the depth of field effect.
/// </summary>
Expand Down Expand Up @@ -257,6 +274,9 @@ public DepthOfFieldResolution resolution
[SerializeField, FormerlySerializedAs("resolution")]
DepthOfFieldResolutionParameter m_Resolution = new DepthOfFieldResolutionParameter(DepthOfFieldResolution.Half);

[SerializeField]
BoolParameter m_PhysicallyBased = new BoolParameter(false);

/// <summary>
/// Tells if the effect needs to be rendered or not.
/// </summary>
Expand Down
Loading