BlendMode.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. return {
  2. summary = 'Different blend modes.',
  3. description = [[
  4. Blend modes control how overlapping pixels are blended together, similar to layers in Photoshop.
  5. ]],
  6. values = {
  7. {
  8. name = 'alpha',
  9. description = 'Normal blending where the alpha value controls how the colors are blended.'
  10. },
  11. {
  12. name = 'add',
  13. description = 'The incoming pixel color is added to the destination pixel color.'
  14. },
  15. {
  16. name = 'subtract',
  17. description = 'The incoming pixel color is subtracted from the destination pixel color.'
  18. },
  19. {
  20. name = 'multiply',
  21. description = [[
  22. The color channels from the two pixel values are multiplied together to produce a result.
  23. ]]
  24. },
  25. {
  26. name = 'lighten',
  27. description = [[
  28. The maximum value from each color channel is used, resulting in a lightening effect.
  29. ]]
  30. },
  31. {
  32. name = 'darken',
  33. description = [[
  34. The minimum value from each color channel is used, resulting in a darkening effect.
  35. ]]
  36. },
  37. {
  38. name = 'screen',
  39. description = [[
  40. The opposite of multiply: The pixel values are inverted, multiplied, and inverted again,
  41. resulting in a lightening effect.
  42. ]]
  43. }
  44. },
  45. related = {
  46. 'BlendAlphaMode',
  47. 'lovr.graphics.getBlendMode',
  48. 'lovr.graphics.setBlendMode'
  49. }
  50. }