BlendAlphaMode.lua 1.0 KB

12345678910111213141516171819202122232425262728
  1. return {
  2. summary = 'Different ways of blending alpha.',
  3. description = 'Different ways the alpha channel of pixels affects blending.',
  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 channels are not multiplied by the alpha channel. This should be used if the pixels
  13. being drawn have already been blended, or "pre-multiplied", by the alpha channel.
  14. ]]
  15. }
  16. },
  17. notes = [[
  18. The premultiplied mode should be used if pixels being drawn have already been blended, or
  19. "pre-multiplied", by the alpha channel. This happens when rendering a framebuffer that contains
  20. pixels with transparent alpha values, since the stored color values have already been faded by
  21. alpha and don't need to be faded a second time with the alphamultiply blend mode.
  22. ]],
  23. related = {
  24. 'BlendMode',
  25. 'lovr.graphics.getBlendMode',
  26. 'lovr.graphics.setBlendMode'
  27. }
  28. }