Search Issue Tracker
Fixed in 2021.1.X
Votes
2
Found in
2020.2.0a17
Issue ID
1262413
Regression
No
Graphics.CopyTexture fails to copy Texture2D data to Texture3D when the Texture2D is compressed
How to reproduce:
1. Open user's attached "MyPackages_2020_1.zip" project
2. Select the "New Texture3D Atlas" asset from the Project window (Assets folder)
3. Lock the Inspector window
4. Add an Inspector tab (Right-click on any of the existing tabs -> Add Tab -> Inspector)
5. Select the "House", "Bike" and "Gift" assets from the Project window (Assets folder)
6. Lock the second Inspector window
7. In the first Inspector (with Atlas asset selection) make sure the "Slice" option is selected
8. Drag the Z value from 0 to 3
9. Change the Format in the second Inspector (with 3 assets selected) from "RGBA 32 bit" to "RGBA Compressed DXT5"
10. Drag the Z value from 0 to 3
Expected result: All textures are copied correctly from 2D to 3D and can be seen clearly in the Inspector even when source texture is compressed
Actual result: Only the "Bike" texture is copied correctly from 2D to 3D, while the other two textures do not copy correct data and appear as distorted textures when source textures are compressed
Reproducible with: 2020.2.0a17, 2020.2.0a18
Could not test with: 2018.4.25f1, 2019.4.4f1, 2020.1.0b16 and 2020.2.0a1-2020.2.0a16 (UnityEditor.AssetImporters.ScriptedImporterEditor namespace doesn't exist)
Notes:
- Setting the format to RGB Crunched DXT1 or RGBA Crunched DXT5 for the Texture2D results in all 3 textures not copying the correct data to 3D
- The issue is reproducible with RGB(A) Compressed BC7, RGB Compressed DXT1, RG Compressed BC5, R Compressed BC4, RGB HDR Compressed BC6H formats
Comments (1)
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
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
Peter77
Aug 15, 2020 06:26
Related forum thread:
https://forum.unity.com/threads/case-1262413-graphics-copytexture-doesnt-work-to-copy-compressed-texture2d-in-texture3d.929628/