Material bug. Material blinking when use SphereGradient-2D

Try using a node “Max” and for A put a constant 0.0001 and for "B put in what you currently have for Radius.

The problem is that sine is passing by 0 and a 0 radius sphere is probably returning a divide by 0 that is not checked for, causing the circle to be infinitely large for one frame.

No idea why doing that add after the result fixed it. Weird :slight_smile:

Also bonus: there is a function called “pythagorean theorum” in engine that for some reason I forgot to expose to the library (just search in content browser). It can actually give you a result like this for cheaper if you just want the 0-1 gradient.

You can just feed it anything linear and it turns it into a round curve. So the result of spheremask could be the input to that since spheremask makes a “cone” normally.