You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unrolled each of the opaque and transparent braches into four iterations, so stretches of the same pixel opaqueness/transparency mostly fall through the jumps and execute faster.
Before (12 bytes):
* opaque->opaque: 41 cc
* opaque->trans: 36 cc
* trans->opaque: 46 cc
* trans->trans: 41 cc
After (54 bytes; lists cycles after 1/2/3/4 mod 4 iterations in a row of previous pixel state):
* opaque->opaque: 36/36/36/41 cc
* opaque->trans: 41/41/41/36 cc
* trans->opaque: 38/38/38/46 cc
* trans->trans: 33/33/33/38 cc
Starts on the fast transparent path based on the assumption that the majority of transparent sprite pixel rows start with a transparent pixel, as transparency is often used to draw "cutout" images.
0 commit comments