TextureData:setPixel

Sets the value of a pixel of the TextureData.

TextureData:setPixel(x, y, r, g, b, a)

Arguments

NameTypeDefaultDescription
xnumberThe x coordinate of the pixel to set (0-indexed).
ynumberThe y coordinate of the pixel to set (0-indexed).
rnumberThe red component of the pixel, from 0.0 to 1.0.
gnumberThe green component of the pixel, from 0.0 to 1.0.
bnumberThe blue component of the pixel, from 0.0 to 1.0.
anumber1.0The alpha component of the pixel, from 0.0 to 1.0.

Returns

Nothing

Notes

The following texture formats are supported: rgba, rgb, r32f, rg32f, and rgba32f.

See also