TextureUsage.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. return {
  2. description = [[
  3. These are the different things `Texture`s can be used for. When creating a Texture, a set of
  4. these flags can be provided, restricting what operations are allowed on the texture. Using a
  5. smaller set of flags may improve performance. If none are provided, the only usage flag applied
  6. is `sample`.
  7. ]],
  8. values = {
  9. {
  10. name = 'sample',
  11. description = [[
  12. Whether the texture can be sampled from in Shaders (i.e. used in a material, or bound to a
  13. variable with a `texture` type, like `texture2D`).
  14. ]]
  15. },
  16. {
  17. name = 'render',
  18. description = [[
  19. Whether the texture can be rendered to (i.e. by using it as a render target in
  20. `lovr.graphics.pass`).
  21. ]]
  22. },
  23. {
  24. name = 'storage',
  25. description = [[
  26. Whether the texture can be used as a storage texture for compute operations (i.e. bound to
  27. a variable with an `image` type, like `image2D`).
  28. ]]
  29. },
  30. {
  31. name = 'transfer',
  32. description = [[
  33. Whether the texture can be used for transfer operations like `Texture:setPixels`,
  34. `Texture:blit`, etc.
  35. ]]
  36. }
  37. }
  38. }