# pointLight not working with custom shapes or I'm doing it wrong

**URL:** <https://discourse.processing.org/t/pointlight-not-working-with-custom-shapes-or-im-doing-it-wrong/9101>\
**Category:** Coding Questions\
**Created:** [March 7, 2019, 11:56pm UTC](https://discourse.processing.org/t/pointlight-not-working-with-custom-shapes-or-im-doing-it-wrong/9101 "2019-03-07T23:56:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fragdemented](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/fragdemented/32/4054_2.png) [@fragdemented](https://discourse.processing.org/u/fragdemented)\
**Post date:** [March 7, 2019, 11:56pm UTC](https://discourse.processing.org/t/pointlight-not-working-with-custom-shapes-or-im-doing-it-wrong/9101/1 "2019-03-07T23:56:14Z")

</div>

Hello Everybody! I’m new here, but I am in love with p5js too!

I’m trying to work with lighting in a 3D space. I can get it to work with a sphere, but it’s not working with any custom shapes that I make. Is this a bug or is it my code?

Here is a link to my code. (I have a copy, so experiment at will)  
[https://editor.p5js.org/fragdemented/sketches/CaBA9\_Esg](https://editor.p5js.org/fragdemented/sketches/CaBA9_Esg)

Any insights and help would be appreciated.

---

<div class="post-metadata">

**Author:** ![FSXAC](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/fsxac/32/3995_2.png) [@FSXAC](https://discourse.processing.org/u/FSXAC)\
**Post date:** [March 8, 2019, 12:20am UTC](https://discourse.processing.org/t/pointlight-not-working-with-custom-shapes-or-im-doing-it-wrong/9101/2 "2019-03-08T00:20:25Z")

</div>

It’s most likely there aren’t any valid normal vectors for the shape for the shader to calculate lights.

But I’m not sure how to specify normal vectors in p5.js.

---

<div class="post-metadata">

**Author:** ![fragdemented](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/fragdemented/32/4054_2.png) [@fragdemented](https://discourse.processing.org/u/fragdemented)\
**Post date:** [March 8, 2019, 5:05am UTC](https://discourse.processing.org/t/pointlight-not-working-with-custom-shapes-or-im-doing-it-wrong/9101/3 "2019-03-08T05:05:04Z")

</div>

Thank you. It gave me a starting place to look but I haven’t been able to find any kind of solution yet.
