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
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.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-92046 in the post.
1 |
Component | UE - Graphics Features |
---|---|
Affects Versions | 4.24.3, 4.25, 4.26 |
Target Fix | 4.26 |
Created | Apr 15, 2020 |
---|---|
Resolved | Apr 16, 2020 |
Updated | Jun 22, 2020 |