I have an issue with a transparent texture where when viewed at certain angles and distance some “ghost” texture appears on the caps of the cylinder. This happens in both the Game and Scene view.
The ghosting seems to be partially cured by increasing the Aniso Level
on the texture import settings but doesn’t solve the problem at far distances. The problem gets worse as you zoom out (see second image) although it is much better with aniscropic filtering at 9 (full filtering). I have no idea if this is the root/actual problem because aniscropic solves blurriness at shallow angles it just seems to mitigate the ghosting a bit.
Note: Texture.anisoLevel levels pertain as so:
- 1: No filtering
- 9: Full filtering
I understand that this may be a LOD, MIP, or some other quality setting issue but I just have no clue. This problem is also weird because the caps (top, bottom) are not textured at all and those UV’s are basically out of the picture. Notice that when the caps are selected that the UV’s are not projected. If the texture touches those edges it does paint the surface but the texture used clearly doesn’t reach the top or bottom.
I am using a custom shader based off of the “Transparent/Diffuse” shader which still has this same issue. You can download the Unity Shaders source which includes “Transparent/Diffuse” here
Also as a tangent… If anybody knows how to make a texture auto-tile across many objects of different size that would be great. I have asked before but wanted to mention it again.
To make different size cylinders without stretching I think I will have to procedurally generate a cylinder mesh with the appropriate amount of radial segments based on scale. Here is a start someone made (normals are kinda messed up and the caps are a bit weird). But then I would still need to create a new material for every tilingX variation of the material.