Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[HDRP] bunch of bug fixes for HDRP (version 5)
[Fixing the clamp happening on the sum of ray tracing samples instead of per sample (case 1430042).](https://github.cds.internal.unity3d.com/unity/unity/pull/10879)

[Fix quad-like artifacts around silhouettes of moving objects when TAA](https://github.cds.internal.unity3d.com/unity/unity/pull/10881)

[[HDRP] Spec occlusion fallback on normal](https://github.cds.internal.unity3d.com/unity/unity/pull/10882)

[[HDRP] Fix error on material import](https://github.cds.internal.unity3d.com/unity/unity/pull/10883) 

[Fix a rounding issue in ray traced reflections at half resolution (case 1416403).](https://github.cds.internal.unity3d.com/unity/unity/pull/10884)

[Fix cullmode toggle shifting the material UI when enabling it](https://github.cds.internal.unity3d.com/unity/unity/pull/10886)

[Fix a discrpency between recursive rendering and path tracing for refraction models (case 1428846).](https://github.cds.internal.unity3d.com/unity/unity/pull/10876)

[Fix custom pass documentation script](https://github.cds.internal.unity3d.com/unity/unity/pull/10899)

[Disable Volumetric Clouds for Default Sky Volumes](https://github.cds.internal.unity3d.com/unity/unity/pull/10900)

[Fix custom pass reordering bug in inspector](https://github.cds.internal.unity3d.com/unity/unity/pull/10926)

[Fix the default DXR volume not having any DXR effects enabled (case 1418429)](https://github.cds.internal.unity3d.com/unity/unity/pull/10941)

[Update misleading tooltip in the environment lighting in HDRP](https://github.cds.internal.unity3d.com/unity/unity/pull/11007)

[Bugfix 1409782: "Switching back & forth the up direction f the light anchor when the elevation is a multiple of 90 looses the settings"](https://github.cds.internal.unity3d.com/unity/unity/pull/10943)

[Bugfix 1417894: Fixed reflection issue upon scene filtering](https://github.cds.internal.unity3d.com/unity/unity/pull/10891)

[Fixed leaks in ray tracing effects due to missing ambient probe for ray tracing effects (case UUM-589). ](https://github.cds.internal.unity3d.com/unity/unity/pull/10938)

[[Fogbugs # 1423891] Fixing PBR Dof corruption on camera cuts](https://github.cds.internal.unity3d.com/unity/unity/pull/11061)

[Disable renderer list culling for forward depth prepass and render forward opaque passes](https://github.cds.internal.unity3d.com/unity/unity/pull/11029)

[Fix Issue with DOTS and Look Dev](https://github.cds.internal.unity3d.com/unity/unity/pull/10908)

[Fixed issue 1394667: [HDRP] Noisy top shadows when using 'High' Filtering Quality with Tesselated Meshes (Lit Tesselation)](https://github.cds.internal.unity3d.com/unity/unity/pull/11012)

[[Jira #UUM-1294 ] Fix culling plane generation for HDRP point lights and spot lights ](https://github.cds.internal.unity3d.com/unity/unity/pull/11064)

[Async compute doc](https://github.cds.internal.unity3d.com/unity/unity/pull/11124)

[Fix Decal Layer Texture lifetime in rendergraph](https://github.cds.internal.unity3d.com/unity/unity/pull/11016)

[Fix Missing Reference Exception in graphics compositor ](https://github.cds.internal.unity3d.com/unity/unity/pull/11284)

[[Docs] Add missing using statements in example script](https://github.cds.internal.unity3d.com/unity/unity/pull/11315)

[[Fogbugz # 1418466] Fixing quarter resolution dof artifacts when dynamic resolution rendering changes.](https://github.cds.internal.unity3d.com/unity/unity/pull/11205)

[[Fogbugz # 1418461] Fixing distortion pyramid color for DRS](https://github.cds.internal.unity3d.com/unity/unity/pull/11164)

[Fix issues with ray tracing effects and SSGI temporal reprojection issues with dynamic resolution (case 1418319, 1418320 and 1415159)] (https://github.cds.internal.unity3d.com/unity/unity/pull/10928)
  • Loading branch information
sebastienlagarde committed Jun 28, 2022
1 parent 3a97459 commit aee83ab
Show file tree
Hide file tree
Showing 71 changed files with 1,947 additions and 340 deletions.
12 changes: 11 additions & 1 deletion Packages/com.unity.render-pipelines.core/Editor/LookDev/Stage.cs
Expand Up @@ -143,7 +143,17 @@ public GameObject InstantiateIntoStage(GameObject prefabOrSceneObject, bool pers
/// <seealso cref="MoveIntoStage"/>
public GameObject InstantiateIntoStage(GameObject prefabOrSceneObject, Vector3 position, Quaternion rotation, bool persistent = false)
{
var handle = GameObject.Instantiate(prefabOrSceneObject);
GameObject handle;

if (PrefabUtility.IsPartOfAnyPrefab(prefabOrSceneObject))
{
// Instantiate the prefab directly into the preview scene to prevent any issues
// with systems that register with the main scene in Awake [Case 1399762].
handle = PrefabUtility.InstantiatePrefab(prefabOrSceneObject, m_PreviewScene) as GameObject;
}
else
handle = GameObject.Instantiate(prefabOrSceneObject);

MoveIntoStage(handle, position, rotation, persistent);
return handle;
}
Expand Down
Expand Up @@ -173,6 +173,8 @@ public void SynchronizeOnTransform(Camera camera)
worldAnchorToLight = -transform.forward;

Vector3 projectOnGround = Vector3.ProjectOnPlane(worldAnchorToLight, axes.up);
if(projectOnGround.magnitude < 0.0001f)
projectOnGround = Vector3.ProjectOnPlane(worldAnchorToLight, axes.up + axes.right * 0.0001f);
projectOnGround.Normalize();

float extractedYaw = Vector3.SignedAngle(axes.forward, projectOnGround, axes.up);
Expand Down
Expand Up @@ -421,11 +421,10 @@ TEMPLATE_3_REAL(Avg3, a, b, c, return (a + b + c) * 0.33333333)

float QuadReadAcrossDiagonal(float value, int2 screenPos)
{
float dX = ddx_fine(value);
float dY = ddy_fine(value);
float2 quadDir = GetQuadOffset(screenPos);
float dX = ddx_fine(value);
float X = value - (dX * quadDir.x);
return X - (ddy_fine(value) * quadDir.y);
return X - (ddy_fine(X) * quadDir.y);
}
#endif

Expand Down
Expand Up @@ -141,6 +141,11 @@ You can use the accumulation API to create a high quality antialiased frame, sim
To do this, use the accumulation API to jitter the projection matrix of each rendered subframe. The following script example uses this method to perform high quality antialiasing :

```C#
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
using System.Collections.Generic;

public class SuperSampling : MonoBehaviour
{
// The number of samples used for accumumation in the horizontal and verical directions.
Expand Down
Expand Up @@ -307,38 +307,6 @@ The following script creates a [custom editor](https://docs.unity3d.com/Manual/e

```C#
public class OutlineDrawer : CustomPassDrawer
{
// This property field allow you to control which common UI property to show.
// For the outline we only need the name and target color buffer.
protected override PassUIFlag commonPassUIFlags => PassUIFlag.TargetColorBuffer | PassUIFlag.Name;
SerializedProperty outlineLayer, outlineColor, threshold;
static float lineAndSpaceHeight = EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
protected override void Initialize(SerializedProperty customPass)
{
// Initialize the local SerializedProperty you will use in your pass.
outlineLayer = customPass.FindPropertyRelative(nameof(Outline.outlineLayer));
outlineColor = customPass.FindPropertyRelative(nameof(Outline.outlineColor));
threshold = customPass.FindPropertyRelative(nameof(Outline.threshold));
}
protected override void DoPassGUI(SerializedProperty customPass, Rect rect)
{
// Draw your custom GUI using `EditorGUI` calls. Note that the Layout methods don't work here
Rect propertyRect = rect;
propertyRect.height = EditorGUIUtility.singleLineHeight;
EditorGUI.PropertyField(propertyRect, outlineLayer);
propertyRect.y += lineAndSpaceHeight;
EditorGUI.PropertyField(propertyRect, outlineColor);
propertyRect.y += lineAndSpaceHeight;
EditorGUI.PropertyField(propertyRect, threshold);
}
protected override float GetPassHeight(SerializedProperty customPass)
{
// Return the vertical height in pixels that you used in the DoPassGUI method above.
// Can be dynamic.
return (lineAndSpaceHeight) * 3;
}
}

{
// This property field allow you to control which common UI property to show.
// For the outline we only need the name and target color buffer.
Expand Down
Expand Up @@ -412,6 +412,7 @@ These settings control lighting features for your rendering components. Here you
### Asynchronous Compute Shaders

These settings control which effects, if any, can make use execute compute Shader commands in parallel.
This is only supported on DX12 and Vulkan. If Asynchronous execution is disabled or not supported the effects will fallback on a synchronous version.

<table>
<thead>
Expand Down
@@ -1,4 +1,4 @@
<tr>
<td>**Specular Occlusion Mode**</td>
<td>The mode that HDRP uses to calculate specular occlusion. The options are:<br/>&#8226; **Off**: Disables specular occlusion.<br/>&#8226; **From AO**: Calculates specular occlusion from the ambient occlusion map and the Camera's view vector.<br/>&#8226; **From AO and Bent Normal**: Calculates specular occlusion from the ambient occlusion map, the bent normal map, and the Camera's view vector.<br/>&#8226; **Custom**: Allows you to specify your own specular occlusion values.</td>
<td>The mode that HDRP uses to calculate specular occlusion. The options are:<br/>&#8226; **Off**: Disables specular occlusion.<br/>&#8226; **From AO**: Calculates specular occlusion from the ambient occlusion map and the Camera's view vector.<br/>&#8226; **From AO and Bent Normal**: Calculates specular occlusion from the ambient occlusion map, the bent normal map, and the Camera's view vector. If no bent normal is provided, the normal is used instead.<br/>&#8226; **Custom**: Allows you to specify your own specular occlusion values.</td>
</tr>
Expand Up @@ -378,6 +378,8 @@ static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAsse

if (material == null)
material = (Material)AssetDatabase.LoadAssetAtPath(asset, typeof(Material));
if (material == null)
continue;

if (MaterialReimporter.s_ReimportShaderGraphDependencyOnMaterialUpdate && GraphUtil.IsShaderGraphAsset(material.shader))
{
Expand Down
Expand Up @@ -33,6 +33,7 @@ class HDScreenSpaceReflectionEditor : VolumeComponentWithQualityEditor
// Ray Tracing
SerializedDataParameter m_RayMiss;
SerializedDataParameter m_LastBounce;
SerializedDataParameter m_AmbientProbeDimmer;
SerializedDataParameter m_LayerMask;
SerializedDataParameter m_TextureLodBias;
SerializedDataParameter m_RayLength;
Expand Down Expand Up @@ -82,6 +83,7 @@ public override void OnEnable()
// Generic ray tracing
m_RayMiss = Unpack(o.Find(x => x.rayMiss));
m_LastBounce = Unpack(o.Find(x => x.lastBounceFallbackHierarchy));
m_AmbientProbeDimmer = Unpack(o.Find(x => x.ambientProbeDimmer));
m_LayerMask = Unpack(o.Find(x => x.layerMask));
m_TextureLodBias = Unpack(o.Find(x => x.textureLodBias));
m_RayLength = Unpack(o.Find(x => x.rayLength));
Expand Down Expand Up @@ -192,6 +194,7 @@ void RayTracedReflectionGUI(RayCastingMode tracingMode)
EditorGUILayout.LabelField("Fallback", EditorStyles.miniLabel);
PropertyField(m_RayMiss, k_RayMissFallbackHierarchyText);
PropertyField(m_LastBounce, k_LastBounceFallbackHierarchyText);
PropertyField(m_AmbientProbeDimmer);
}
PropertyField(m_LayerMask, k_LayerMaskText);
PropertyField(m_TextureLodBias, k_TextureLodBiasText);
Expand Down
Expand Up @@ -813,6 +813,8 @@ public static PassDescriptor GenerateGBuffer(bool useVFX, bool useTessellation)
Comp = "Always",
Pass = "Replace",
}) },
{ RenderState.ColorMask("ColorMask [_LightLayersMaskBuffer4] 4") },
{ RenderState.ColorMask("ColorMask [_LightLayersMaskBuffer5] 5") },
};

#endregion
Expand Down
Expand Up @@ -555,11 +555,21 @@ protected void DrawSurfaceGUI()
if (zTest != null)
materialEditor.ShaderProperty(zTest, Styles.transparentZTestText);

bool showTransparentCullMode = transparentCullMode != null && doubleSidedEnable.floatValue == 0;
bool showTransparentCullMode = transparentCullMode != null;
if (transparentBackfaceEnable != null)
showTransparentCullMode &= transparentBackfaceEnable.floatValue == 0;

if (showTransparentCullMode)
materialEditor.ShaderProperty(transparentCullMode, Styles.transparentCullModeText);
{
if (doubleSidedEnable != null && doubleSidedEnable.floatValue == 0 && transparentCullMode != null)
materialEditor.ShaderProperty(transparentCullMode, Styles.transparentCullModeText);
else
{
EditorGUI.BeginDisabledGroup(true);
EditorGUILayout.Popup(Styles.transparentCullModeText, 0, new string[] { "Off" });
EditorGUI.EndDisabledGroup();
}
}

EditorGUI.indentLevel--;
}
Expand Down
Expand Up @@ -266,7 +266,11 @@ void CreateReorderableList(SerializedProperty passList)
SearchWindow.Open(new SearchWindowContext(windowPosition), searchObject);
};

m_CustomPassList.onReorderCallback = (index) => ClearCustomPassCache();
m_CustomPassList.onReorderCallback = (index) =>
{
serializedObject.ApplyModifiedProperties();
ClearCustomPassCache();
};

m_CustomPassList.onRemoveCallback = (list) =>
{
Expand Down
Expand Up @@ -21,6 +21,7 @@ class GlobalIlluminatorEditor : VolumeComponentWithQualityEditor

// Ray tracing generic attributes
SerializedDataParameter m_LastBounce;
SerializedDataParameter m_AmbientProbeDimmer;
SerializedDataParameter m_LayerMask;
SerializedDataParameter m_ReceiverMotionRejection;
SerializedDataParameter m_TextureLodBias;
Expand Down Expand Up @@ -67,6 +68,7 @@ public override void OnEnable()

// Ray Tracing shared parameters
m_LastBounce = Unpack(o.Find(x => x.lastBounceFallbackHierarchy));
m_AmbientProbeDimmer = Unpack(o.Find(x => x.ambientProbeDimmer));
m_LayerMask = Unpack(o.Find(x => x.layerMask));
m_ReceiverMotionRejection = Unpack(o.Find(x => x.receiverMotionRejection));
m_TextureLodBias = Unpack(o.Find(x => x.textureLodBias));
Expand Down Expand Up @@ -201,6 +203,7 @@ public override void OnInspectorGUI()
EditorGUILayout.LabelField("Fallback", EditorStyles.miniLabel);
PropertyField(m_RayMiss, k_RayMissFallbackHierarchyText);
PropertyField(m_LastBounce, k_LastBounceFallbackHierarchyText);
PropertyField(m_AmbientProbeDimmer);
}

if (currentAsset.currentPlatformRenderPipelineSettings.supportedRayTracingMode == RenderPipelineSettings.SupportedRayTracingMode.Both)
Expand Down
Expand Up @@ -17,6 +17,7 @@ class RecursiveRenderingEditor : VolumeComponentEditor
SerializedDataParameter m_MinSmoothness;
SerializedDataParameter m_RayMiss;
SerializedDataParameter m_LastBounce;
SerializedDataParameter m_AmbientProbeDimmer;

public override void OnEnable()
{
Expand All @@ -29,6 +30,7 @@ public override void OnEnable()
m_MinSmoothness = Unpack(o.Find(x => x.minSmoothness));
m_RayMiss = Unpack(o.Find(x => x.rayMiss));
m_LastBounce = Unpack(o.Find(x => x.lastBounce));
m_AmbientProbeDimmer = Unpack(o.Find(x => x.ambientProbeDimmer));
}

static public readonly GUIContent k_RayLengthText = EditorGUIUtility.TrTextContent("Max Ray Length", "This defines the maximal travel distance of rays in meters.");
Expand Down Expand Up @@ -64,6 +66,7 @@ public override void OnInspectorGUI()
EditorGUILayout.LabelField("Fallback", EditorStyles.miniLabel);
PropertyField(m_RayMiss);
PropertyField(m_LastBounce);
PropertyField(m_AmbientProbeDimmer);
}
}
}
Expand Down
Expand Up @@ -59,6 +59,8 @@ void CreateReorderableList(SerializedProperty parameter)
drawElement?.Invoke(parameter.GetArrayElementAtIndex(index), rect, index);
};

m_DiffusionProfileList.onCanAddCallback = l => l.count < DiffusionProfileConstants.DIFFUSION_PROFILE_COUNT - 1;

m_DiffusionProfileList.onAddCallback = (l) =>
{
if (parameter.arraySize >= DiffusionProfileConstants.DIFFUSION_PROFILE_COUNT - 1)
Expand Down

0 comments on commit aee83ab

Please sign in to comment.