getDistanceAttenuation top-level property
dynamic
getDistanceAttenuation
getter/setter pair
Implementation
var getDistanceAttenuation = ShaderNode((inputs) {
var lightDistance = inputs.lightDistance;
var cutoffDistance = inputs.cutoffDistance;
var decayExponent = inputs.decayExponent;
return cond([
and(greaterThan(cutoffDistance, 0), greaterThan(decayExponent, 0)),
pow(saturate(add(div(negate(lightDistance), cutoffDistance), 1.0)),
decayExponent),
1.0
]);
});