Search Issue Tracker

By Design

Votes

0

Found in [Package]

3.0.3

4.0.0-pre.3

Issue ID

REC-1031

Regression

No

URP: Overlay camera output is black

Package: Recorder

-

[https://forum.unity.com/threads/unity-recorder-targeted-camera-taggedcamera-doesnt-work-with-urp-render-type-overlay.1245274/]

*Repro Steps:*
1. Create a URP project
2. Add a "Base" camera (tag this "MainCamera")
3. Add a "Overlay camera (tag this "UICamera")
4. Configure "Base" camera to stack the above overlay camera
5. Open unity Recorder
6. Add a "Movie" recorder
7. Configure recorder "Capture" as follows
* Source: Targeted Camera
* Camera: TaggedCamera
* Tag: UICamera
8. Start recording and a black movie should be recorded.

*Configuration:*
_OS:_ Windows
_Unity Version:_ 2020.3.12f1
_Recorder Version:_ 2.5.5 (also tested with 3.0.3)

  1. Resolution Note:

    when you have 2 cameras, let's say the MainCamera and a Secondary one,
    and the Secondary one is set as an overlay in the Main one.
    If you attempt to capture Target Camera = Main One, you get a correct capture.
    The capture pass runs within the rendering of the secondary camera.
    It may seem surprising but it makes sense: layers are rendered in order and you want to capture the full composition. With stacking the resulting color buffer of a layer is fed as a background to the next one. So you execute capture on the last layer.
    With Target Camera = Secondary One, no capture occurs.
    The way camera stacking works, with this propagation of color buffers,
    it is not possible to isolate the rendering of a specific layer,
    it'll always include the previous layers.
    So I wouldn't describe this as a bug, and would consider it by design.
    Stacking really is just "draw on top of the color buffer of the previous layer until you run out of layers"

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.