Shaders - Tile Free Texturing

/
0 Comments
Tiling is a common technique to texture terrains, but suffer from repetition, as it IS the same texture repeated a lot of times. How can this be improved? You could add multiple textures, but that doesn't scale well when the number of textures increase. So what's the other option? Use the same texture, but make it LOOK different.

I accomplished that by creating a small 3D Noise texture ( 16 x 16 x 16 ) which I then sample in the pixel shader with the pixel world space position and a wrap sampler. By using multiples octaves, you get a nice noise. That noise is used as a mask to blend the same texture sampled at different sizes.
And there you go! Repetition is broken.
It could be improved a lot though. Some really good techniques are shown in GPU Gems 3, in a chapter about voxel-based terrains. Also that mask can be used to blend to different textures to achieve even more detail.

Here's a screenshot of the mask and of the final texture in my engine ( Fusion Engine ). Consider that there´s just one texture bound in the pixel shader.
Perlin, is that you?

Imagine this with some more textures...
I plan to add multiple textures in the near future ( next few days )


You may also like

No comments:

Pages

Powered by Blogger.