- Home /
Does anybody know why this happens to the mesh's color?
I've have tried different solutions for a while now. But I just don't know why this is happening.
Answer by Bunny83 · Jan 16 at 03:33 PM
That looks like classical z-fighting in combination with a too large view range. So a too small near clipping plane and / or a too large far clipping plane. Also you seem to have two quads at the same place, one blue, one yellow
Thanks for the answer, but it has only caused even more confusion. there's only one quad and it only happens sometimes. I've tried to change the clipping plane and view range, but it doesn't solve it either.
The colors of the quads are sampled from a color map and since the quad is vertical i think the uvs may be sampling from two colors, but i don't know that much about this whole thing.
Well, sure that's equally possible, however we have no idea about your used shader, how your texture / color map looks like and how / which UV coordinates you assigned to your quads. There's literally no way we could help you here with that little information. Just looking at a screen shot does not reveal any of that information.
If your color map is a top-down projection and you set the UV coordinates of the upper two vertices to the same position as the lower two vertices and those are located exactly between two colors in your color map and you used shared vertices for your whole mesh, that's what you would expect.
Generally when you want to sample a color from a texture you want to target the center of a texel / pixel and never the edge between two texels / pixels.
Thanks for the answers You've made all of the correct assumptions on how the mesh is made. And centering the uvs have fixed the problem. Thank you so much for the quick responses, they have helped a lot
Your answer
![](https://koobas.hobune.stream/wayback/20220613051740im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
can 5 verts and 4 triangles be done on a square texture? 1 Answer
Change Color of model from Down to up! 1 Answer
How to make sure two meshes have the same vertex count 0 Answers
Render voxels with RGB data passed to them 1 Answer
Getting triangles of a single gameobject (one prefab instance, not all) 1 Answer