[Solved] Terrain Layers not working with LWRP in upgraded project.

I’ve been googling around for a few hours and now I’ll just give up and ask…

I have a scene that I’ve upgraded to 2018.3.9f1. Unity created a folder called _TerrainAutoUpgrade and created new terrain layers. They show up with the wonderful pink broken shader color when viewed in the scene. The terrain layers themselves seem to be fine.

If I check under the terrain settings I see this:
4333732--390955--47a0af76ac5e09d09be3cd14ebc4543f.png

“Ok!” I say. “The terrain is using the Standard Shader. These need to use a LWRP compatible shader!”

But if I choose “Custom”, I can’t assign a shader, a slot appears and it apparently wants a MATERIAL!

I can put a material into that slot:
4333732--390961--17c8e6ae5a8692f42afe8932784f9ee8.png

But if I do, then the terrain is mapped 1:1 with the material (texture/shader) - which is ridiculous - and the system seems to ignore the terrain layers and the spat map.

How do I upgrade the terrain layers to use the LWRP so they work on the terrain?

P.S.: There is some talk about selecting “Draw Instanced” as a solution, but no: Draw Instanced simply makes the terrain invisible… and then the psychedelic artifacts come out when the scene view camera is moved.

Interesting: It seems that UPGRADED terrain may be broken!

This is an image of the inspector of a new terrain:

Notice that there is a “TerrainLit” material but no texture applied?

This is the image of the upgraded/converted terrain:

Between Settings and Terrain Layers there is NOTHING and no way to set or select the base shader.

Took me a while to notice that… :-/

I’ll try to find a workaround, but if anyone has any hints or suggestions, I’ll take them.

Figured it out.

The “TerrainLit” material needs to be added in the settings tab!
4336816--391312--e459cf87aa825519cb89b3946238bd89.png

Terrain Lit can be found in the packages that come with the LWRP here:
4336816--391315--375c088eb6a8aa547bf89eb07fe22de4.png

4 Likes

Glad the terrain shader is set up for LWRP, not so great that the Tree Creator shaders don’t work!

1 Like

Also works by creating a new material with the default shader “Lightweight Render Pipeline/Terrain/Lit” and linking it to the terrain in the debug inspector.

1 Like

thank you.

THANK YOU! This is the only thing that’s worked for me!!!

Thank you very much for this AMAZING information.

I want to add this little detail too. This little button is very important because it unhides package materials in asset picker window so you can see TerrainLit material.

5661850--589477--button.png

2 Likes

Thank you! Solved my problem!

i could fix the trees, the terrain but not the grass? how to fix that, there’s no way to change the shader of the grass, & the lwrp package doesn’t come with a grass shader anyway

Thank you, this helped me solve why my Terrain materials always kept reverting to Standard shader.

thank you so much you save my month