Does anybody have experience in creating a special shader that effects every object in the level, and can be used to offset vertices / apply deformation to them?
Essentially I’m thinking of ways to develop a global ‘melt’ system. Essentially, I need every object in my level to be affected by a little hot ball (or perhaps multiple heat sources). Every object in the scene needs to be able to ‘melt’ away based on this world-space effect. The effect is temporary and all objects go back to their original state after a short period. My current idea, is to draw the ‘heat’ information into a 3D 32-bit Render Target (RGB is both direction from heat source and intensity). All ‘heat’ in the shader blends back to a normalized value over time so that objects will slowly restore to their original state.
I want to then add a flag to a material that allows it to ‘read’ from this 3D Texture (similarly to how you can toggle fog on/off for translucent materials), and then each material can apply deformation to vertices or displacement as it chooses.
I can’t see anyway to do this with 2D render targets unless I use something like Ryan’s volume texture stuff he’s been showing recently (but it might not be high enough res for the whole level), and I think this is probably more efficient than creating a material function and adding it to all my materials. Any ideas?