BlendAlphaMode.lua 1.1 KB

12345678910111213141516171819202122232425262728
  1. return {
  2. summary = 'Whether premultiplied alpha is enabled.',
  3. description = 'Controls whether premultiplied alpha is enabled.',
  4. values = {
  5. {
  6. name = 'alphamultiply',
  7. description = 'Color channel values are multiplied by the alpha channel during blending.'
  8. },
  9. {
  10. name = 'premultiplied',
  11. description = [[
  12. Color channel values are not multiplied by the alpha. Instead, it's assumed that the colors
  13. have already been multiplied by the alpha. This should be used if the pixels being drawn
  14. have already been blended, or "pre-multiplied".
  15. ]]
  16. }
  17. },
  18. notes = [[
  19. The premultiplied mode should be used if pixels being drawn have already been blended, or
  20. "pre-multiplied", by the alpha channel. This happens when rendering to a texture that contains
  21. pixels with transparent alpha values, since the stored color values have already been faded by
  22. alpha and don't need to be faded a second time with the alphamultiply blend mode.
  23. ]],
  24. related = {
  25. 'BlendMode',
  26. 'Pass:setBlendMode'
  27. }
  28. }