- Home /
Controlling Subsampling on textures in Unity
So This is a pretty specific question and I understand that unity may not give you enough control to do this, but lets say you have a game like Minecraft or a Lego game. One advantage of a game completely made of boxes is you can make the texture space extremely small if you have control over subsampling between the pixels on the texture. Here is an example of what i mean:
Here is a texture at 32 x 32 resolution I made that when placed on a model, subsampling will average the pixels together and creates a "blurry" texture:

But what if you wanted to preserve the pixel sharpness on your models, or maybe on just SOME models in your scene? There are games that do this; none that I have yet seen out of unity but almost every game with basic 3D on the original DS system for example has no Subsampling on their textures so the textures on the 3D models preserve the pixel edges and sharpness:

(Don't let the flat 2d sprites fool you; the terrain in the game listed above are indeed simple 3D models such as the ground and cliffs but the textures applied to them lack any subsampling thus giving them a very crisp and pixelated look) Here is a more clear example:

Some people would find this undesirable but sometimes having control over subsampling can provide the game developer with some creative stylistic options and also more efficient texture space.
So my question is, does anyone know of a way Supersampling can be turned off in Unity? Or any way to use small textures but have Them not lose pixel sharpness when applied to meshes?
Assumptions is strong in this one. lol turns out I found a way to do it in unity that requires no shader. In fact I would recommend it over a shader because it doesn't do additional draw calls. it's literally one of the more basic features built into the engine that I simply forgot about. Perhaps you forgot too?
@Galactic_$$anonymous$$uffin you should add your solution as an answer to your question and mark it as the answer so it will be helpful to others searching for the same solution.
Answer by Galactic_Muffin · Jul 29, 2015 at 02:43 PM
So after a bit of digging into unity and tweaking component settings I found out how to get this effect and it's super easy. This is literally all you do:
Here is what my 32 x 32 texture looks like when applied to a mesh by default:


What you need to do to preserve the pixels is select your texture then within the inspector, change the TextureType to Advanced. Toggle off "Generate Mip Maps" and change "Wrap Mode" to Clamp and "Filter Mode" to point. After you've done that, select the Default tab at the bottom of the options and you can change the max size to match your texture size if you want. What you NEED to do is change "format" to either Automatic 16 Bits or Automatic True Color If your sprite has transparency. Done! The result should look something like this:

Your answer