iOS - is the subtract, divide or distance shader math broken?

very interesting. Strange that they’re using all those mults and divs for the falloff hardness. The div in my formula example does exactly that. But I’ll try out your solution with the distance-squared.

I have another solution to try, but I would rather avoid that idea for now because it requires a depth test and will cost one overdraw. I’m trying as much as possible to have it built into the main material so it’s a fixed, known cost.

I’m going to try replacing that WorldPos node first. I was suspicious of that as well, because there’s no way that I can find of setting the max world size for it. I maybe be able to replace that by feeding the scale of a dummy sphere that’s not rendered and just calculating the distance by using the radius. Not sure what will happen on pixel level, but we’ll see.

Thanks for the ideas, I’ll give this stuff a go and write back here with results.