Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by fantom642 · Feb 14, 2015 at 03:50 PM · 2dtexturespriterenderinganti-aliasing

Anti aliasing with sprites

I am developing a 2D game using Unity 4.3.

Can I acheive the same anti aliasing effect using Sprites (img 2) as with Mesh Renderer + Quad Mesh Filter (img 1)?

The problem is as follows: On the image: The first image uses Mesh Renderer and Quad Mesh Filter, which looks ok. However, I am using several images with several color variations. I wanted to minimise the number of drawcalls, so I created a sprite texture with all the images in it. Although the number of drawcalls dropped significantly, the result, as you can see on the second image, is not affected by anti aliasing.

(image is enlarged by 200%)

alt text

I could use the same sprite texture with mesh renderer and just change offset and tiling values, or use UV mapping on mesh, but every time I would need to change the color, a new instance of a material would be added and so the number of drawcalls would increase. (I suppose)

Is there any other solution how to minimise the number of drawcalls and still use anti aliasing?

antialiasing.png (3.8 kB)
Comment
Add comment · Show 6
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image _dns_ · Feb 14, 2015 at 04:32 PM 1
Share

Hi, is the sprite texture in bilinear or trilinear (with mipmap) mode ? It looks like the texture is reduced to be displayed, in that case, trilinear will help blur pixels because it will use texels from a lower resolution mipmap (well, I'm not sure sprite renderer can use trinilear/mipmap as mesh renderer does, that could explain the difference)

avatar image fantom642 · Feb 14, 2015 at 04:42 PM 0
Share

This is using trilinear. I don't know what the mipmap mode is, the inspector doesn't give any such option for the sprite texture type

avatar image _dns_ · Feb 14, 2015 at 06:25 PM 1
Share

I have the trilinear + "generate mip maps" option with unity 4.6, this might have been added recently. I can also use the sprite editor with the "advanced" texture mode that propose even more options but I'm not sure it was available with 4.3. $$anonymous$$aybe it's time to upgrade (or just install the 4.6 in another directory so you can see if it works with it ?)

If you have to stick with 4.3 and want to reduce drawcalls, I would suggest using a shader that supports vertex color and change the vertex colors in the mesh itself at run time. Using small meshes with the same shader should allow dynamic batching to work.

avatar image fantom642 · Feb 14, 2015 at 11:23 PM 0
Share

in 4.6, trilinear + "generate mip maps" solved the problem, thanks

It screwed up my physics2D though. I you happen to know how to fix it please let me know here

avatar image jreisam · May 25, 2017 at 06:17 PM 0
Share

looking for the same solution |:

Show more comments

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Texture type -> Advanced -> Mesh type: how it works? 1 Answer

reset 2d animation(sprite sheet texture) 0 Answers

Tilling material on sprites it's not working correctly 1 Answer

How to break a sprite into shapes with script 1 Answer

Packing particles textures into one map 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges