Ugly white pixels at edges

I’m not quite satisfied with image quality of Unity. I’ve attached an image where you can hopefully see this problem: some white or otherwise out of place colored pixels appearing at edges of objects. Worst case scenario is white pixels between edges of two black objects. That looks horrible. Only way to get rid of those (that I know) is to use diffuse fast shader. Well, not much can be done with that shader anyway… So, how to get rid of those?

358276--12452--$ugly_750.png

Looks to me like you’re using ridiculously high-poly objects. Is this true? Mipmaps and high-poly don’t mix at the edges. (No engine will fix that; it’s not a Unity problem.) Because your polys on the edges are only taking up a pixel on-screen, they’ll use the lowest mip level.

Anyway, that’s my theory. I don’t know the differences between the built-in shaders, so I don’t know why Diffuse Fast is helping. I don’t use lights, personally, so I see this effect a lot, despite only using low-poly objects; polys seen from a steep angle will do this, but low-poly objects will kill the effect faster as you turn them or the camera. Your objects are also too brightly-lit, and I assume you’re using lighting, so if you turn the brightness of the lights down, you’ll see a vast improvement, because the pixels on the edges will be multiplied by a dark color from at least some angles.

That looks like a problem solved through anisotropic filtering and/or mip biasing, neither of which is exposed in the inspector for cube textures in Unity. With a high contrast reflection like that, that tends to stand out pretty good when oblique pixels load from a low mipmap. You can try forcing it in quality settings, or writing scripts that modify them, pretty annoying, but would likely fix your problem. I don’t think Unity exposes mipmap bias anywhere, but anisotropic filtering seems to be the ‘real’ fix you need.

Forgot, for the blue thing, you can change aniso in the texture setting (for 2D textures) and set to trilinear filtering, Unity defaults to bilinear. The default settings for Unity textures produce low quality results.

That’s goofy about not having control of cubemaps’ filtering. Just to be clear, though, you can affect mipmap bias. I don’t know if RElam is just saying it’s “not exposed” because it’s not something you can set in the Inspector.

ugly lines with cubemaps can also be related to using textures that are not set to repeat mode clamp.

though here it might also be a sideconsequence of the shadows (or the glow corona that happens with shadows around the model). check if it is also there without shadow casting

No, that was my mistake, so good to know (Somehow overlooked that one):).

sorry for replying on such an old post,
but I’m having the same problem, except I’m using a specular material without a texture, so it isn’t a mipmaping problem or anything like that.
the models are very highpoly, and it seems that’s what causing it.
But preferably I keep the models as they are, so does anyone know a way to fix this withouth reducing the polycount ?

Bump, I also have this problem… White pixels random appears on texture edges…

EDIT:

I fixed my problems with this:

old code
/newVertices.Add(new Vector3(x, y + 1, z + 1));
newVertices.Add(new Vector3(x + 1, y + 1, z + 1));
newVertices.Add(new Vector3(x, y + 1, z));
newVertices.Add(new Vector3(x + 1, y + 1, z));
/

new code
newVertices.Add(new Vector3(x-0.001f, y + 1, z + 1.001f));
newVertices.Add(new Vector3(x + 1.001f, y + 1, z + 1.001f));
newVertices.Add(new Vector3(x-0.001f, y + 1, z-0.001f));
newVertices.Add(new Vector3(x + 1.001f, y + 1, z));

made the textures/vertices points overlap just a little :smile: