Merge pull request #33 from Calinou/preview-enable-anisotropic-filtering

Enable 16× anisotropic filtering in the 3D preview
This commit is contained in:
Rodz Labs 2019-10-19 23:45:58 +02:00 committed by GitHub
commit cdfc247fc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -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):

View File

@ -179,4 +179,5 @@ file_logging/enable_file_logging=true
[rendering]
quality/filters/anisotropic_filter_level=16
environment/default_environment="res://default_env.tres"