The Light2D pipeline works fine with Sprites, anyway I'm not able to get it working with a Tiled generated background which is a DynamicTilemapLayer
Here the error message I get
Yes, it was never meant to work with tilemaps, which is why I鈥檝e marked this as a long term feature request.
preload(){
this.load.image('tile-normals', tileNormals);
this.load.image('tile-background', tilePurple);
this.load.tilemapTiledJSON('map', level);
}
create(){
const tilesBackground = this.map.addTilesetImage(
'tileset-image-name-in-tiledjson',
'tile-background'
);
this.layerBackground = this.map.createDynamicLayer('background-1', tilesBackground, 0, 0);
const tex = this.textures.get('tile-background');
tex.setDataSource(this.textures.get('tile-normals').getSourceImage());
this.layerBackground.texture = tex;
this.layerBackground.setPipeline('Light2D');
}
Actually works, but only for dynamicLayers.
Also it's hacky.
If you do it with staticLayers... it's... umm... interesting.
Ok, Dynamic Tilemap Layers now support normal maps properly. However, Static Layers do not (and will remain this way for the foreseeable future)
Thank you for submitting this feature request. We have implemented this and the feature has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.
Most helpful comment
Yes, it was never meant to work with tilemaps, which is why I鈥檝e marked this as a long term feature request.