Apply Shader on Tiled Map?

Any chance to apply a custom shader to the rendered tiled map?

Thanks in advance for any hints!

Hi!

Do you want to add shader only to tileset or to the generated map from this tileset?

In the first case you will have to get tileset texture, apply shader and render it to the new texture. Then replace tileset texture with the generated one (you will have to modify TMX sources, but it shouldn’t be so difficult).

In the second case I guess the only solution is to use fullscreen shader. Usually map is much bigger then screen so it will be more efficient to do it this way.

1 Like

Hi kds,

thanks for your reply.
I want to apply the shader to the generated map.

For fullscreen shader I used a rendertexture but honestly, I was not able to scale the rendertexture to fullscreen without having distorations / artficats. It seems to be a known issue that rendertexture has some issues if scaled or width/height ratio is not same as canvas.

I am using similar solution to this one. I was also testing RenderTexture with custom camera and it also worked, but was slower as I had to use two cameras.