The Hunt for a Good Mobile Unity Terrain Shader

Diary of an Indie Game Developer: Chapter 44

Jason Tuttle
4 min readFeb 28, 2019

Recently, I’ve been on a hunt for a good terrain shader for my game. The one that ships with Unity is pretty bare bones, so much so that, it doesn’t even support height based blending. What?!?

Since height based blending is pretty much a must for me, I knew the builtin shader wasn’t gonna cut it, so off to the Unity Asset Store I went to see what I could find. Turns out there are several good options. The ones that stood out were:

Complete Terrain Shader ($57)

Relief Terrain Pack ($40)

MegaSplat ($50)

MicroSplat (Free)

Looking at that list, given that MicroSplat was free, I decided to start there, and it did not disappoint. MicroSplat supports height based blending and is very performant on mobile. Did I mention it’s also free?!?

That said, I decided it was worth checking out the competition, so I bought both MegaSplat and the Complete Terrain Shader for testing. I probably would have ended up buying Relief Terrain Pack as well, but my experience with both MegaSplat and the Complete Terrain Shader was so bad, I decided to cut my losses and stick with MicroSplat.

What was so bad about the other shaders, you ask? Well, while they’re both very nice shaders, chock full of features, I was really surprised to find that they were dog slow. Maybe if I was developing for PC or console it wouldn’t matter that much, but on mobile, they were just not at all performant.

MicroSplat’s developer (Jason Booth) claims:

“MicroSplat uses a new shader technique to significantly optimize rendering of terrains with more than 4 textures. It outperforms shaders like CTS/RTP by over 300%, and is so fast you can turn on features like tessellation and triplanar texturing and still out perform most shaders by a wide margin.”

So, if MicroSplat is so good, why is it free? Well, turns out the core of MicroSplat is free, but the developer sells several modules that add additional advanced functionality to MicroSplat. It’s a pretty good deal, when you think about it. MicroSplat core is free and includes features like height based blending, so if you only need height based blending, you pay nothing.

That said, if there are any more advanced features you want, you only have to buy the modules you need, and they’re pretty cheap. One module in particular got my attention and it was only $12: Texture Clusters.

What problem does MicroSplat’s texture clusters solve, you ask? One of the things that always bothers me when texturing terrains is visible tiling:

In the screenshot above, the grass texture’s tiling is extremely visible. I really hate that!

There are, of course, ways to solve this problem. You could make a multilayered shader with several different grass texture layers. Then, you could manually paint your terrain, blending between those grass layer variants so as to minimize visible tiling. Another option is to strategically place items like trees, rocks, etc. on your terrain so as to hide the tiling.

Both of those options require a lot of manual work though, and as I’ve said many times before, when you’re working as a lone gun indie game developer, time is your most valuable resource. Anytime you can find a way to eliminate manual work, you should do so!

So, what are MicroSplat’s texture clusters, and how to they help solve this tiling problem? Jason Booth describes them this way:

“While Unity Terrain is limited to 32 control textures, Texture Clustering turns each control texture into 3 textures which are height blended together and varied by noise. This creates a complex and procedural surface which doesn’t show tiling artifacts, and can have more variation than a standard texture. You can also use 3 smaller textures instead of one larger one, increasing quality and saving memory at the same time.”

If that sounds confusing, a picture should help clear things up:

Compare the screenshot above to the first screenshot, and the difference is like night and day. 3 different grass textures are blended together in such a way so as to pretty much eliminate tiling. Cool! And… No… Manual work!!

So, if you’re looking for a great free/low cost terrain shader for Unity, I definitely recommend you check out MicroSplat, especially if you’re developing for mobile.

See you next week…

P.S. If you’re interested in learning more about MicroSplat’s texture clusters, Jason Booth has an nice overview video you can check out here:

--

--

Jason Tuttle

Indie Game Developer. Formerly, Associate Environment Artist at Santa Monica Studio working on God of War. In a previous life, I was the IT guy at TED.