Search Issue Tracker
Fixed in 2019.3.X
Fixed in 2017.4.X
[D3D11] Camera render target not being removed when set to null in batch mode
When executing the editor in batch mode having assigned a render texture to a camera as it's target setting that target to null does not unbind the texture set, preventing it from being used as an input in a later compute shader stage.
( Issue identified during investigation of https://fogbugz.unity3d.com/f/cases/1139556/ )
Steps to reproduce:
1. Download attached project
2. Open the project and comment the BakePVSScene.cs line 68 - "camera.targetTexture = renderTex2;"
3. Select int toolbar NewBorn -> BakeScene
4. Open "bake_static_pvs.log" in the project folder
5. Launch project in batch mode with "-quit -batchmode -executeMethod MoreFun.BakePVSSceneEditor.BakeSceneConfig" command
Expected results: ComputeBuffer return results in batch mode
Actual results: ComputeBuffer doesn't return results in batch mode
Reproduced in: 2019.2.0a11, 2018.3.12f1, 2017.4.25f1
If the baking script (BakePVSScene.cs) is modified so that line 68 after the call to camera.render() is uncommented, assigning a 2nd render texture to the camera, then the results are present as expected in the output text file.
Issue only presents in D3D11 mode; D3D11 debug runtime complains that a texture is bound for output already and thus will not bind it for input.
OpenGL functions fine.
D3D12 functions fine.
Mac in OpenGL mode works fine.
Metal is unknown at this time.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [URP] Incorrect tree shadows are shown in Play Mode when SRP Batcher is enabled
- [iOS][UaaL] After unloading a Unity scene, memory remains allocated depending on how much memory was used in the scene
- [WebGL] "Unable to open archive file" error is thrown in Build when "Compress Local Catalog" option is enabled for Addressables
- editor crashes on trying to open project on a very long path
- Performance in Game View is significantly impacted by Gfx.WaitForPresentOnGfxThread when a second monitor is connected