English subtitles

← Premultiplied Alpha - Interactive 3D Graphics

Get Embed Code
2 Languages

Showing Revision 2 created 05/24/2016 by Udacity Robot.

  1. One idea you'll run across with transparent textures is that of premultiplied
  2. alpha. PMG files never used premultiplied alpha. Other formats vary. Texture
  3. data can be stored however you want in memory, either unmultiplied or
  4. premultiplied. So what's it mean? Here's the blending equation normally used
  5. for transparency. The source, that is the transparent object, is blended with
  6. the destination, the object behind it using the source's alpha value.
  7. Premultiplied alpha means just that. The term alpha source times color source
  8. is going to be the same every time this texture data is accessed. We can
  9. premultiply the original color by the alpha, and store this new color in
  10. memory. This new equation saves a multiplication every single time this text
  11. cell is accessed. Say we access this texture 60 times a second and a million
  12. text cells are accessed. That saves 60 million multiplies a second, which could
  13. start to add up.