<< | Next Archive>>

WebGL Canvas Background-Color visible when using Alpha Blending

I was just working on some rendering code of CopperLicht, the WebgL backend for CopperCube, and noticed a very strange behavior. Somehow, all the transparent elements in the scene looked somehow colored. Playing around with it, I suddenly realized that the color depends on the used background color of the canvas element in the HTML (For an upcoming new feature, you will be able to define the HTML background color for the WebGL canvas in the editor). Setting the color back to its default, black, made it look ok again:

I suspected some strange thing going on somewhere in my shaders, maybe I was setting the background color somewhere erroneously? Or I was multiplying the loaded texture somehow with it somewhere? I was confused.
After searching for a while, nothing like this seemed to happen. The color somehow "shined through" from the background. Hm. Was this a bug in Chrome? I tried out Firefox. The same behavior there. Strange. Both browsers wouldn't have the same unusual bug, would they? So it must have been be a feature. Somehow.

Well, after looking through the WebGL specs, I finally found out that this actually is a feature: It looks like WebGL has alpha destination operations for the canvas turned on by default. Useful for compositing stuff, but probably not what the average WebGL-Canvas programmer is expecting, I guess. At least not me :) You can turn this default to false when getting the canvas context, by using a line like this:

var gl = canvas.getContext("webgl", {alpha: false} );

Which fixes this issue. So maybe this is a usueful blog post for another programmer who also stumbles across this problem. :)

Preinstalled crap on Android phones

For testing, I just bought a new Samsung Android phone. I started it up and went straight to enabling the Debug option. And I'm not planning to use it for other things than testing, but there is one thing I noticed: The amount of crap Samsung put onto that phone is incredible. Samsung Account? AccuWeather? SamsungApps? AllShare? Buddies? DigitalWatch? DualClock? The list counts about 40 entries. You are not even able to uninstall all this crap.
It's just like a new Windows PC with all this senseless apps like Norton-Antivirus on it, unable to remove it without destroying your setup. But worse. Not sure why Samsung is doing this. It's not really improving the user experience...

A bank just told me they are sorry

Followup to my Letter to the Bank Austria: Today, they actually called me, and told me how sorry they are and that this was a big mistake, and so on. They at least tried to excuse this fail about a dozen times, it was quite embarrassing. Additionally, they now offered me to drop my account maintenance charge for 3 months. Which actually reminded me that I even pay for giving them my money. Hm.
Sounded to me like they are afraid of loosing a lot of customers.

Irrlicht 1.8 released!

After quite some time, there is a new release of the Irrlicht 3D engine available today: version 1.8. Yay! The Irrlicht team did quite some work on this, the changelog for this version is about 5 screens long :) Some of the new features are: You can get the new version from the official irrlicht engine website. Thanks to the irrlicht team for all this hard work!

Android Performance Tip

When developing high performance code for android there are already a lot of tips on the web to use. One thing I learned today: Don't believe other people's suggestions on performance if you haven't tried it out yourself. One common misconception I came across multiple times for example is that it is a negligible trade-off when you use ArrayList instead of a real, Java array. For me, this wasn't true. Replacing an ArrayList with the Java array at performance critical parts of my code resulted in an overall 20% speed increase! I think one reason for this also might be that I used arrays of primitive types. When they are in the ArrayList, each type again is wrapped in a wrapper type (like 'Integer' for 'int'), probably also causing an additional impact. So yes, arrays are faster than ArrayList. Sometimes.

My letter to the Bank Austria

The local Austrian Bank, "Bank Austria" introduced their new online banking website/system a week ago. I still have an account with them, although in my opinion they are slow, unreliable, and even not an Austrian Bank, altough their name might imply this (they are italian). Reading comments on forms and various twitter feeds, it appears that all customers have problems with the new system. I thought it might be not a that big problem, but today was the first day I was actually able to log into the system. This is the mail I just sent them:


I'm pretty sure I am not the only one having problems with the new online banking software. Today was the first day since one week (!) where I was able to log in at least, not to be thrown out again by one of the many system errors. Unfortunately, I wasn't neither able to edit my standing orders (error "time check failed", then the second attempt caused a complete blockage of the inner frame with the windows-hourglass symbol) or to start a new deposit via bank account (missing BIC field, also after 'Save as template' a new layer pops, which is completely cut off and cannot be aborted, thus disabling the entire online banking).

As a software developer I realize that the introduction of a new product usually comes with difficulties, but this is a complete failure, which is not really excusable. And you are a bank, working with sensitive data. Have you actually been testing your new software before releasing it? It doesn't look like it.
As I acknowledge from your recent press release as well as your Twitter feed, I don't have the impression that you plan to compensate me or other customers for the the problems arizen by the unability to do payments. I'm now playnning to switch to a different bank soon and and also recommend it to all of my readers.

Best Regards,
Nikolaus Gebhardt

(The original mail was german, of course) I hope to hear back from them, but I don't think they will answer. They are a bank, after all. Why answering their customers? Why testing their online-banking software before release? :)