How to maintain backward compatibility of texture node outputs

I’m currently working on enhancing the Voronois texture for EEVEE and Cycles and noticed, in some very common cases, the Fac output is nonsensical, even though it’s well defined. I’m sure many materials depend on this output, and I don’t want to break them. I’d like to know what the typical blender way of migrating legacy node systems generally is.

My main goals are:

  1. Provide inputs and outputs that are useful to users going forward
  2. Migrate any node networks using this on load so they don’t change legacy behavior.
  3. Not buck any established trends on how blender generally deals with these issues.

Some possible solutions I see are:

  • Provide a “Legacy mode” input that reproduces the old behavior of the Fac output. Two options could be:
    • A simple “legacy mode” drop down option.
    • A obscure “pre-output exponent” input that can achieve the same behavior, but is practically useless and likely to confuse future users
  • Dynamically generate some new nodes between the Fac and any of its consumers, so they get the previously expected value.
    • In some cases this may actually result in a duplicate Voronois texture node as well.
  • Do nothing, letting the output value change… breaking whatever might break

Any recommendations welcome.

The manual defines it as a ‘grayscale’ output, I’m unsure on how it could be ‘wrong’ or ‘nonsensical’

Talking to you on irc ,you seem to have somehow inferred this should somehow be ‘distance’ but there’s no user that thinks of it like this. So i say just leave the Fac input alone, it does what it does. it gives a shade of gray for cell mode and a gradient for intensity mode, how it’s calculated or if it’s “wrong” is irrelevant here. it does something and users node graphs count on it doing what it currently does.

If you want to add a distance output fair enough, but just add an output socket with that name, that will always carry the distance. Don’t mess with something that to most users isn’t broken.