I messed about with shaders for most of today and it was kind of interesting. I think in future I will have to do a few more experiments. After all of my messing I managed to get my normal mapped sprites working with transparency with just two extra lines of code, thanks to @oleg over in the Gideros forums.
I had the shader working by applying it to each sprite added to the stage. This worked but not correctly as the light source is the same for every sprite so it really ruins the entire thing. Once I changed the code back to work with a RenderTarget it worked just like magic!!
The only issue I have with this shader now is that it does not function correctly with objects that rotate. I’ll make a wee post on this but overall it will be most useful for games like Falling Animals and Breaky Wall where nothing rotates. When considering this.. it will be great for something like a simple single scrolling shooting game so it is possible that it could be added to one (or more) of the examples included in my book 🙂
Then this evening we went out for dinner (yum) at Soprano Petone. It was pretty good but for an Italian joint, the meatballs were not as good as those I have had at Pipi’s.. a Pizza joint in Havelock North. It was still good and they had BYO as well, something that most places in Hawkes Bay do not have!. Tomorrow we will start heading home and stop off at Leonie’s house in Martinborough.. that’s always a pleasure 🙂