Experimenting some – Using a jpeg instead of png makes no difference. Applying the normal map to a dynamic tile layer results in no rendering and no console messages. Applying the normal map to a static tile layer results in the following console message:
[.WebGL-0x7fc9528f8a00]RENDER WARNING: there is no texture bound to the unit 1
Edit:
Same problem when I apply a normal map to a sprite. The image does not render at all.
Edit: again:
I have tried both of these load syntaxes:
this.load.image({
key: 'tiles',
url: 'image.png',
normalMap: 'image_n.png'
});
and
this.load.image('tiles', [ 'image.png', 'image_n.png' ]);
Edit:
This demo works for me:
However, if I change this line:
layer = map.createDynamicLayer(0, tileset, 0, 0).setPipeline(‘Light2D’);
to
layer = map.createStaticLayer(0, tileset, 0, 0).setPipeline(‘Light2D’);
then I get the same WebGL error as above:
[.WebGL-0x7fe9b2315e00]RENDER WARNING: there is no texture bound to the unit 1
Also, if I create a normal map with Photoshop (for this example), then it still works. (Although the static layer throws the error, regardless.)
Here is the Photoshop normal map for the car tile example:
Edit:
(Last edit for this post – I promise! )
If I intentionally omit the normal map from the image load, then the console displays this message (as expected):
Normal map missing or invalid