Image:setPixel
EditSets the value of a single pixel of the Image.
If you need to change a bunch of pixels, consider using Image:mapPixel
.
Image: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: r8
, rg8
, rgba8
, r16
, rg16
, rgba16
, r32f
, rg32f
, rgba32f
.