diff --git a/CHANGELOG-PRERELEASE.md b/CHANGELOG-PRERELEASE.md index 518dd686d..2e80980e4 100644 --- a/CHANGELOG-PRERELEASE.md +++ b/CHANGELOG-PRERELEASE.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog]. ### Removed ### Fixed +- Texture Packing which resolves to the white texture would break the Unity Editor `#1193` ### Security diff --git a/CHANGELOG.md b/CHANGELOG.md index c7566641d..66451ea66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ The format is based on [Keep a Changelog]. - We may relax some restriction in the future. - Because we have to check for each condition if we use AnyState but we can check for only one (in best case) with entry/exit, this generally reduces cost for checking an parameter in a state. - Combined with Entry / Exit to 1D BlendTree optimization, which is implemented in previous release, your AnyState layer may be optimized to 1D BlendTree. -- Optimize Texture in Trace nad Optimize `#1181` `#1184` +- Optimize Texture in Trace nad Optimize `#1181` `#1184` `#1193` - Avatar Optimizer will pack texture and tries to reduce the VRAM usage. - Currently liltoon is only supported. - `Copy Enablement Animation` to Merge Skinned Mesh `#1173` diff --git a/Editor/Processors/TraceAndOptimize/OptimizeTexture.cs b/Editor/Processors/TraceAndOptimize/OptimizeTexture.cs index 0363dc26c..f4684591e 100644 --- a/Editor/Processors/TraceAndOptimize/OptimizeTexture.cs +++ b/Editor/Processors/TraceAndOptimize/OptimizeTexture.cs @@ -835,13 +835,7 @@ private AtlasResult BuildAtlasResult(AtlasIsland[] atlasIslands, Vector2 atlasSi // if color is consist of 0 or 1, isSrgb not matters so assume it's linear var isSrgb = texture2D.isDataSRGB && color is not { r: 0 or 1, g: 0 or 1, b: 0 or 1 }; - if (color is { r: 0, g: 0, b: 0, a: 0 }) - newTexture = Texture2D.blackTexture; - else if (color is { r: 1, g: 1, b: 1, a: 1 }) - newTexture = Texture2D.whiteTexture; - else if (color is { r: 1, g: 0, b: 0, a: 0 }) - newTexture = Texture2D.redTexture; - else if (ColorTextures.TryGetValue((color, isSrgb), out var cachedTexture)) + if (ColorTextures.TryGetValue((color, isSrgb), out var cachedTexture)) newTexture = cachedTexture; else {