Triplanar projection

Hi there!

I have “created” a simplified triplanar projection function, however there is a little thing I am not able to achieve and I would want to ask you for a little help, please.

My triplanar projection, which doesn’t need an entering TextureObject, so it can be directly plugged-in into the UVs of a Texture sample, is this:

But I am trying to achieve a soft transition, like “World aligned texture” funtion does. Would you have any idea about blending the different projections in a softer or “Lerp” way?

(At left, my function. At right, World aligned function)

Thank you very much!