Hi! I’ve fiddled a bit with standard terrain shaders so i made them triplanar. Also it’s possible to adjust color multiplier of each individual texture. All works just like standard terrain shader, uses terrain maps, you just have to adjust tiling, offset and color of textures in the material. Summary it works just like standard shaders, but looks good on the cliffs and canyons.
UPD. I had to make them local normal mapped, because for some reasons world normals just won’t work in some conditions. I’m working on it.
Please tell me in the comments about it’s work. It seems like some people can’t get worldNormals in the shader and get textures streched allover. I’m fixing it right now.
I’re fixed the issues, changing the world normals to local normals. Still, normals inverted and some blending are not fully correct. If you have any ideas how to fix this, contact me pls. Main post archive updated.
Thanks, I figured out the issue. I’ve just started using Terrain Composer 2 and I didn’t notice I was slotting the material in the Editor view settings, once I put it on the Runtime view settings it started to work. It does look quite shiny though, is it using the alpha of the textures as the shininess or something? (Never mind I got it, I think).
Hi, first, thanks! I tried several free triplanar terrain shaders and yours are the best (others just didn’t work or were limited to 4 textures).
Now, I was wondering… how hard would it be to add Multi UV mixing, like shown in this thread? The method shown in there seems simple, but this are surface shaders, right? Should I modify the color variable in SplatmapFinalColor in the cginc or does it need to be done differently? Does anyone have any ideas?
I’m also struggling to get this to work. I have created a material with the supplied shaders, but when I slot this into the terrain, I hardly see a difference. Yes the terrain get a bit shinier, but I see no changes whatsoever on my cliffs.
If anyone has a suggestion that’d be much appreciated!
Make sure the shaders have compiled correctly. Unfortunately some critical shader errors don’t stay in the console like for regular scripting warnings. Click your shaders to make sure there are no red warnings in the inspector. If there are you’ll want to fix the error (common one for old shaders are some uninitialized variables, but you’ll usually find the fix easily in the internet for those).
Also, I think this is for forward rendering too, not deffered. I’m not really sure if there are any other requirements. I’ve encountered situations when the difference seems to be slight in some terrains, but work great on others. But, well, just like the OP said the shaders aren’t perfect. I’ve noticed it doesn’t work quite so well when the geometry is very extremely stretched (like very pointy and sharp peaks for example), in such cases the texture still seems to stretch a bit in those. It could also be a matter of size too I guess, I remember that the terrain where it looked the best was not that big, but I’m just guessing here…
PS: also remember to play with the scales for the UVs in the material, higher numbers (0.1, 0.2, etc) will give you better tiling in large terrains (default is too tiny).
PS2: for the shininess, just lower the alpha of the colors in the material (it’s using alpha as gloss), OR change to the specular version and just adjust the shininess slider.