Heyas…
I’m working on a vertex shader for handling some standard deformations. Basically (when complete) it will allow for selecting a deformation type and then setting speed, size and depth to achieve the effect your looking for. The vertex shader can be coupled with any fragment shader you like, however, it will require you know a bit about creating material definition files and making sure you pass in the appropriate MaterialParameters, WorldParameters and Defines to accompidate both the vertex deform .vert and whatever .frag you choose to use it with.
The final deformation types will consist of:
Wave
Ripple
Pinch
Swell
Well… and I guess any others that people would like to have included (just post your idea here).
Here is a sample of the Ripple and Wave deformations. Oh… I also need to allow for reversing the direction of the effect as well.
Anyways… let me know what you think or pass along any ideas for deforms you’d like to see added.
Forgot to mention the TODOs…
I’m finishing up recalculating normals and adding a few more standard deformations.
Oh man…
I totally failed to mention the coolest part. This isn’t a single axis deformation… you can turn on and off the X, Y and Z axis deformations individually. Here is a sphere with a Wave deform against all 3 axis:
Normals recalculation:
With Common/MatDefs/Light/Lighting.frag