# Accessing Scene lights in a custom shader

**URL:** <https://discourse.threejs.org/t/accessing-scene-lights-in-a-custom-shader/18590>\
**Category:** Questions\
**Tags:** lights, shaders\
**Created:** [September 10, 2020, 2:51pm UTC](https://discourse.threejs.org/t/accessing-scene-lights-in-a-custom-shader/18590 "2020-09-10T14:51:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrOrangeSky](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@MrOrangeSky](https://discourse.threejs.org/u/MrOrangeSky)\
**Post date:** [September 10, 2020, 2:51pm UTC](https://discourse.threejs.org/t/accessing-scene-lights-in-a-custom-shader/18590/1 "2020-09-10T14:51:47Z")

</div>

Hi, I need to access scene lights in shader for illumination calculations. So, how to access directional and point lights(and their properties) used in the scene in the custom shader.

Also lights in three js (like OPEN GL) have three components - ambient, diffuse and specular, How can I access each component seperately in the shader.
