mirror of
https://github.com/Relintai/material-maker.git
synced 2024-11-13 06:27:18 +01:00
Merge pull request #40 from Calinou/small-textures-disable-filtering
Disable filtering for small textures in the material preview
This commit is contained in:
commit
93dd1ca1f0
@ -89,6 +89,11 @@ func render_textures(renderer : MMGenRenderer):
|
||||
result.release()
|
||||
# To work, this must be set after calling `copy_to_texture()`
|
||||
texture.flags |= ImageTexture.FLAG_ANISOTROPIC_FILTER
|
||||
|
||||
# Disable filtering for small textures, as they're considered to be used
|
||||
# for a pixel art style
|
||||
if texture.get_size().x <= 128:
|
||||
texture.flags ^= ImageTexture.FLAG_FILTER
|
||||
elif t.has("ports"):
|
||||
var context : MMGenContext = MMGenContext.new(renderer)
|
||||
var code = []
|
||||
@ -114,6 +119,11 @@ func render_textures(renderer : MMGenRenderer):
|
||||
# To work, this must be set after calling `copy_to_texture()`
|
||||
texture.flags |= ImageTexture.FLAG_ANISOTROPIC_FILTER
|
||||
|
||||
# Disable filtering for small textures, as they're considered to be used
|
||||
# for a pixel art style
|
||||
if texture.get_size().x <= 128:
|
||||
texture.flags ^= ImageTexture.FLAG_FILTER
|
||||
|
||||
generated_textures[t.texture] = texture
|
||||
|
||||
func update_materials(material_list):
|
||||
|
Loading…
Reference in New Issue
Block a user