AGulev / drawpixels

Defold engine native extension for drawing pixels into texture buffer.
MIT License
80 stars 11 forks source link

Сan't erase 1 pixel #13

Open fortey opened 9 months ago

fortey commented 9 months ago

drawpixels.pixel(self.buffer_info, self.touch_pos.x, self.touch_pos.y, 0, 0, 0, 0) doesn't work

AGulev commented 9 months ago

could you pls provide a test project?

Morgerion commented 7 months ago

Indeed, it does not work, since if alpha==0 then the pixel is not recorded. This follows from the code of the mixpixel() function. It would be nice to have a function like pixel_raw() that just writes RGBA without any alpha channel checks. I use this to fill technical textures where the alpha channel is just one of the data layers.