Search Issue Tracker

By Design

Votes

0

Found in

2022.2.0b1

Issue ID

UUM-7963

Regression

No

Renderer Feature does not work in Edit Mode for materials created in "OnCameraSetup" using "CoreUtils.CreateEngineMaterial"

-

How to reproduce:
1. Open project “Bug.zip”
2. Open “Rotoscope” Scene (Assets > Files > Rotoscope)
3. In the Project window select “ForwardRenderer.asset” (Assets > Settings > ForwardRendering)
4. Press the “Add Renderer Feature” button and select “Rotoscope Feature”
5. Observe the Scene view

Expected result: Scene view is changed
Actual result: Scene view is not changed

Reproducible with: 10.9.0 (2020.3.36f1), 12.1.7 (2021.3.6f1), 13.1.8 (2022.1.8f1), 14.0.3 (2022.2.0a19), 15.0.0 (2023.1.0a2)

Reproduced on: macOS 12.4 (Intel)

Note: Renderer Feature does execute in Scene view if the same material is created from the Render Feature's create method

  1. Resolution Note:

    See documentation for ExecuteCommandBuffer: https://docs.unity3d.com/ScriptReference/Rendering.ScriptableRenderContext.ExecuteCommandBuffer.html

    The command buffers are executed on ScriptableRenderContext.Submit which is after the OnCameraCleanup. This causes the material to be destroyed before being used. If you don't remove the material it will render as expected.

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.