Search Issue Tracker
Fixed
Fixed in 2022.3.51f1
Votes
6
Found in
2023.2.20f1
6000.0.0f1
Issue ID
UUM-70740
Regression
Yes
"SupportsRandomWriteOnRenderTextureFormat()" shows "False" when executed on 2023.2 and 6000.0 streams
Reproduction steps:
1. Open the attached “repro_IN-74679“ project
2. Open the “/Assets/Scenes/SampleScene.unity“ Scene
3. Check the message that appears in the Console
Expected result: “SupportsRandomWriteOnRenderTextureFormat() True“ is displayed
Actual result: “SupportsRandomWriteOnRenderTextureFormat() False” is displayed
Reproducible with: 2023.2.0a6, 2023.2.20f1, 6000.0.0f1
Not reproducible with: 2021.3.37f1, 2022.3.26f1, 2023.2.0.0a5
Reproducible on: macOS Sonoma 14.4.1
Not reproducible on: No other environments tested
Note: Reproducible in Player
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
- Inconsistent behaviour when interacting with different dropdown types with pointer events on parent Visual Element
- Hidden GameObjects won't re-enable when they have call "DontDestroyOnLoad" function
- Overlay Canvas are rendered on each split-screen camera when HDR is enabled
- [Android] The Player loses focus when using UnityEngine.Handheld.StartActivityIndicator() with Facebook SDK
- Build fails with "Building Library/Bee/artifacts/MacStandalonePlayerBuildProgram/gahcy/hj9mx3z/951.0 failed with output:..." errors when Scripting Backend is set to IL2CPP
Resolution Note (fix version 2022.3.51f1):
According to Unity's documentation, the term "random write" denotes if shaders can write into arbitrary locations of a textures. (https://docs.unity3d.com/ScriptReference/RenderTexture-enableRandomWrite.html).
When using D3D11, SupportsRandomWriteOnRenderTextureFormat() should return whether a texture format can be used as a Unordered Access View (UAV). UAVs support *simultaneous* random reads and writes.
In Metal, the term UAV is not used. We need to check the Metal device readWriteTextureSupport. The official Metal documentation of both MTLReadWriteTextureTier.tier1 and MTLReadWriteTextureTier.tier2 does not mention any rg16 format. Therefore the behavior of Unity 6 that returns false for RG16 is correct and this will be fixed on 2022.3.