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.
- Framedebugger: compute shader ints showing up in Float section with wrong value
- Unity Editor process remains running after closing Editor
- Animation is not mirrored when toggling the 'Mirror animation' option in Blend Tree
- OnApplicationPause pauseStatus is incorrect after losing focus on macOS
- "Image invalid format!" Error is thrown when Generating Lights on Vulkan Graphics API and Android Build target