Garry's Mod Wiki

Revision Difference

render.ComputeLighting#568062

<function name="ComputeLighting" parent="render" type="libraryfunc"> <description>Calculates the light color of a certain surface. ⤶ See also <page>render.ComputeDynamicLighting</page>.</description>⤶ <description>Calculates the light color at a certain position. ⤶ This includes both ambient light and dynamic light.⤶ See also <page>render.ComputeDynamicLighting</page> for dynamic light only.</description>⤶ <realm>Client</realm> <args> <arg name="position" type="Vector">The position of the surface to get the light from.</arg> <arg name="normal" type="Vector">The normal of the surface to get the light from.</arg>⤶ <arg name="position" type="Vector">The position to get the light at.</arg> <arg name="normal" type="Vector">The direction of an imaginary surface to get the light at.⤶ Pointing away from walls will get the lighting the wall receives. Pointing towards walls will not.</arg>⤶ </args> <rets> <ret name="" type="Vector">A vector representing the light at that point.</ret> </rets> </function>