Weird antialiasing on textures - 2D

Hi there–I’m working on making a simple 2D game with some flat-colored textures applied to quads. They’re supposed to be cleanly layered on top of a simple black background, but they’re developing some weird gray cruft around the edges, in a way that doesn’t look nearly as sharp as one might hope. (In the screen below, you can see it especially in places where two “particles” overlap–but it’s also present zoomed way in in the scene view, albeit less noticeable.) I’m using the Unlit/Transparent shader, and the images are 256X256 PNG files without any antialiasing. Do they just need to be higher res? Is there something I should tweak in the shader?

Here’s the PNG file itself:

[17828-blue+particle.png|17828]

Any advice is much appreciated–thanks!

They’re being antialiased. They’re also actually not gray pixels, they’re blended pixels between blue and black - but appear gray because of how our eyes work. I could super-zoom your image to show it to you, but you can do that too. (Windows + U provides a handy magnifier for just this purpose!)

Here are the common steps you’d take to tell Unity not to antialias your texture:

    1. Set the filter mode to “Point”
    1. Set the wrap mode to clamp
    1. Set the texture type to “Advanced”
    1. Uncheck “Generate Mipmaps”

After that, your texture will be scaled only on pixels and not interpolated between pixels. You may also have to turn off antialiasing also in the project settings under the “Quality Settings” section. I’d only do this if the first few steps didn’t completely resolve the antialiasing artifacts.