Home > Net >  How to apply semi-transparent white color to outline of circle wipe
How to apply semi-transparent white color to outline of circle wipe

Time:04-12

A goal for this question is that outline of my circle wipe improves like left exmple in the image below. So far outline of my circle wipe does not have two clear semi-transparent rings. If you know how to render them like the left image, would you give me some advice?

An ideal circle wipe I would like to implement.

Comparison

Environment
Unity2020.3f
Project type: Universal render pipeline
Target: IOS & Android

CodePudding user response:

float a = smoothstep(_Radius - 1.1, _Radius, dist);
float b = smoothstep(_Radius, _Radius   1.1, dist);
float t = a - b;
fixed4 col = lerp(fadeCol , topCol , b);
return lerp(col, _FadeColour, t);

You may also try to replace the last line with:

return col   _FadeColour * t;

Effect achieved with 2 pictures:

Effect with 2 pics Without the circle Large circle

  • Related