BlendMode.hx 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. package h2d;
  2. /**
  3. The blending rules when rendering a Tile/Material.
  4. **/
  5. enum BlendMode {
  6. /**
  7. `Out = 1 * Src + 0 * Dst`
  8. **/
  9. None;
  10. /**
  11. `Out = SrcA * Src + (1 - SrcA) * Dst`
  12. **/
  13. Alpha;
  14. /**
  15. `Out = SrcA * Src + 1 * Dst`
  16. **/
  17. Add;
  18. /**
  19. `Out = Src + (1 - SrcA) * Dst`
  20. **/
  21. AlphaAdd;
  22. /**
  23. `Out = (1 - Dst) * Src + 1 * Dst`
  24. **/
  25. SoftAdd;
  26. /**
  27. `Out = Dst * Src + 0 * Dst`
  28. **/
  29. Multiply;
  30. /**
  31. `Out = Dst * Src + (1 - SrcA) * Dst`
  32. **/
  33. AlphaMultiply;
  34. /**
  35. `Out = 0 * Src + (1 - Srb) * Dst`
  36. **/
  37. Erase;
  38. /**
  39. `Out = 1 * Src + (1 - Srb) * Dst`
  40. **/
  41. Screen;
  42. /**
  43. `Out = 1 * Dst - SrcA * Src`
  44. **/
  45. Sub;
  46. /**
  47. The output color is the max of the source and dest colors.
  48. The blend parameters Src and Dst are ignored for this equation.
  49. `Out = MAX( Src, Dst )`
  50. **/
  51. Max;
  52. /**
  53. The output color is the min of the source and dest colors.
  54. The blend parameters Src and Dst are ignored for this equation.
  55. `Out = MAX( Src, Dst )`
  56. **/
  57. Min;
  58. }