Aldo pass slot_idx to get_value_for.

This commit is contained in:
Relintai 2021-10-04 13:11:08 +02:00
parent 4b334a6ad6
commit 0943dc32f8
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ func recalculate_image(material, slot_idx : int) -> ImageTexture:
for y in range(image.get_height()):
var v : Vector2 = Vector2(x / w, y / h)
var col : Color = get_value_for(v)
var col : Color = get_value_for(v, slot_idx)
image.set_pixel(x, y, col)
@ -31,7 +31,7 @@ func recalculate_image(material, slot_idx : int) -> ImageTexture:
return tex
func get_value_for(uv : Vector2) -> Color:
func get_value_for(uv : Vector2, slot_idx : int) -> Color:
return Color()
func register_methods(mm_graph_node) -> void:

View File

@ -15,7 +15,7 @@ var p_o12297_scale_y = 4.000000000;
var p_o12297_iterations = 3.000000000;
var p_o12297_persistence = 0.500000000;
func get_value_for(uv : Vector2) -> Color:
func get_value_for(uv : Vector2, slot_idx : int) -> Color:
var a = NoisePerlin.perlinc(uv, Vector2(p_o12297_scale_x, p_o12297_scale_y), int(p_o12297_iterations), p_o12297_persistence, seed_o12297)
return a