How to create a multiple textured terrain

I use this technique in my game also, found the stackoverflow question a couple of years back.
Here’s the result:
image
I’ve had a bit of an issue packing all 4 splat masks into a single PNG, didn’t find good tools for that. Instead, I load 4 separate grayscale masks and combine them into a single DataTexture inside the engine.

preview_2048
sand:
sand
dirt:
dirt
rock:
rock
grass:
grass

I only use diffuse textures. Based on some experiements, i came to a conclusion that even this already strains number of texture units, adding more makes your shader unusable on some of the lower-end mobile devices.

3 Likes