foreach (var subLayer in groupLayer.Layers)
Draw(subLayer, offset, ref viewMatrix, ref projectionMatrix, effect, depth);
}
else
{
_worldMatrix.Translation = new Vector3(offset, depth);
var effect1 = effect ?? _defaultEffect;
var tiledMapEffect = effect1 as ITiledMapEffect;
if (tiledMapEffect == null)
return;
// model-to-world transform
tiledMapEffect.World = _worldMatrix;
tiledMapEffect.View = viewMatrix;
tiledMapEffect.Projection = projectionMatrix;
foreach (var layerModel in _mapModel.LayersOfLayerModels[layer])
{
// desired alpha
tiledMapEffect.Alpha = layer.Opacity;
Your Effect needs to implement this interface: https://github.com/craftworkgames/MonoGame.Extended/blob/541e162887745d43669298d687100f564b9644cd/src/dotnet/MonoGame.Extended.Tiled/Renderers/TiledMapEffect.cs#L6
Also, I don’t see a vertex shader in your shader program. The vertex shader is important as it transforms the positions of the tiles from model space all the way to clip space.