Search Issue Tracker
By Design
Votes
0
Found in
2017.3.0a1
2018.3.0a1
2018.3.0f2
2019.1.0a1
2019.2.0a1
Issue ID
1135734
Regression
No
"RenderTexture" is null in "OnRenderImage" when Multiple Render Targets are set for the Camera
Reproduction steps:
1. Open "New Unity Project.zip" project
2. Enter Play mode
3. Look at the Console window
4. See "RenderTexture src is null!"
Expected Result: RenderTexture is not NULL
Actual Result: RenderTexture is NULL
Reproduced with: 2019.2.0a8, 2019.1.0b7, 2018.3.9f1, 2017.4.23f1
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
- White lighting artifact when a point light with a small emission range and "Hard Shadows" touches an object while a directional light with "Soft Shadows" and another point light are present
Resolution Note:
Src texture doesn't get bind to any of the buffer MRT the script created.
User can use CommandBuffer instead, for example:
CommandBuffer cmd = new CommandBuffer();
cmd.SetGlobalTexture("_CameraDepthTexture", m_DepthBuffer);
cmd.SetRenderTarget(m_ColorBuffer.colorBuffer, m_DepthBuffer.depthBuffer);
m_Camera.AddCommandBuffer(CameraEvent.BeforeSkybox,cmd);