Clarification on light attenuation/radius

Hi - sorry if this has been asked before but I couldn’t find a definitive answer (despite all my googling efforts). As I understand it lights in Unity (point/spot/directional) use quadratic falloff - all well and good. However, from what I can see this fall off seems to be scaled by the light range i.e. the range is not just setting the maximum distance from a point that we want to calculate the influence of a light, but is actually adjusting the light intensity as well. This is not what I want - I want to set the lights intensity and just have it fall off without being influenced by a “range”, the same as I would get if I created a point light in Maya with quadratic falloff.

So my question is, how do I write a “new” point light (or similar) light component? Do I just have to create my own game object, attach a “light” script to it and then have the surface shaders access those parameters some how? Or do I have to write a new LIGHT_ATTENUATION function?

I’m just a bit new to writing shaders for Unity, and I’m not quite clear on how I would achieve this. Thanks for any help.

you can not create an own light, as you don’t have access to the corresponding buffers to feed the pipeline with the data to make it a light

Thanks - I figured that might be the case. I have also just noticed another thread like this one on the same page (that I somehow missed) so sorry for the spam.

Ok, so I did just find similar questions to this going back to 2006 all of which seem to say “yes, it’s going to take range into account” - which is disappointing.

You can re-write the attenuation function if you want. It just won’t work with the deferred renderer, whose lighting is hard-coded.