Search code examples
texturesmonogamepixel

Monogame - removing individual pixels from a texture


I was just looking for some advice on pixels and textures in Monogame.

I want to be able to remove some pixels from a texture, to generate a sort of crater look (when my rocket hits an obstacle).

So far I have though of 2 ways to do this,

  1. To tint the colors of the pixels to match that of the background to give the illusion they have disappeared.

  2. To remove them completely.

What I want to know is if it is possible to remove individual pixels from a texture. I know if you create a List of items, you can use the built in function "List.RemoveAt()" to remove something from a list, can this be achieved for individual pixels in a texture? :)

Any help on the topic would be great :)


Solution

  • I figured out a way to transparently block out some pixels of a texture, if anyone else is looking for a way I could help :)