Posted June 07, 2023 by GyrthMcMulin
This update of Blacktrace is a bit smaller. I've been trying to optimize the game further since the addition of particle affects and more objects have really impacted performance. Since the groceries in the store scene are all the same model, I've used a MultiMesh to render these asset groups. That reduces the amount of draw calls but they can still be destroyed.
The blood decals were looking a bit flat, so I made the shader calculate the normals from the screen texture. This makes the blood follow the cracks and crevices of the objects underneath it. The blood also stops rendering when surface is too steep. This fixes issues with the blood texture looking stretched.
I was inspired by a Tweet by Klemen to recreate a fire asset for Blacktrace. This shader uses a noise texture to create flames. Combined with some particles, sound effect, shifting light source and some static models I could create a barrel on fire. I'm quite pleased with the result.