Interior Maps #13

Merged
kayomn merged 30 commits from interior-maps into main 2023-02-01 01:16:16 +01:00
1 changed files with 7 additions and 2 deletions
Showing only changes of commit 7526e60037 - Show all commits

View File

@ -15,13 +15,13 @@ enum PaintSlot {
PAINT_3,
}
var _albedo_maps: Array[Texture2D] = [null, null, null, null]
var _albedo_maps: Array[Texture2D] = []
var _material := ShaderMaterial.new()
var _mesh := PlaneMesh.new()
var _normal_maps: Array[Texture2D] = [null, null, null, null]
var _normal_maps: Array[Texture2D] = []
##
## Range of the height channel value, ranging from [code]0.0[/code] to [code]100.0[/code].
@ -54,6 +54,11 @@ var size := Vector2i.ONE:
size = value
func _init() -> void:
var paint_channels := PaintSlot.values().size()
_albedo_maps.resize(paint_channels)
_normal_maps.resize(paint_channels)
_material.shader = _SHADER
_mesh.surface_set_material(0, _material)