setAlphaSampling.lua 853 B

1234567891011121314151617181920212223
  1. return {
  2. tag = 'graphicsState',
  3. summary = 'Enable or disable alpha sampling.',
  4. description = [[
  5. Enables or disables alpha sampling. Alpha sampling is also known as alpha-to-coverage. When it
  6. is enabled, the alpha channel of a pixel is factored into how antialiasing is computed, so the
  7. edges of a transparent texture will be correctly antialiased.
  8. ]],
  9. arguments = {
  10. {
  11. name = 'enabled',
  12. type = 'boolean',
  13. description = 'Whether or not alpha sampling is enabled.'
  14. }
  15. },
  16. returns = {},
  17. notes = [[
  18. - Alpha sampling is disabled by default.
  19. - This feature can be used for a simple transparency effect, pixels with an alpha of zero will
  20. have their depth value discarded, allowing things behind them to show through (normally you
  21. have to sort objects or write a shader for this).
  22. ]]
  23. }