Skip to content

Commit 1a15c50

Browse files
[HDRP] Merge HD/bugfix #6387
1 parent fb4c126 commit 1a15c50

File tree

28 files changed

+87
-48
lines changed

28 files changed

+87
-48
lines changed
Lines changed: 2 additions & 2 deletions
Loading

com.unity.render-pipelines.core/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88

99
### Fixed
1010
- Fixed XR support in CoreUtils.DrawFullscreen function.
11+
- Fixed an issue causing Render Graph execution errors after a random amount of time.
1112

1213
## [12.1.2] - 2021-10-22
1314

com.unity.render-pipelines.core/Editor/Debugging/DebugWindow.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ void OnGUI()
378378
if (GUILayout.Button(Styles.resetButtonContent, EditorStyles.toolbarButton))
379379
{
380380
DebugManager.instance.Reset();
381+
DestroyWidgetStates();
382+
UpdateWidgetStates();
381383
InternalEditorUtility.RepaintAllViews();
382384
}
383385

com.unity.render-pipelines.core/Editor/Volume/VolumeEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void RefreshEffectListEditor(VolumeProfile asset)
7171
{
7272
m_ComponentList.Clear();
7373

74-
asset.Sanitize();
74+
asset?.Sanitize();
7575

7676
if (asset != null)
7777
m_ComponentList.Init(asset, new SerializedObject(asset));

com.unity.render-pipelines.core/Runtime/Debugging/DebugUpdater.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ class DebugUpdater : MonoBehaviour
2020
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
2121
static void RuntimeInit()
2222
{
23-
if (!Debug.isDebugBuild)
24-
return;
25-
23+
#if DEVELOPMENT_BUILD || UNITY_EDITOR
2624
if (DebugManager.instance.enableRuntimeUI)
2725
EnableRuntime();
26+
#endif
2827
}
2928

3029
internal static void SetEnabled(bool enabled)

com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResources.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,21 @@ public bool IsValid()
4848

4949
static public void NewFrame(int executionIndex)
5050
{
51+
uint previousValidBit = s_CurrentValidBit;
5152
// Scramble frame count to avoid collision when wrapping around.
5253
s_CurrentValidBit = (uint)(((executionIndex >> 16) ^ (executionIndex & 0xffff) * 58546883) << 16);
5354
// In case the current valid bit is 0, even though perfectly valid, 0 represents an invalid handle, hence we'll
5455
// trigger an invalid state incorrectly. To account for this, we actually skip 0 as a viable s_CurrentValidBit and
5556
// start from 1 again.
56-
if (s_CurrentValidBit == 0)
57+
// In the same spirit, s_SharedResourceValidBit is reserved for shared textures so we should never use it otherwise
58+
// resources could be considered valid at frame N+1 (because shared) even though they aren't.
59+
if (s_CurrentValidBit == 0 || s_CurrentValidBit == s_SharedResourceValidBit)
5760
{
58-
s_CurrentValidBit = 1 << 16;
61+
// We need to make sure we don't pick the same value twice.
62+
uint value = 1;
63+
while (previousValidBit == (value << 16))
64+
value++;
65+
s_CurrentValidBit = (value << 16);
5966
}
6067
}
6168
}

com.unity.render-pipelines.core/Runtime/Utilities/CameraCaptureBridge.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static bool enabled
3535
/// <returns>Enumeration of actions</returns>
3636
public static IEnumerator<Action<RenderTargetIdentifier, CommandBuffer>> GetCaptureActions(Camera camera)
3737
{
38-
if (!actionDict.TryGetValue(camera, out var actions))
38+
if (!actionDict.TryGetValue(camera, out var actions) || actions.Count == 0)
3939
return null;
4040

4141
return actions.GetEnumerator();

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
3131
- Fixed taa jitter for after post process materials (case 1380967).
3232
- Fixed dirtiness handling in path tracing, when using multiple cameras at once (case 1376940).
3333
- Fixed flickering / edge aliasing issue when DoF and TAAU or DLSS are enabled (case 1381858).
34+
- Fixed rasterized accumulation motion blur when DoF is enabled (case 1378497).
35+
- Fixed light mode not available after switching a light to area "Disc" or "Tube" (case 1372588).
36+
- Fixed CoC size computation when dynamic resolution is enabled
37+
- Fixed shadow cascade transition not working properly with bias.
38+
- Fixed broken rendering when duplicating a camera while the Rendering Debugger is opened.
39+
- Fixed screen space shadow debug view not showing when no shadows is available.
40+
- Fixed nullref from debug menu in release build (case 1381556).
41+
- Fixed debug window reset.
42+
- Fixed camera bridge action in release build (case 1367866).
43+
- Fixed contact shadow disappearing when shadowmask is used and no non-static object is available.
44+
- Fixed atmospheric scattering being incorrectly enabled when scene lighting is disabled.
3445

3546
## [12.1.2] - 2021-10-22
3647

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ static void DrawGeneralContent(SerializedHDLight serialized, Editor owner, bool
227227
EditorGUI.showMixedValue = false;
228228

229229
// Draw the mode, for Tube and Disc lights, there is only one choice, so we can disable the enum.
230-
using (new EditorGUI.DisabledScope(serialized.areaLightShape == AreaLightShape.Tube || serialized.areaLightShape == AreaLightShape.Disc))
230+
using (new EditorGUI.DisabledScope(updatedLightType == HDLightType.Area && (serialized.areaLightShape == AreaLightShape.Tube || serialized.areaLightShape == AreaLightShape.Disc)))
231231
serialized.settings.DrawLightmapping();
232232

233233
if (updatedLightType == HDLightType.Area)

com.unity.render-pipelines.high-definition/Runtime/Lighting/AtmosphericScattering/AtmosphericScattering.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ void EvaluateAtmosphericScattering(PositionInputs posInput, float3 V, out float3
257257

258258
#ifdef DEBUG_DISPLAY
259259
// Don't sample atmospheric scattering when lighting debug more are enabled so fog is not visible
260-
if (_DebugLightingMode >= DEBUGLIGHTINGMODE_DIFFUSE_LIGHTING && _DebugLightingMode <= DEBUGLIGHTINGMODE_EMISSIVE_LIGHTING)
260+
if (_DebugLightingMode == DEBUGLIGHTINGMODE_MATCAP_VIEW || (_DebugLightingMode >= DEBUGLIGHTINGMODE_DIFFUSE_LIGHTING && _DebugLightingMode <= DEBUGLIGHTINGMODE_EMISSIVE_LIGHTING))
261261
return;
262262

263263
if (_DebugShadowMapMode == SHADOWMAPDEBUGMODE_SINGLE_SHADOW || _DebugLightingMode == DEBUGLIGHTINGMODE_LUX_METER || _DebugLightingMode == DEBUGLIGHTINGMODE_LUMINANCE_METER)

0 commit comments

Comments
 (0)