Hi, I'm working on my first Godot project and I've seen a lot of examples on how to do it for Godot 3 but it seems to have changed and there's not a lot of resources for Godot 4 on that yet unfortunately. Does someone know what am I missing here? I get the UVs alright and it sets the texture but it just remains black the whole time.
func _create_texture():
var pixels = 256
#tex = Image.create(pixels, pixels, false, Image.FORMAT_RGBA8)
imageTexture = ImageTexture.new()
tex = Image.create(pixels, pixels, false, Image.FORMAT_RGBA8)
imageTexture.set_image(tex)
mesh.material_override.set("albedo_texture", imageTexture)
func draw_on_sprite(coords):
tex.set_pixelv(coords, Color.RED)
imageTexture.update(tex)
Thanks in advance