- Home /
Question by
ScienceGuy · Aug 29, 2014 at 01:56 AM ·
shaderlightingrangecgpoint light
Accessing light's range value within a fragment shader?
In order to compute the proper attenuation of point lights, I need to access the light's range value that is set in the UI. However, I have not been able to find any built-in macro or function that let me do so.
How can I retrieve the range of a point light within my vertex/fragment shader?
Comment
This shader uses a variable called LIGHTATT... i done know where it comes from
http://wiki.unity3d.com/index.php?title=DesaturatedDarks
good question about the built in variables i doesnt say on the reference page for attentuation.