Improve generated river terrain
This commit is contained in:
parent
8456093f8c
commit
e6f46dcad9
21 changed files with 586 additions and 18 deletions
|
|
@ -1,6 +1,11 @@
|
|||
extends SceneTree
|
||||
|
||||
const POLICY := preload("res://main/texture_sampling_policy.gd")
|
||||
const PROJECTED_TERRAIN_TEXTURE_IMPORTS: Array[String] = [
|
||||
"res://world/generation/chunks/assets/chunk_0000_grass_lite.png.import",
|
||||
"res://world/generation/chunks/assets/chunk_0001_sand.png.import",
|
||||
"res://world/generation/chunks/assets/chunk_0031_dirt.png.import",
|
||||
]
|
||||
|
||||
var failures: Array[String] = []
|
||||
|
||||
|
|
@ -83,9 +88,14 @@ func _validate_repository_files(path: String) -> void:
|
|||
|
||||
func _validate_import_file(path: String) -> void:
|
||||
var source := FileAccess.get_file_as_string(path)
|
||||
var expects_mipmaps := path in PROJECTED_TERRAIN_TEXTURE_IMPORTS
|
||||
_check(
|
||||
"mipmaps/generate=true" not in source,
|
||||
"Texture import generates mipmaps: %s" % path,
|
||||
("mipmaps/generate=true" in source) == expects_mipmaps,
|
||||
(
|
||||
"Projected terrain mipmap policy mismatch: %s"
|
||||
if expects_mipmaps
|
||||
else "Texture import generates unapproved mipmaps: %s"
|
||||
) % path,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue