Hey guys, I need to set a specific pixel in a texture to a custom color,
for doing that I made a Bitmap and I always set the pixel in the bitmap,
then I recreate the texture from the bitmap.
Doing that is very time consuming, is there any way to modify the pixel directly
in the texture?
Hey guys, I need to set a specific pixel in a texture to a
Share
Yeah you should be able to do it by using the Texture.LockRectangle function. You then need to seek to the correct pixel which will be addressable by jumping to ((y * pitch) + (x * bytesPerPixel)) in the stream. The you write your new pixel and call Texture.UnlockRectangle.