TextureUsage
EditThese are the different things Textures can be used for. When creating a Texture, a set of these flags can be provided, restricting what operations are allowed on the texture. Using a smaller set of flags may improve performance. If none are provided, the only usage flag applied is sample.
| Value | Description |
| sample |
Whether the texture can be sampled from in Shaders (i.e. used in a material, or bound to a variable with a texture type, like texture2D).
|
| render |
Whether the texture can be rendered to (i.e. by using it as a render target in lovr.graphics.pass).
|
| storage |
Whether the texture can be used as a storage texture for compute operations (i.e. bound to a variable with an image type, like image2D).
|
| transfer |
Whether the texture can be used for transfer operations like Texture:setPixels, Texture:blit, etc.
|