Forum

CircleReveal - DX11.TextureFX Two and more circles

Hi guys and vvvvorum!
I use CircleReveal - DX11.TextureFX help patch.

I would like to create more than one circle, but two or more.
But I do not understand nothing in shaders.

I thought to change the way

but return returns the last change without considering the previous

CircleReveal (DX11.TextureFX) help.v4p (9.2 kB)

Hi guys!

It came to realize the two circles, but how to do more?

float4 pCircleReveal(float4 PosWVP:SV_POSITION,float2 uv:TEXCOORD0):SV_Target
{
    float radius = fuzzyAmount + Fader * (0.70710678 + 2.0 * fuzzyAmount);
 
    float2 pt0 = float2(0.5,0.5);// центр текстуры
    float2 pt1 = float2(1.0,1.0);// угол текстуры
 
    float d0 = length(uv - pt0) - radius;
    float d1 = length(uv - pt1) - radius;
 
    float distFromCircle = min( d0, d1 );//выбираем минимальное расстояние
    
    float4 c1 = tex0.SampleLevel(s0, uv, 0); 
    float4 c2 = tex1.SampleLevel(s0, uv, 0); 
    
    float p = saturate[distFromCircle + fuzzyAmount) / (2.0 * fuzzyAmount](https://vvvv.org/documentation/distFromCircle-+-fuzzyAmount)-/-(2.0-*-fuzzyAmount);
    return lerp(c2, c1,p);
}

I have turned!

Thanks everyone ))))))