Search Issue Tracker

Won't Fix

Votes

25

Found in

2019.4.32f1

2020.3.23f1

2021.2.3f1

2022.1.0a15

Issue ID

UUM-2631

Regression

No

[URP] Reflection Probe is black after baking when using the Blit Renderer Feature

--

-

Reproduction steps:
1. Open the 'ReflectionProbeTest' project
2. Open the SampleScene
3. Add a new Reflection Probe into the Scene
4. Bake the Reflection Probe

Expected result: the Reflection Probe reflects the skybox
Actual result: the Reflection Probe is black

Reproducible with: 7.7.1 (2019.4.32f1), 10.8.0 (2020.3.23f1), 12.1.1 (2021.2.3f1), 13.1.0 (2022.1.0a15)

Note: to reproduce the issue the 'Blit' Renderer Feature in the Universal Renderer has to be enabled and the 'Event' setting has to be set to one of those modes: 'After Rendering Skybox', 'Before Rendering Transparents', 'After Rendering Transparents', 'Before Rendering Post Processing', 'After Rendering Post Processing', 'After Rendering'

  1. Resolution Note:

    The issue is complaining about the blit sample meant for Unity 2020.1 https://github.com/Unity-Technologies/UniversalRenderingExamples/blob/release/2020.1/Assets/Scripts/Runtime/RenderPasses/Blit.cs (the blit sample is not available on the 'master' branch)

    As stated in this repo's description it is no longer maintained and the samples there will not be updated. For more up to date blit examples in URP see the following pages in the URP package docs:
    - "Blit in XR" for Unity version 2021.3-2022.1
    - "Blit overview" for Unity version 2022.2 - 2023.2

    However, if you are trying to use the old blit sample in 2021.3, you will need to fix some issues. Concretely you will need to:
    1) Move the call to 'renderer.cameraColorTarget' out of the 'AddRenderPasses' method of the Blit renderer feature defined in 'Blit.cs' and call it directly from the 'BlitPass.Execute' method defined in 'BlitPass.cs' (as it's only valid to call 'cameraColorTarget' inside of a 'ScriptableRenderPass')
    2) Make sure the user assigned material's shader is not doing depth testing or backface culling (as these will not be disabled for your shaders automatically and can cause rendering to fail - e.g. black reflection probes). So 'DepthTest' should be set to 'Always' and 'Cull' should be set to 'Off'
    3) Optionally, if you wish you can also skip reflection probe rendering for the blit feature entirely by avoiding calling 'EnqueuePass' in 'AddRenderPasses' when 'renderingData.cameraData.cameraType == CameraType.Reflection'

Comments (4)

  1. primaerfunktion

    May 04, 2023 10:23

    Still running into this

  2. Fernando-Ferreira

    Dec 14, 2022 20:24

    Also happening with Unity URP Sample blit render feature in Unity 2021.3.12f1

  3. Domtav

    Jul 11, 2022 07:53

    When will this problem be fixed? Is his correction only planned?

  4. Cyron_

    Dec 04, 2021 12:44

    To add to this, the reflection probe also turns black when set to realtime.

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.