Search Issue Tracker
Fixed in 2021.2.X
Votes
0
Found in
2017.3.0b9
2019.4
2020.2
Issue ID
979487
Regression
No
Texture2D.ReadPixels does not take into account the specified depthSlice
How to reproduce:
1. Open the user's attached "979487_ReadPixel.zip" project
2. Open the Test Runner window (Window -> General -> Test Runner)
3. Press "Run All" in the Test Runner window
Expected result: Test passes because ReadPixels() reads the specified slice and applies to a Texture2D, which is then checked against the source pixel data and matches
Actual result: Test fails on the second (index 1) slice, as ReadPixels() only reads the first (index 0) slice, even when specified otherwise. This then does not match the second slice of the source data, as it's reading the first slice
Reproducible with: 2019.4.10f1, 2020.1.6f1, 2020.2.0b3
Could not test with: 2018.4.27f1 (Crashes when downgrading)
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
- INVALID_ENUM warning is thrown in WebGL Player when building an empty scene
- Crash on ApiGLES::ClearBufferSubData when running the Player a second time on Meta Quest 2
- "Process VFXCamera Command" column is displayed in the "Render Graph Viewer" when there are no VFX in the Scene
- [Performance] Vulkan performing much worse than OpenGLES due to excessive buffer copies on Quest 2/3
- An error 'AssertionException: Assertion failure. Value was False' is displayed in the Console when maximizing or unmaximizing the UI Builder
Resolution Note (fix version 2021.2):
Fixed in: 2021.2.0a10