This algorithm would work only when RGBA values are encoded in premultiplied co-ordinates. Is it a common practice to encode them as such given the added computational advantage?
keenan
@sbhilare Yes, it's super common to work with premultiplied alpha; Google for this and you'll find all sorts of threads about how you get better performance on iPhone, graphics cards, etc., by working in premultiplied coordinates. This makes sense: the transformations you apply are identical across all four channels, hence "more SIMD", and involve less arithmetic. May just have to do a homogeneous divide at the very end (negligible overall).
This algorithm would work only when RGBA values are encoded in premultiplied co-ordinates. Is it a common practice to encode them as such given the added computational advantage?
@sbhilare Yes, it's super common to work with premultiplied alpha; Google for this and you'll find all sorts of threads about how you get better performance on iPhone, graphics cards, etc., by working in premultiplied coordinates. This makes sense: the transformations you apply are identical across all four channels, hence "more SIMD", and involve less arithmetic. May just have to do a homogeneous divide at the very end (negligible overall).