Visible tiling seams when using 'Texture2D' but NO seams when using 'RenderTexture' ?
Hi all,
I created a tile-map where each tile has 4 textures;
2x terrain textures, as Texture2D (256x256 ARGB32)
1x splat map texture, as RenderTexture / texture2D (256x256 ARGB32)
1x palette texture, as Texture2D (32x32 ARGB32)
When the splat map is created as a RenderTexture the seams between the tiles are not visible but when it is created as a Texture2D the seems become clearly visible, see pictures below. (Apart form changing the texture object type all code remains the same)
Note that the splat map texture is modified at runtime by copying the palette texture to the splat map using the 'Graphics.CopyTexture()' function.
Splatting is performed by a custom surface shader using the 'lerp' function
o.Albedo = lerp(main.rgb, sec.rgb, filter.a);
Does anybody know what might be causing the difference in behavior? Also, are seams typical when creating tilemaps, and do they have to be addressed with some standard method? Preferably i would not use the RenderTexture as i need to store the splat map data when tiles get unloaded/destroyed. (RenderTexture doesn't support the Alpha8 texture format but Texture2D does, which could potentially same some memory...)
If anybody can point me to some literature/tutorials which elaborates in detail how to create terrains and tilemaps, it would be greatly appreciated.
Splat map as RenderTexture:
Splat map as Texture2D:
Your answer
Follow this Question
Related Questions
Texture Problem 1 Answer
Seams between Textures 1 Answer
shader graph messes up the texture (2D) 0 Answers
Material.SetTexture doesn't work if not "_MainTex" 0 Answers