self:get_filter
Client
Retrieves the current sampling filter of the texture
Syntax
local mode = self:get_filter()Parameters
| No parameters are accepted by this function |
|---|
Returns
| Type | Name | Description |
|---|---|---|
core.texture.texture_filter | mode | Sampling filter of the texture |
Examples
local entity = core.texture.create("assets/sprite.png")
if entity:get_filter() == core.texture.texture_filter.DEFAULT then
entity:set_filter(core.texture.texture_filter.NEAREST)
endlocal source = core.texture.create("assets/tiles/grass0.png")
source:set_filter(core.texture.texture_filter.NEAREST)
local target = core.texture.create("assets/tiles/stone0.png")
target:set_filter(source:get_filter())