Sampler
EditSamplers are objects that control how pixels are read from a texture. They can control whether the pixels are smoothed, whether the texture wraps at the edge of its UVs, and more.
Each Pass has a default sampler that will be used by default, which can be changed using Pass:setSampler. Also, samplers can be declared in shaders using the following syntax:
uniform sampler mySampler;
A Sampler can be sent to the variable using Pass:send('mySampler', sampler).
The properties of a Sampler are immutable, and can't be changed after it's created.
Constructor
| lovr.graphics.newSampler | Create a new Sampler. |
Methods
| Sampler:getAnisotropy | Get the anisotropy level of the Sampler. |
| Sampler:getCompareMode | Get the compare mode of the Sampler. |
| Sampler:getFilter | Get the filter mode of the Sampler. |
| Sampler:getMipmapRange | Get the mipmap range of the Sampler. |
| Sampler:getWrap | Get the wrap mode of the Sampler. |
| Object:release | Immediately release the Lua reference to an object. |
| Object:type | Get the type name of the object. |