top of page

Damage Shader


Damage shaders uses texcoord2 coordinates which usually contains UVs for Baked Light. Which means no segment of the texture will not be repeated twice on a mesh. Mesh on the screenshot was created in ProBuilder - now a free editor extension for Unity.

The example, included with Playtime Painter, has scripts for playtime destruction. When using World Space brush, all painting is done with Render Textures - so no texture uploading to GPU, just a regular rendering - very fast. Also the size of the brush will be in world space, which means a perfectly spherical impact point no matter the size or shape of the object.

Pool controller also included: when object is first damaged, an instance of the Material is used with newly created or pooled Render Texture. OnDisable() function will return texture to the pool and restore default Material, so on re-enabling object it will be pooled again.

So attach a reciever script on the objects you want to edit. And the Caster script to the Camera or the Gun. It is expected for a developer to know programming and being able to use the example code and integrate it into his particular scenario. But feel free to join Discord for any assistance.

bottom of page