walhore
Topic Author
Posts: 19
Joined: 25 Feb 2013, 17:24

bitmap quality

21 Nov 2013, 23:05

Hi Guys,

This is probably a noobie question so I apologize in advance.

I'm using bitmaps in some buttons and I'm noticing they look fine running from Expression Blend but are very aliased (blocky) in XamlPlayer and Ogre.

Is there some way to control the render quality of bitmaps or a way to optimize how I'm laying them out in XAML?

The bitmaps are 50x50px PNGs and the rectangle that contains the bitmap is set to 50x50. I've tried all the stretch options and it's always the same result.

Thanks for your help!
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: bitmap quality

22 Nov 2013, 10:14

Are you using v1.1.2? Because we fixed an antialiasing problem in that version.

But I think that the problem you are observing is that we convert images to power of two textures. For example, your 50x50 image is being converted to 64x64. If you are using a pixel perfect layout, this can be a problem. The best way to solve this is using power of two textures with several images inside, an atlas. There is a sample in the image tutorial about it.

Could you post the xaml here to verify the problem?
 
walhore
Topic Author
Posts: 19
Joined: 25 Feb 2013, 17:24

Re: bitmap quality

22 Nov 2013, 15:51

Did a quick test and it's the power of 2 issue. I was hoping to get away with how I've been doing wpf in the past. I've been lazy and just been creating individual bitmaps as I need them but this is obviously inefficient. I'll get them into a texture atlas that's a proper size.

Good call, thanks for the help!

Who is online

Users browsing this forum: No registered users and 0 guests