mirror of
https://github.com/Relintai/material-maker.git
synced 2024-11-13 06:27:18 +01:00
Enable 16× anisotropic filtering in the 3D preview
This improves rendering quality, especially when viewing the texture at an oblique angle.
This commit is contained in:
parent
3076b279bd
commit
f91f85d005
@ -87,6 +87,8 @@ func render_textures(renderer : MMGenRenderer):
|
||||
texture = ImageTexture.new()
|
||||
result.copy_to_texture(texture)
|
||||
result.release()
|
||||
# To work, this must be set after calling `copy_to_texture()`
|
||||
texture.flags |= ImageTexture.FLAG_ANISOTROPIC_FILTER
|
||||
elif t.has("ports"):
|
||||
var context : MMGenContext = MMGenContext.new(renderer)
|
||||
var code = []
|
||||
@ -109,6 +111,9 @@ func render_textures(renderer : MMGenRenderer):
|
||||
texture = ImageTexture.new()
|
||||
result.copy_to_texture(texture)
|
||||
result.release()
|
||||
# To work, this must be set after calling `copy_to_texture()`
|
||||
texture.flags |= ImageTexture.FLAG_ANISOTROPIC_FILTER
|
||||
|
||||
generated_textures[t.texture] = texture
|
||||
|
||||
func update_materials(material_list):
|
||||
|
@ -179,4 +179,5 @@ file_logging/enable_file_logging=true
|
||||
|
||||
[rendering]
|
||||
|
||||
quality/filters/anisotropic_filter_level=16
|
||||
environment/default_environment="res://default_env.tres"
|
||||
|
Loading…
Reference in New Issue
Block a user