Video showing the effect in action.
Examples of the Render Texture layers being filled in realtime.
Example of the material being entirely worn away to reveal what is/could be, behind.
Example of the impacts in action.
This is a personal project, not associated with any company. Developed in Unity 6.
I played some Star Citizen, and enjoyed their ship salvaging game loop. As a fun challenge for myself and to get more familiar with Unity’s Shader Graph and Compute Shaders, I decided to replicate the hull scraping/salvage mechanic.
To re-state, this has nothing to do with Star Citizen, beyond inspiration.
The aim was to create an object, whose surface could be worn away in layers to reveal something behind. I created a shader that uses a Render Texture as a driver for displaying different sets of textures that represent different layers of the object. The Render Texture itself is drawn by a Compute Shader. This helps performance, CPU/GPU communication time by keeping as much as possible on the GPU.
Note: The skybox is an asset store item (Starfield Space Skybox, by Sean Duffy), everything else is hand crafted by me.