/*---------------------------------------------------------------------//
- Transition FX wave
var0.x; = seed
var0.y; = time transition
//---------------------------------------------------------------------*/
sampler2D s0 : register(s0); // screen
sampler2D s1 : register(s1); // first texture
sampler2D s2 : register(s2); // second texture
uniform float4 var0 : register(c9); // var0
uniform float4 var1 : register(c10); // var1
uniform float4 var2 : register(c11); // var2
uniform float4 var3 : register(c12); // var3
uniform float4 var4 : register(c13); // var4
float4 Water(float2 uv)
{
float randomSeed = var0.x;
float progress = var0.y;
float2 offset = tex2D(s1, float2(uv.x / 10, frac(uv.y /10 + min(0.9, randomSeed)))).xy * 2.0 - 1.0;
float4 c1 = tex2D(s2, frac(uv + offset * progress));
float4 c2 = tex2D(s0, uv);
if (c1.a <= 0.0)
return c2;
else
return lerp(c1, c2, progress);
}
void main
(
in float2 uv0 : TEXCOORD0,
out float4 r : COLOR0
)
{
r = Water(uv0);
}
Return to Development and contribution
Users browsing this forum: No registered users and 15 guests