BlendEquation.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*global define*/
  2. define([
  3. '../Core/freezeObject'
  4. ], function(
  5. freezeObject) {
  6. "use strict";
  7. /**
  8. * Determines how two pixels' values are combined.
  9. *
  10. * @namespace
  11. * @alias BlendEquation
  12. */
  13. var BlendEquation = {
  14. /**
  15. * 0x8006. Pixel values are added componentwise. This is used in additive blending for translucency.
  16. *
  17. * @type {Number}
  18. * @constant
  19. */
  20. ADD : 0x8006, // WebGL: FUNC_ADD
  21. /**
  22. * 0x800A. Pixel values are subtracted componentwise (source - destination). This is used in alpha blending for translucency.
  23. *
  24. * @type {Number}
  25. * @constant
  26. */
  27. SUBTRACT : 0x800A, // WebGL: FUNC_SUBTRACT
  28. /**
  29. * 0x800B. Pixel values are subtracted componentwise (destination - source).
  30. *
  31. * @type {Number}
  32. * @constant
  33. */
  34. REVERSE_SUBTRACT : 0x800B // WebGL: FUNC_REVERSE_SUBTRACT
  35. // No min and max like in ColladaFX GLES2 profile
  36. };
  37. return freezeObject(BlendEquation);
  38. });