Wednesday, November 30, 2011

Snowfall Live Wallpaper v2.06

  - Bug Fix: Pixelated aurora on some devices

We end up fixing this sort of thing here and there.  Generally, it has to do with a texture effect slowly losing its integrity over time, until eventually it just looks like a smear of color.  What's up with that?

Basically, 3D hardware operates at a fairly low level of accuracy.  So long as you keep your numbers small, everything is fine, but bigger numbers get more and more granular.  When you have a number like, say 1.0006 -- that goes down to one ten-thousandth.  At small values, the hardware maintains enough accuracy for that to hold up  just fine.  There might actually be ten-thousand increments between 1 and 2.

If you go bigger though, this stops being true.  If I had a value like 1000.0006 it might just get lopped off and be the same as 1000 is.  At high values it might only have a handful of fractions between whole numbers.  The higher you go, the less accurate the increments get.  Mostly this is okay when it comes to real-time 3D rendering.  A rough approximation is just fine.

So what does this have to do with pixelated aurora effects?  Well, the aurora effect in Snowfall consists of a few overlapping animated models, each of which has a shader on it that's built out of a few layers of textures.  One of these layers scrolls horizontally (the one mixing in the rainbow colors).  As it moves, the colors drift across the screen.

How much that layer has moved at any given frame is based on the amount of time elapsed.  This means if you've had the wallpaper running for a long time -- a few days perhaps -- that number is starting to get pretty big.  That means we're up into the thousands or tens of thousands, and all of a sudden when the hardware goes to render the texture it's starting to get all blocky.

It's easy to fix this sort of problem itself once you know where it is -- in this case using the modulous operator to make sure the value doesn't ever get very large.  The problem is that it's easy to miss doing that even when you know it might be an issue, and these sorts of bugs are easy to overlook since they take a long time to show up.   While we we make a point of testing every release, it may not have been left to run for hours and hours at any given time.

Anyway, long update for a short change list.  Hopefully that informs someone.  :)

10 comments:

  1. I love this wallpaper but I am not able to keep it on my home page of my phone. Every time I power down it does not automaticalloy come up and I have to re-select it again. Now, my pone when to sleep and when I woke it up the wallpaper was not there. Can you help me?

    ReplyDelete
  2. Usually this means you have the wallpaper stored on your SD card. Since the card isn't available until after the phone has finished starting up, anything located there can't be used right away. If you reboot your phone often enough for this to be a problem, I'd encourage moving it back to the main phone memory.

    ReplyDelete
  3. Cant get its to download on to my mobile

    ReplyDelete
  4. Love this wallpaper as I Love many that you create. Just wondering why it does Not go to landscape( Rotation Mode) & also why does this and you other live wallpapers interfere with my Camera? Using Samsung Charge

    ReplyDelete
  5. On my tablet, I now have some black rectangles in the middle of the image. It's the image, not my screen, since they move as I slide from screen to screen. Any idea why? Weren't there before the update. Using the free version.

    ReplyDelete
  6. Heather - We don't do anything with the camera. I'm running our wallpapers constantly and have never had an issue on any of my phones.

    ReplyDelete
  7. I can't get the full version on my mytouch 4 g slide. Frustrating :-/

    ReplyDelete
  8. I was able to download mine, but when I activated the screensaver, it made my phone freeze, to where I had to take out the battery to restart my phone. But to verify my troubleshooting process, I went ahead and tried it a second time, and much to my dismay, it did it again. That was when I knew it was time to uninstall the screensaver. :-( *pout*

    ReplyDelete
  9. Roxi - What kind of phone do you have? We have something like 15 different devices here and I'm not aware of any that have problems. Sometimes people's devices just act funny it seems like. :/

    ReplyDelete