Currently i'm using Unity3D, and i want to make one variable blink along time in a fragment shader. Now i have code like this:

    half4 frag(v2f i) : COLOR{
        float4 r = _OutlineColor;
        r.a = r.a * _SinTime ;
        return r;

But this blinking is too slow and not suit me, any ideas ?

  • \$\begingroup\$ Did you try using a higher frequency sine wave using a multiple of _Time.x or y? \$\endgroup\$ – DMGregory Jan 14 '19 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.