content/hifi-public/tony/shaders/wiggle.slv
Dale Glass 0d14e5a379 Initial data.
Needs a lot of cleanup. Data has been de-duplicated, and where identical copies existed, one of them
has been replaced with a symlink.

Some files have been excluded, such as binaries, installers and debug dumps. Some of that may still
be present.
2022-02-13 18:59:11 +01:00

18 lines
909 B
Text

uniform float amp;
uniform float freq;
uniform float timeScale;
// position and normal are in model coordinates
// color is SRGB
void getProceduralVertex(inout vec4 position, inout vec4 color, inout vec2 texCoord0, inout vec3 normal) {
vec4 morphPosition = vec4(position.x + amp * sin((freq * position.x) + (timeScale * iGlobalTime)),
position.y + amp * sin((freq * position.y) + (timeScale * iGlobalTime)),
position.z + amp * sin((freq * position.z) + (timeScale * iGlobalTime)), 1);
vec4 morphColor = vec4(0.5 * sin((freq * position.x) + (timeScale * iGlobalTime)) + 0.5,
0.5 * sin((freq * position.y) + (timeScale * iGlobalTime)) + 0.5,
0.5 * sin((freq * position.z) + (timeScale * iGlobalTime)) + 0.5, 1);
position = morphPosition;
color = morphColor;
}