TextureData:setPixel
Sets the value of a pixel of the TextureData.
TextureData:setPixel(x, y, r, g, b, a)
Arguments
Name | Type | Default | Description |
x | number | The x coordinate of the pixel to set (0-indexed). | |
y | number | The y coordinate of the pixel to set (0-indexed). | |
r | number | The red component of the pixel, from 0.0 to 1.0. | |
g | number | The green component of the pixel, from 0.0 to 1.0. | |
b | number | The blue component of the pixel, from 0.0 to 1.0. | |
a | number | 1.0 | The 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
TextureData:getPixel
Texture:replacePixels
TextureFormat
TextureData:getPixel
TextureData