XNA - stripes in graphics

Monkey Forums/Monkey Programming/XNA - stripes in graphics

Xaron(Posted 2011) [#1]
Hi all,

I have a very strange problem on a Windows 7 phone (LG E900, with Mango installed).

Here's the original graphic:


And this is how it looks like on the phone:


Please notice the graduation in the green color in the meadow (very noticable at the lower left bottom). For me it looks like there is some kind of color reduction?


dopeyrulz(Posted 2011) [#2]
this may actually be the phone. Some phones (all?) used 16bit imagery, I did think that changed with Mango though. It still could be hardware specific maybe


Xaron(Posted 2011) [#3]
Ok, thanks for the hint. Might be, yes. Has your phone the same restrictions?

So there is no parameter setup somewhere to influence that? My first thought was that there went something wrong with the texture conversion into xnb...


Xaron(Posted 2011) [#4]
Alright, just found out that my phone has a depth of 18 bit (262144 colors).

That might be the reason...

edit: Ok, Angry Birds has the same stripes, so no bug. Sorry!


Floyd(Posted 2011) [#5]
Alright, just found out that my phone has a depth of 18 bit (262144 colors)

With a clever dithering algorithm a 262144 color display can show full color images which look quite good. But if a large area is mainly one of the primary colors, like the green in your example, then the 18-bit color is really only 6-bit. The steps between color intensities are then obvious.

I sometimes see a related effect on my flat panel TV. Normally it looks very good. But it can look awful when showing a very dark colorless image, such as a dimly lit scene in an old black and white movie. Since color intensity is identical for red, green and blue the effective bit depth is a third of the normal value. And with the narrow range of brightness in the dark image the resulting display looks like about 4-bit grayscale.


dopeyrulz(Posted 2011) [#6]
Some info about banding and how to enable 32bit colors:

http://www.istartedsomething.com/20111113/death-to-banding-windows-phone-devs-please-upgrade-your-apps-to-32-bitsperpixel


marksibly(Posted 2012) [#7]
Hi,

Should this be 'on' by default?

Does it upset pre-mango builds?


dopeyrulz(Posted 2012) [#8]
Mark,

Reading the comments in the link I posted above, perhaps not yet. There will/may be a battery and possible performance hit on current phones.

As noted, pre-processing at this stage may be the best option. Users can always add the flag themselves for now - depending on their requirements.

For future reference you need to edit the WMAppManifest.xml file:
<?xml version="1.0" encoding="utf-8"?>
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.1">
  <App xmlns="" BitsPerPixel="32" ...

http://msdn.microsoft.com/en-us/library/ff769509(v=VS.92).aspx