Search Issue Tracker
Won't Fix
Won't Fix in 6000.0.X
Votes
3
Found in
2022.2.8f1
2023.1.0b5
2023.2.0a4
2023.3.0a3
6000.0.0b11
Issue ID
UUM-28088
Regression
No
“Texture creation failed.” and “NullReferenceException” errors when Camera.Render() and Decal Render Feature are used
Reproduction steps:
1. Open the attached project “UBug”
2. Enter Play mode
Expected result: no errors in the Console
Actual result: there are “Texture creation failed.” and “NullReferenceException” errors in the Console
Reproducible with: 2022.2.8f1, 2023.1.0b5, 2023.2.0a4
Could not test with: 2020.4.45f1, 2021.3.18f1 (There are other errors after entering Play mode)
Reproducible on: macOS 12.4 (Intel), Windows 11 (user’s)
Note:
1. Relevant code is in BillboardGenerator.cs, where Camera.Render() is called
2. Not reproducible if "Decal" is disabled on URP-HighFidelity-Renderer.asset
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
- GPU device suspended error when replaying a video in the Video Player with NVIDIA Vertical Sync set to Fast
- GPU device suspended error when replaying a video in the Video Player with NVIDIA Vertical Sync set to Fast
- SetComponentEnabled uses class instead of struct when constraining Enableable Component type
- [iOS] Application.deepLinkActivated does not get invoked while app is running when UIApplicationSceneManifest is added in Info.plist
- Inspector scroll area stretches when using components with nested serialized arrays on FBX model prefab instances
Resolution Note:
I cannot repro the null pointer reference with the latest LTS. However, the error message says "RenderTexture.Create failed: colorFormat & depthStencilFormat cannot both be none."
Setting a random depthStencilFormat fixes the issue. So right after,
RT = new RenderTexture(width, height, 0, RenderTextureFormat.ARGB32);
add one line,
RT.depthStencilFormat = GraphicsFormat.A10R10G10B10_XRSRGBPack32;
This fixes the issue.
Resolution Note (6000.0.X):
I cannot repro the null pointer reference with the latest LTS. However, the error message says "RenderTexture.Create failed: colorFormat & depthStencilFormat cannot both be none."
Setting a random depthStencilFormat fixes the issue. So right after,
RT = new RenderTexture(width, height, 0, RenderTextureFormat.ARGB32);
add one line,
RT.depthStencilFormat = GraphicsFormat.A10R10G10B10_XRSRGBPack32;
This fixes the issue.