init.lua 775 B

12345678910111213141516171819
  1. return {
  2. summary = 'An object that controls how texture pixels are read.',
  3. description = [[
  4. Samplers are objects that control how pixels are read from a texture. They can control whether
  5. the pixels are smoothed, whether the texture wraps at the edge of its UVs, and more.
  6. Each `Pass` has a default sampler that will be used by default, which can be changed using
  7. `Pass:setSampler`. Also, samplers can be declared in shaders using the following syntax:
  8. layout(set = 2, binding = X) uniform sampler mySampler;
  9. A Sampler can be sent to the variable using `Pass:send('mySampler', sampler)`.
  10. The properties of a Sampler are immutable, and can't be changed after it's created.
  11. ]],
  12. constructors = {
  13. 'lovr.graphics.newSampler'
  14. }
  15. }