# Custom Lighting in Unreal

**URL:** <https://forums.unrealengine.com/t/custom-lighting-in-unreal/469313>\
**Category:** Community & Industry Discussion\
**Tags:** unreal-engine, unity, Shaders, question\
**Created:** [August 6, 2020, 4:23pm UTC](https://forums.unrealengine.com/t/custom-lighting-in-unreal/469313 "2020-08-06T16:23:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toureiro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Toureiro](https://forums.unrealengine.com/u/Toureiro)\
**Post date:** [August 6, 2020, 4:23pm UTC](https://forums.unrealengine.com/t/custom-lighting-in-unreal/469313/1 "2020-08-06T16:23:37Z")

</div>

Hi

I’m trying to make the switch from unity but I’m having a hard time replicating my custom lighting shaders to unreal.

Now I’m wondering if it’s even possible without going deep into shader code (not a programmer).

Here’s the most basic example:

![309396-customlightingsimple.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/0/1b08e69271a5675b1237b5e03dbb4e4f204f267e.gif)

Am I missing something? Its a bit of a deal breaker.

---

<div class="post-metadata">

**Author:** ![ElectroAU](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ElectroAU](https://forums.unrealengine.com/u/ElectroAU)\
**Post date:** [November 18, 2020, 7:04am UTC](https://forums.unrealengine.com/t/custom-lighting-in-unreal/469313/2 "2020-11-18T07:04:48Z")

</div>

N dot L is missing  
Not taking into account any normal direction of the surface, which is exactly what you’re seeing here.  
N = normal of surface  
dot = dot product  
L = light direction (normalize(light position - surface position)

So then you have a dot product node that plugs in your N and L as inputs  
Then you can multiply by attenuation (distance) and color afterwards before finally outputting to Custom Lighting.
