Jason Rogers
Jason Rogers

Reputation: 19344

Android Textures appear unclear/fuzzy

I'm having trouble making my texture rendered correctly in my applications. the artwork I use is precise and already scaled and the right size but when I render it on phone suddenly my texture are not as clear/precise as the original artwork and I can't figure out why.

has anybody had this issue before?

Upvotes: 1

Views: 675

Answers (3)

Jason Rogers
Jason Rogers

Reputation: 19344

Ok I finally figured it out

the problem I was having was coming from the default compatibility mode of android

I had to add this to my manifest

Upvotes: 0

Dr. Snoopy
Dr. Snoopy

Reputation: 56347

This might also happen if you use linear filtering in your texture, make sure that texture filters are GL_NEAREST for GL_MIN_FILTER and GL_MAG_FILTER.

Upvotes: 0

Mads Lee Jensen
Mads Lee Jensen

Reputation: 4648

This is because android will compress all resources that are not placed inside /res/raw/

http://developer.android.com/guide/topics/graphics/2d-graphics.html

Note: Image resources placed in res/drawable/ may be automatically optimized with lossless image compression by the aapt tool. For example, a true-color PNG that does not require more than 256 colors may be converted to an 8-bit PNG with a color palette. This will result in an image of equal quality but which requires less memory. So be aware that the image binaries placed in this directory can change during the build. If you plan on reading an image as a bit stream in order to convert it to a bitmap, put your images in the res/raw/ folder instead, where they will not be optimized.

Upvotes: 2

Related Questions