Description

The depth is rendered incorrectly when using a custom projection matrix in SceneCaptureComponent2D.

You can find an example project at [Link Removed]. You can find where the CustomProjectionMatrix is being set at line 76 in SceneCaptureActor.cpp.

Found in 4.24.3 CL#11590370
Reproduced in 4.25 Preview 7 CL#12759524, 4.26 Main CL#12779472

Steps to Reproduce

1. In a new C++ project create two RenderTargets(DemoTarget1 & DemoTarget2).
2.Create a Widget Blueprint that has two images. The two images are set to display DemoTarget1 & DemoTarget2.
3. Create a C++ class that has a SceneCaptureComponent2D and create a child blueprint (CaptureBP).
-Make sure to include a bool(bEnableCusomProjection) that can be used to set a custom projection matrix with a MaxZ value of 10,000.
4. Place two CaptureBPs the scene with the same position and orientation.
5. Place multiple objects into the visible field of the CaptureBPs.
6. Assign DemoTarget1 to one of the CaptureBPs and DemoTarget2 to the other Capture BP.
7. Enable bEnableCustomProjection on one of the CaptureBPs.

Results: The SceneCaptureComponent2D using the CustomProjectionMatrix doesn't render correctly.

Expected: Both SceneCaptureComponent2Ds render correctly.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-92046 in the post.

1
Login to Vote

Fixed
ComponentUE - Graphics Features
Affects Versions4.24.34.254.26
Target Fix4.26
CreatedApr 15, 2020
ResolvedApr 16, 2020
UpdatedJun 22, 2020
View Jira Issue