Search Issue Tracker

Fixed

Won't Fix in 2020.3.X

Fixed in 2021.2.0a18

Votes

0

Found in

2020.3.41f1

Issue ID

UUM-18211

Regression

No

Texture2D creates DXT texture when the unacceptable texture size is given.

--

-

Reproduction steps:

1. Create a new project
2. Import the attached Script (DXTTest.cs)
3. Run Script (Menu Entry > Bug Test > DXT size)
4. Observe the Console window

Expected result: Exception for wrong “DXT” texture resolution thrown into Console window
Actual result: Texture “successfully created”

Reproducible with: 2020.3.41f1, 2021.1.28f1, 2021.2.0a17
Not reproducible with: 2021.2.0a18, 2021.2.19f1, 2021.3.12f1, 2022.1.21f1, 2022.2.0b13, 2023.1.0a16

Reproducible on: intel MacOS 11.6.8

  1. Resolution Note (2020.3.X):

    This change was added in Unity 2021.2 (see https://unity.com/releases/editor/whats-new/2021.2.0: "Restricted DXT/BCn texture compression to textures with multiple-of-four width and height. This ensures the same behavior as the Texture Importer and requires multiple-of-four dimensions when compressing."). However, this will not be backported to 2020.3 since it is a change that may potentially break existing (and fully functional) user projects. If there are particular bugs with non-multiple-of-four BC-compressed textures in Unity 2020.3 (for particular compression formats), these should be handled separately by fixing them instead of by adding restrictions.

    Note: in Unity 2020.3, DXT-textures with non-multiple-of-four sizes are stored in compressed form, but uploaded to GPU in uncompressed form. This behind-your-back-decompression has been dropped in Unity 2021.2 in favor of simply not allowing this compression to begin with.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.