using shaders with Light2D and LightOccluder2D

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By psyence88
:warning: Old Version Published before Godot 3 was released.

Hi, I am trying to implement dynamic lighting into my game and I am stumped with the normal map/depth-map workflow that is required. I checked out the 2D lighting demo and recreated it with the same shaders/script and there are of course artifacts like in the image attached… Anyone have any tips? I am using the same script code from the 2D lighting demo.

demonstration of issue

It looks like you are referring to the ‘lights_shadows’ 2d demo? But there aren’t any shaders, scripts or normal maps used in it, only Light2D and LightOccluder2D. Or are you maybe trying to combine the effects from the ‘lights_shadows’ demo and the ‘normalmaps’ demo?

ericdl | 2016-06-22 17:19

Hi, neither of those although they do what I want. I am referring to the Isometric 2D + Lighting demo, give that a go. The tilemap includes a normal map channel which takes in a grayscale texture at 50% alpha… Not sure what’s on the go there.

psyence88 | 2016-06-22 19:57

:bust_in_silhouette: Reply From: GeorgeJulian

When you make your LightOccluder2d:
Select the LightOccluder2d in the hub list. When you make the LightOccluder2d a wire frame box will show up. This is not the real impediment polygon. Click the “Make new polygon starting with no outside help” catch. This is situated at the highest point of the view port and has a pencil for a symbol.

write my paper for cheap