Search Feedback

28
votes

Option to force non-transparent sprites to be atlassed with transparent ones

Assets

-

-

Some of my UI sprites don't feature any transparent pixels, and so unity's texture importer defaults to using a texture format with no alpha channel.

Because of this the sprite packer will put my UI graphics into separate textures even though it's unnecessary.

So when the UI is being rendered, it is forced to do material switches to render transparent/non-transparent which can increase the draw calls a lot unecessarily!

It would be great if I could signal some way that the non-transparent textures are allowed to be packed with transparent ones, or should be forced to use a format with an alpha-channel or something like this.

Comments (2)

  1. 5c58a8c8cfdba8d8212c2eb81e56691c?d=mm

    andymads

    Jan 31, 2017 10:17

    You can do this in the import settings if you override for a particular platform. You can set the format to one that has alpha.

  2. 495e55a1ab7af58b9c2dbec7b81135f1?d=mm

    Peter77

    Jan 28, 2017 02:12

    > Some of my UI sprites don't feature any transparent pixels,
    > and so unity's texture importer defaults to using a texture format with no alpha channel.

    This was a bug in Unity that has been fixed:
    https://issuetracker.unity3d.com/issues/textureimporter-removes-the-white-alpha-channel

    With this bug being fixed, there shouldn't be a need from Unity's side to implement specific "force non-transparent sprites to be atlassed with transparent ones" functionality.

    Adding an alpha channel to your textures, prior importing them in Unity, should do the trick.

Your opinion counts

Help us make things better. Share your great idea for improving Unity or vote for other people’s.

Log in to post a new idea

Categories

All

(8933)

2D

(219)

Ads

(40)

AI & Navigation

(64)

Analytics

(90)

Animation

(295)

Asset Store

(217)

Assets

(487)

Audio

(156)

Cloud Build

(93)

Collaborate

(30)

Docs & Tutorials

(193)

Editor

(2063)

Everyplay

(13)

Game Performance Reporting

(12)

General

(804)

Graphics

(749)

GUI

(361)

Input

(143)

Licensing

(73)

Networking

(157)

Physics

(334)

Platforms

(401)

Profiling & Optimization

(68)

Runtime

(159)

Scripting

(1002)

Terrain

(151)

WebGL

(131)