Built-in terrain shaders with splatmap support?

I wasn’t able to find any docs on this, but i wanted to double-check: are there any built-in terrain shaders with splatmap support? I’m using World Machine to build terrains and export 4K maps: a heightmap, a diffuse and a splatmap. The
diffuse on the entire terrain mesh allows me to have something similar to Megatexture terrain, with good amount of detail breaking up tiling and giving nice color variations. I then use the splatmap to create 4 material layers based on the RGBA values of the splatmap. Those material layers are normal materials. Here’s some more detail on the workflow:


Does PlayCanvas support this kind of workflow or has something similar?

Unfortunately, engine has no built-in terrain support.
It is possible to create such, while preserving existing lights system, by overriding shader chunks on material. You would need decent amount of “hacking” with shader chunks here, and while it is not publicly documented API, you shall be warned that chunks might change with time.

It is possible to build custom shaders too, that would take your heightmap in vertex shader to position vertices vertically, and you would need to make whole fragment shader with implementation of splatmap yourself.

1 Like