Since unity 4.x you can have your own material assigned to the base terrain. This is great because I can just drag my own in there.
The problem is that once you hit the base distance, it flips to the default replacement shader.
In my case, I see the near terrain looking fine with my shader but the distant terrain is just blank, as if it failed to use any material.
What’s the trick/secret to get the terrain to either continue using my material after the base distance or use another one (maybe regular diffuse) instead of switching to black?
I suspect it depends how you’re sending the textures to your shader. So long as you’re using the same property name for the texture as the original terrain shader uses, it should hopefully pick them up.
Yep and it picks them up in the near distance but it seems it automatically switches to a different shader when far away and it is not picking the base texture for that one
I do
this is my shader, it works fine on near distance, then it goes black on far… i don’t know what step i’m missing for the terrain to replace the far one correctly:
Unity uses a different shader for rendering the basemap (low res terrain). However you can supply your own shader by setting it as a dependency in the first-pass shader. For example, in my terrain shaders I require a custom AddPass and Basemap so add these lines to the bottom of the shader (I place them just above the fallback directive)
However, if you just want your one shader to always be used then you could simply set the basemap distance - in the terrain inspector - to very far away so the basemap version of the terrain is never rendered.