Skip to content

Commit 2a38a35

Browse files
[10.x.x Backport][HDRP] Backport various PRs (#5460)
* Merge Hd/bugfix #5255 * Merge Hd/bugfix #5306 * Fixed Bug That Prevented Sclera Iris Blend node from being added (#5375) The Sclera Iris Blend node had the same name as the Sclera Limbal Ring node, so when you selected the Sclera Iris Blend node from the Create Node menu, the Sclera Limbal Ring node was added instead. This made it impossible to add a Sclera Iris Blend node to the graph. * Merge Hd/bugfix #5427 * Fix compilation issue * Update MotionVectorVertexShaderCommon.hlsl Co-authored-by: bencloward <[email protected]>
1 parent 81dc1f3 commit 2a38a35

File tree

20 files changed

+92
-30
lines changed

20 files changed

+92
-30
lines changed

com.unity.render-pipelines.core/Editor/Volume/Drawers/IntParameterDrawer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ public override bool OnGUI(SerializedDataParameter parameter, GUIContent title)
116116
if (value.propertyType != SerializedPropertyType.LayerMask)
117117
return false;
118118

119-
value.intValue = EditorGUILayout.MaskField(title, value.intValue, InternalEditorUtility.layers);
119+
value.intValue = InternalEditorUtility.ConcatenatedLayersMaskToLayerMask(
120+
EditorGUILayout.MaskField(title, InternalEditorUtility.LayerMaskToConcatenatedLayersMask(value.intValue), InternalEditorUtility.layers));
120121
return true;
121122
}
122123
}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2424
- Fixed the FreeCamera and SimpleCameraController mouse rotation unusable at low framerate (case 1340344).
2525
- Fixed warning "Releasing render texture that is set to be RenderTexture.active!" on pipeline disposal / hdrp live editing.
2626
- Fixed a nullref in volume system after deleting a volume object (case 1348374).
27+
- Fixed update order in Graphics Compositor causing jumpy camera updates (case 1345566).
28+
- Fixed material inspector that allowed setting intensity to an infinite value.
29+
- Fixed issue when switching between non-persistent cameras when path tarcing is enabled (case 1337843).
30+
- Fixed issue with the LayerMaskParameter class storing an erroneous mask value (case 1345515).
31+
- Fixed issue with vertex color defaulting to 0.0 when not defined, in ray/path tracing (case 1348821).
32+
- Fixed issue with a compute dispatch being with 0 threads on extremely small resolutions.
33+
- Fixed incorrect light list indexing when TAA is enabled (case 1352444).
34+
- Fixed Additional Velocity for Alembic not taking correctly into account vertex animation
35+
- Fixed wrong LUT initialization in Wireframe mode.
36+
- Fixed case where the SceneView don't refresh when using LightExplorer with a running and Paused game (1354129)
2737

2838
## [10.6.0] - 2021-04-29
2939

com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ Using the Inspector allows you to change all of the Decal Projector properties,
4949

5050
## Limitations
5151

52-
- The Decal Projector can affect opaque Materials with either a [Decal Shader](Decal-Shader.md) or a [Decal Master Stack](master-stack-decal.md). However, it can only affect transparent Materials with the [Decal Shader](Decal-Shader.md).
53-
- Decal Emissive isn't supported on Transparent Material.
52+
- The Decal Projector can affect opaque Materials with either a [Decal Shader](Decal-Shader.md) or a [Decal Master Stack](master-stack-decal.md). However, it can only affect transparent Materials with the [Decal Shader](Decal-Shader.md).
53+
- Emissive decals isn't supported on Transparent Material.
54+
- Emissive decals always give an additive positive contribution. This property does not affect the existing emissive properties of the Materials assigned to a GameObject.
5455
- The **Receive Decals** property of Materials in HDRP does not affect emissive decals. HDRP always renders emissive decals unless you use Decal Layers, which can disable emissive decals on a Layer by Layer basis.
5556
- If you project a decal onto a transparent surface, HDRP ignores the decal's Texture tiling.
5657
- In **Project Settings > Graphics**, if **Instancing Variants** is set to **Strip All**, Unity strips the Decal Shader this component references when you build your Project. This happens even if you include the Shader in the **Always Included Shaders** list. If Unity strips the Shader during the build process, the decal does not appear in your built Application.

com.unity.render-pipelines.high-definition/Documentation~/Decal-Shader.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ These properties allow you to set the affected attributes of the Material the de
1515
| **Affect Metal** | Enable the checkbox to make the decal use the metallic property of its **Mask Map**. Otherwise the decal has no metallic effect. Uses the red channel of the **Mask Map**.<br />This property only appears when you enable the **Metal and Ambient Occlusion properties** checkbox in your [HDRP Asset](HDRP-Asset.md#Decals). |
1616
| **Affect Ambient Occlusion** | Enable the checkbox to make the decal use the ambient occlusion property of its **Mask Map**. Otherwise the decal has no ambient occlusion effect. Uses the green channel of the **Mask Map**.<br />This property only appears when you enable the **Metal and Ambient Occlusion properties** checkbox in your [HDRP Asset](HDRP-Asset.md#Decals). |
1717
| **Affect Smoothness** | Enable the checkbox to make the decal use the smoothness property of its **Mask Map**. Otherwise the decal has no smoothness effect. Uses the alpha channel of the **Mask Map**.<br /> |
18-
| **Affect Emissive** | Enable the checkbox to make this decal emissive. When enabled, this Material appears self-illuminated and acts as a visible source of light. This property does not work with transparent receiving Materials. |
18+
| **Affect Emissive** | Enable the checkbox to make this decal emissive. When enabled, this Material appears self-illuminated and acts as a visible source of light. This property does not work with transparent receiving Materials. Emissive decals always give an additive positive contribution. This property does not affect the existing emissive properties of the Materials assigned to a GameObject. |
1919

2020

2121
### Surface Inputs

com.unity.render-pipelines.high-definition/Editor/AssetProcessors/MaterialPostProcessor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,6 @@ static void ZWriteForTransparent(Material material, HDShaderUtils.ShaderID id)
263263
#endregion
264264
static void RenderQueueUpgrade(Material material, HDShaderUtils.ShaderID id)
265265
{
266-
// In order for the ray tracing keyword to be taken into account, we need to make it dirty so that the parameter is created first
267-
HDShaderUtils.ResetMaterialKeywords(material);
268-
269266
// Replace previous ray tracing render queue for opaque to regular opaque with raytracing
270267
if (material.renderQueue == ((int)UnityEngine.Rendering.RenderQueue.GeometryLast + 20))
271268
{
@@ -279,6 +276,9 @@ static void RenderQueueUpgrade(Material material, HDShaderUtils.ShaderID id)
279276
material.SetFloat(kRayTracing, 1.0f);
280277
}
281278

279+
// In order for the ray tracing keyword to be taken into account, we need to make it dirty so that the parameter is created first
280+
HDShaderUtils.ResetMaterialKeywords(material);
281+
282282
// For shader graphs, there is an additional pass we need to do
283283
if (material.HasProperty("_RenderQueueType"))
284284
{

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,10 @@ protected virtual LightingExplorerTableColumn[] GetHDLightColumns()
528528
{
529529
Undo.RecordObject(tLightData, "Changed shadow resolution override");
530530
tShadowResolution.@override = sShadowResolution.@override;
531+
532+
//SceneView don't update when interacting with Light Explorer when playing and pausing (1354129)
533+
if (EditorApplication.isPlaying && EditorApplication.isPaused)
534+
SceneView.RepaintAll();
531535
}
532536
}),
533537
new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Checkbox, HDStyles.AffectDiffuse, "m_Intensity", 95, (r, prop, dep) => // 16: Affect Diffuse
@@ -546,6 +550,10 @@ protected virtual LightingExplorerTableColumn[] GetHDLightColumns()
546550
{
547551
Undo.RecordObject(lightData, "Changed affects diffuse");
548552
lightData.affectDiffuse = affectDiffuse;
553+
554+
//SceneView don't update when interacting with Light Explorer when playing and pausing (1354129)
555+
if (EditorApplication.isPlaying && EditorApplication.isPaused)
556+
SceneView.RepaintAll();
549557
}
550558
}, (lprop, rprop) =>
551559
{
@@ -580,6 +588,10 @@ protected virtual LightingExplorerTableColumn[] GetHDLightColumns()
580588
{
581589
Undo.RecordObject(lightData, "Changed affects specular");
582590
lightData.affectSpecular = affectSpecular;
591+
592+
//SceneView don't update when interacting with Light Explorer when playing and pausing (1354129)
593+
if (EditorApplication.isPlaying && EditorApplication.isPaused)
594+
SceneView.RepaintAll();
583595
}
584596
}, (lprop, rprop) =>
585597
{

com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/Node/ScleraIrisBlend.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class ScleraIrisBlend : CodeFunctionNode
1010
{
1111
public ScleraIrisBlend()
1212
{
13-
name = "Sclera Limbal Ring (Preview)";
13+
name = "Sclera Iris Blend (Preview)";
1414
}
1515

1616
public override bool hasPreview

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ namespace UnityEditor.Rendering.HighDefinition
1111
{
1212
class EmissionUIBlock : MaterialUIBlock
1313
{
14+
static float s_MaxEvValue = Mathf.Floor(LightUtils.ConvertLuminanceToEv(float.MaxValue));
15+
1416
[Flags]
1517
public enum Features
1618
{
@@ -119,7 +121,7 @@ internal static void UpdateEmissiveColorFromIntensityAndEmissiveColorLDR(Materia
119121

120122
internal static void UpdateEmissiveColorLDRFromIntensityAndEmissiveColor(MaterialProperty emissiveColorLDR, MaterialProperty emissiveIntensity, MaterialProperty emissiveColor)
121123
{
122-
Color emissiveColorLDRLinear = emissiveColorLDR.colorValue / emissiveIntensity.floatValue;
124+
Color emissiveColorLDRLinear = emissiveColor.colorValue / emissiveIntensity.floatValue;
123125
emissiveColorLDR.colorValue = emissiveColorLDRLinear.gamma;
124126
}
125127

@@ -183,7 +185,7 @@ void DrawEmissionGUI()
183185
{
184186
float evValue = LightUtils.ConvertLuminanceToEv(emissiveIntensity.floatValue);
185187
evValue = EditorGUILayout.FloatField(Styles.emissiveIntensityText, evValue);
186-
newIntensity = Mathf.Clamp(evValue, 0, float.MaxValue);
188+
newIntensity = Mathf.Clamp(evValue, 0, s_MaxEvValue);
187189
emissiveIntensity.floatValue = LightUtils.ConvertEvToLuminance(evValue);
188190
}
189191
else

com.unity.render-pipelines.high-definition/Runtime/Compositor/CompositionManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,8 @@ public void UpdateLayerSetup()
503503
SetupLayerPriorities();
504504
}
505505

506-
// Update is called once per frame
507-
void Update()
506+
// LateUpdate is called once per frame
507+
void LateUpdate()
508508
{
509509
// TODO: move all validation calls to onValidate. Before doing it, this needs some extra testing to ensure nothing breaks
510510
if (enableOutput == false || ValidatePipeline() == false || ValidateAndFixRuntime() == false || RuntimeCheck() == false)

com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3360,6 +3360,9 @@ unsafe BuildGPULightListParameters PrepareBuildGPULightListParameters( HDCamera
33603360
for (int viewIndex = 0; viewIndex < hdCamera.viewCount; ++viewIndex)
33613361
{
33623362
var proj = hdCamera.xr.enabled ? hdCamera.xr.GetProjMatrix(viewIndex) : camera.projectionMatrix;
3363+
// Note: we need to take into account the TAA jitter when indexing the light list
3364+
proj = (hdCamera.antialiasing == HDAdditionalCameraData.AntialiasingMode.TemporalAntialiasing) ? hdCamera.GetJitteredProjectionMatrix(proj) : proj;
3365+
33633366
m_LightListProjMatrices[viewIndex] = proj * s_FlipMatrixLHSRHS;
33643367

33653368
for (int i = 0; i < 16; ++i)

0 commit comments

Comments
 (0)