Monday, August 6, 2012

Using shaders to create live wallpapers.

Well, this weekend was interesting!

First, I started playing with live wallpapers using fragment shaders and Rajawali's 3d engine. I made some pretty cool things, but found that frag shaders that do a lot of cos/sin math etc, run horrible on my Motorola Droid, and excellent on my Samsung Galaxy S. 

Also, I killed my Galaxy S by dropping it into a stream while balancing on some logs on a beautiful hike. I was very very sad :-(. There wasn't much water in it, so I took the battery out and shook all of the water out that I could, and then dried it with a tissue. When I got back home I unscrewed everything until the mobo was visible, dried it a little more, and then dropped it into rice. It'll sit there for a few days until I feel brave enough to turn it back on. *says a little prayer*

Anyways, since I'm stuck with my old droid which is slower than a slug, I've been finding ways to make my wallpaper run faster. I decided to make a mesh (number of sections can be altered by user) and then put all of the math into the vertex shader so that it only has to run maybe 100x100 times rather than 480x857 times. Per-pixel math = death of performance on my droid if I'm using a fullscreen quad. Eek!

I will post the link to the wallpaper when I have finished it. It is pretty neat !


No comments:

Post a Comment