WebGL performance across devices
What performance can I expect from WebGL on existing devices? This is a somewhat open-ended question, as I'll take the best anyone can give, even if it's vaguely, but in an ideal world, I would like to know what the FPS (or typical frame length, which is a nicer way to measure performance) are possible through:
- 100, 1000 or 10000 vertices with simple constant colors for fragments and a moving camera.
- same with hatching interpolated from vertices (like Gouraud) (similar above?)
- same with shading calculated from fragment (e.g. Blinn-Phong calculated in fragment shader) (much slower?)
- all of the above with the addition of 2d textures
And finally, how bad is the constraint that you control everything from Javascript (if, say, you want to implement a simple game)? It turns out that in practice this is not a "background", but a problem, but the ability to update a state quickly enough to do something interesting in the foreground?
source to share
I have a mobile version of my Quake 3 demo that I've been testing on various devices lately. The results were slightly better than expected, but not impressive:
- In Opera 12 with Motorola Atrix 2 (I think) we got ~ 25FPS
- In Opera 12 with Galaxy tab, I usually see ~ 10 FPS (Large screen / slow rendering)
- Haven't tried Firefox in a while, but it got slightly worse results the last time I looked.
- I have a video of it running on an iPad 2 with a modified version of Safari @ ~ 30FPS
So there you go. Limited data, but data nonetheless. It's worth noting that this is a fairly complex demo, so I'm not very disappointed with the numbers. I am also displaying the scene at 1/2 screen and zoomed to improve performance on mobile.
As such, my initial approach is that it works and will probably be useful for basic use (2D accelerated?), But Inifinity Blade and co. will not yet live in their native language.
source to share