Search Issue Tracker
Fixed in 2021.1.X
Votes
0
Found in
2018.4
2019.4
2019.4.4f1
2020.1
2020.2
Issue ID
1266102
Regression
No
Some Textures are not created when their formats are shown as supported by SystemInfo.SupportsRenderTextureFormat
Reproduction steps:
1. Open attached project "1266102"
2. Open scene "SampleScene"
3. Enter Play Mode
Expected result: All texture formats that are shown as supported by SystemInfo.SupportsRenderTextureFormat are created
Actual result: Some texture formats that are shown as supported by SystemInfo.SupportsRenderTextureFormat are not created
Reproducible with: 2018.4.27f1, 2019.4.11f1, 2020.1.6f1, 2020.2.0b3
Reproduced using: NVIDIA GeForce GTX 1080, 452.06 drivers
Texture Formats that were not created but shown as supported: ARGB1555, Depth, RGB565
Error:
RenderTexture.Create failed: format unsupported for random writes - BGR5A1 UNorm (71).
UnityEngine.StackTraceUtility:ExtractStackTrace ()
TestTexture:TestTextureFormat (UnityEngine.RenderTextureFormat) (at Assets/TestTexture.cs:54)
TestTexture:Awake () (at Assets/TestTexture.cs:15)
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
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts with meta files from previous Editor versions
- Input.mousePosition returns (NaN, NaN, 0.00) when Scene view is opened
Resolution Note (fix version 2021.1):
Not all formats are supported for random access writing. This depends on a number of factors:
- the graphics API (e.g. DirectX, Vulkan, ...)
- actual hardware capabilities
- driver version
Giving an error here is actually expected behavior though there was not easy way to know what formats are supported.
I added SystemInfo.SupportsRandomWriteOnRenderTextureFormat (available in 2021.1.0a2.546) to query if you can enable random access scattering for a given format. Users are expected to query a format before trying to create a RenderTexture.