- Edited
I wrote this piece of code in order to send some floats to a shader:
data = [ float(x),float(y),float(z)]
var byte_array = PoolByteArray(data)
var img = Image.new()
img.create_from_data(3, 1, false, Image.FORMAT_RF , byte_array)
var texture = ImageTexture.new()
texture.create_from_image(img, 0)
But I get the error:
Expected data size of 12 bytes in Image::create(), got instead 3 bytes
So clearly I am missing some step.