Terrain Preview shader not working on SRP (fix included)
Hey, I had some issues with the usages of terrain preview since I use the Universal Render Pipeline URP, I made a shader in Shader Graph based on the original shader in this project. If you find this useful feel free to adopt it/modify to fit the quality of this tool!
Steps to fix if you use URP/HDRP:
- Download and Import attached Shader Graph file.Terrain_Preview.shadergraph
- In MatrixPreview.cs on line 117. Change the line to: "terrainMat = new Material(Shader.Find("Shader Graphs/Terrain_Preview"));"
- In MatrixPreview.cs on line 170. Change the line to: "previewTerrain.drawInstanced = false;"
I could'nt let the terrain draw instanced, that's why I changed line 170 to false.
-------------------------------------------------------------------->
Steps to reproduce:
- Use any scriptable render pipeline.
- Click "Apply To Terrain" button from map magic editor.
Expected result: That the shader should render on all render pipelines.
Actual result: not