Search Unity

[URP 11] Wanting a Render Feature to add an extra pass over Terrain.

Discussion in 'Universal Render Pipeline' started by Lehawk00, Oct 8, 2021.

  1. Lehawk00

    Lehawk00

    Joined:
    Aug 10, 2013
    Posts:
    3
    I'm not sure if it's a bug, was never possible or it requires special code to be able to have the render feature target a terrain's mesh with an overridden material. I was able to get it to work with meshes just fine. I made a special layer and set it up so everything in that layer should have the extra pass enabled using the Render Feature. Setting the terrain's layer, however, does nothing even when I delay the 2nd pass after everything else and disabled z-testing. This appears to occur with the "Render Objects" feature as well.

    What I'm trying to do, is to add a simple grid overlay that works over meshes and the terrain by using the global X and Z coordinates. It needs to be togglable, and the material needs its parameters to be modifiable at run time.

    What I can't do is upgrade to URP 12, at least until Unity 2012.2 comes out of beta. But if there is a way to do this in URP 11, that would be preferred. I also can't just add a layer to the terrain since the size, offset and color of the grid needs to change at runtime.

    As stated, I don't know if this is considered a bug, feature request or just requires special code to target the terrain mesh. None of the examples I found deal with terrains.
     
  2. Snagasson

    Snagasson

    Joined:
    Nov 18, 2018
    Posts:
    6
    I'm in the same boat, trying to display a hex grid over terrain. 2022.1.0b1. Did you find a solution for this?
     
  3. Lehawk00

    Lehawk00

    Joined:
    Aug 10, 2013
    Posts:
    3
    We haven't. I've moved onto a different feature for now, but the plan is to revisit this and try the URP 12 decal renderer feature.
     
  4. collinpatrick15

    collinpatrick15

    Joined:
    Nov 7, 2018
    Posts:
    38
    Did you ever find a solution for this? I'm running 2023.1 and am unable to get my grid material to display on a terrain using a rendering feature. Oddly enough, it will render on grass billboards, but not the terrain itself.