Skip to main content
7 events
when toggle format what by license comment
Nov 20, 2020 at 10:25 comment added DMGregory There was a similar question here about limiting the angle of a spotlight. I think you could apply a similar technique, finding the value of your existing falloff function at your desired radius, then remapping its output so that value is mapped to zero.
Nov 20, 2020 at 6:44 comment added Satchmo Brown @DMGregory I think I finally understand. I am trying to force this algorithm to work with a radius, when c1 and c2 indirectly control the distance that it shines. Where would I look for an example of a square falloff but including a radius component?
Nov 19, 2020 at 23:49 comment added DMGregory There's no such thing as radius in this formula. Distance goes from 0 to infinity. You can adjust the parameters c1 and c2 to get the same output no matter what unit you measure distance in.
Nov 19, 2020 at 22:54 comment added Satchmo Brown @DMGregory Thanks for the link! That does explain a lot about the origins and usefulness of that formula. I appreciate the link. What it doesn't do though is explain how exactly it's anticipated that distance is specified? Is it a normalized value with 0 meaning it's at the center and 1 at the radius, or is it reversed? Or is it used another way? That's the issue I am having; translating Unity lighting variables to work with it.
Nov 19, 2020 at 22:34 comment added DMGregory We have some existing Q&A about that attenuation formula here, which might give you some insights into how it's used here. Note that this formula has no conception of a "limiting range" of a light - mathematically, it never reaches zero (though rendering with a fixed colour depth, it will eventually round to zero).
Nov 19, 2020 at 21:32 review First posts
Nov 25, 2020 at 15:05
Nov 19, 2020 at 21:29 history asked Satchmo Brown CC BY-SA 4.0