But if I use a slightly modified version of the wave shader in veethree's project posted above it gives it enough of a wave to look like something, but not good enough for a finished project.
Code: Select all
extern vec2 size;
extern number time;
vec4 effect(vec4 color, Image tex, vec2 tc, vec2 sc)
{
tc.x = tc.x + sin((tc.y * 10.0) - time) * (size.x * 0.000005);
tc.y = tc.y + sin((tc.x * 10.0) - time) * (size.y * 0.000005);
vec4 pixel = Texel(tex, tc);
return pixel;
}
Like this code:
Code: Select all
half2 displacement1 = tex2D( _Displacement1Tex, i.uv.xy );
float2 adjusted = i.uv.xy + (displacement1.rg - .5);
half4 output = tex2D(_MainTex, adjusted);
Edit: Just for the heck of it, here's what I have so far. I added some randomly timed sparkle animations to give it more life. But it's not perfect of course. But it is good enough for a start. In time I'll write or find a really good shader to do it right.