Search Issue Tracker

Active

Planned for 2022.1.X

Votes

6

Found in

2021.2.0b2

2021.2.4f1

2022.1.0a16

Issue ID

UUM-2383

Regression

Yes

[URP] "Attempting to get Camera relative temporary RenderTexture" is thrown when stacking Camera with different renderers

Affects Version

-

How to reproduce:
1. Open the attached "case_1376601" project
2. Open the "ReproScene" Scene
3. Enter the Play Mode
4. Select the "Main Camera -> Camera" GameObject in the Hierarchy
5. Set the "Renderer" to the "URP Renderer"
6. Observe the Console log

Expected result: No errors are thrown in the Console log. Both Squares are visible in the Scene/Game views
Actual result: A bunch of errors is printed in the Console log. The grey Square disappears

Reproducible with: 12.0.0 (2021.2.0b2), 12.1.1 (2021.2.4f1), 13.1.1 (2022.1.0a16)
Not reproducible: 7.7.1 (2019.4.33f1), 10.7.0 (2020.3.23f1), 12.0.0 (2021.2.0b1)

Thrown errors:
Attempting to get Camera relative temporary RenderTexture (width || height <= 0) via a CommandBuffer in a Sriptable Render Pipeline.
Trying to get a relatively sized RenderBuffer without an active camera.
Trying to get a relatively sized RenderBuffer without an active camera.

  1. Resolution Note:

    Can not stack cameras of different renderers.
    We discussed this and took a decision that it would be a can of worms allowing different renderers to be stackable in this way.
    Instead of errors, warnings are thrown

Comments (2)

  1. HofiOne

    May 02, 2022 14:11

    I can confirm that this is the actual "fix" as the error messages indicate (2021.3.1f1, 2022.1.0b16)

    "Only cameras with compatible renderer types can be stacked. The camera: 2D Camera are using the renderer Renderer2D, but the base camera: 3D Camera are using UniversalRenderer. Will skip rendering
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)"

    but, really? that's all? is this a solution by Unity?
    i call this a shame, sorry :S

    This feature

    - worked nicely up to version 2021.1.28f1 (check the demo of it at https://github.com/HofiOne/URP-2D-vs.-3D-Renderer-and-Lights-interoperability )
    - referenced in the documentation clearly https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@12.1/manual/Lights-2D-intro.html?_ga=2.151639353.1873564627.1637957474-1768085877.1637957474
    - is a great, very useful one

    Unity, please give us a real solution!

    -

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.