Another detail, thanks to some Apple developer forum folks: Put opaque and alpha sprites in different atlases, and minimize their size. Opaque textures don't need alpha channel!
With the opaque sprites, we can probably afford more than 2 triangles per sprite. This will allow for more interesting shapes than quadrangles. Of course, at a certain point, it'll be cheaper to use alpha-masking than a ton of triangles. I should probably write a tool to do mesh simplification in 2D (start with a highly detailed triangulation where each pixel is triangulated), with tweakable thresholds, and then let artists tweak the 2D triangulation manually.
Spatial partitioning will still be necessary to cull the number of vertices we send. This affects FPS greatly.
All this is what the tech note suggests, and it sounds like my only real option. There just doesn't seem to be a fast way to raster tons of alpha-masked sprites using OpenGL ES.
No comments:
Post a Comment