Skip to content

Commit 40458a5

Browse files
Fixed camera bridge action in release build (#6313)
Co-authored-by: JulienIgnace-Unity <julien@unity3d.com>
1 parent 6906070 commit 40458a5

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
3636
- Fixed screen space shadow debug view not showing when no shadows is available.
3737
- Fixed nullref from debug menu in release build (case 1381556).
3838
- Fixed debug window reset.
39+
- Fixed camera bridge action in release build (case 1367866).
3940

4041
### Changed
4142
- Optimizations for the physically based depth of field.

com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,6 +1395,8 @@ public ScreenSpaceReflectionAlgorithm
13951395
MaterialPropertyBlock m_RecorderPropertyBlock = new MaterialPropertyBlock();
13961396
Rect? m_OverridePixelRect = null;
13971397

1398+
internal bool hasCaptureActions => m_RecorderCaptureActions != null;
1399+
13981400
// Keep track of the previous DLSS state
13991401
private DynamicResolutionHandler.UpsamplerScheduleType m_PrevUpsamplerSchedule = DynamicResolutionHandler.UpsamplerScheduleType.AfterPost;
14001402

com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ internal static bool PostProcessIsFinalPass(HDCamera hdCamera)
905905
// Post process pass is the final blit only when not in developer mode.
906906
// In developer mode, we support a range of debug rendering that needs to occur after post processes.
907907
// In order to simplify writing them, we don't Y-flip in the post process pass but add a final blit at the end of the frame.
908-
return !Debug.isDebugBuild && !WillCustomPassBeExecuted(hdCamera, CustomPassInjectionPoint.AfterPostProcess);
908+
return !Debug.isDebugBuild && !WillCustomPassBeExecuted(hdCamera, CustomPassInjectionPoint.AfterPostProcess) && !hdCamera.hasCaptureActions;
909909
}
910910

911911
// These two convertion functions are used to store GUID assets inside materials,

0 commit comments

Comments
 (0)