mirror of
https://github.com/Relintai/material-maker.git
synced 2024-12-23 21:16:54 +01:00
Disable filtering for small textures in the material preview
This makes previewing materials with a pixel art style closer to the intended result.
This commit is contained in:
parent
80f8071d7b
commit
c00a77eaa4
@ -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