Fork me on GitHub

Dissolve textures

So yesterday I implemented a cool idea I had, which can only be done with shaders.

It's called "dissolve textures". I haven't seen any games using this much, but I might just not of been looking hard enough.

So for a given entity (e.g. a zombie), I've added an extra greyscale texture, which maps out which areas of the mesh should "die" first. Then the health of the entity is compared to the texture, and fragments are nuked if they have died.

In my textures, hands go first (black), followed by arms (dark grey), head and legs last (light grey). The torso is white, so it is there until the end.

I hope to improve this further though - I want to have body parts lying on the ground, and also have it know which part you shot, and have that area "die" more - once I have bones in place that is.

Post a comment

Leave the following field blank, it is an anti-spam field.

Email address: