[SOLVED] Custom Passes for Unity Terrain

Hi,

how can I make Custom Passes make affect Unity Terrain?

Thanks. :slight_smile:

EDIT: The solution is to disable “Draw Instanced” in the Terrain Settings.

2 Likes

How to? :slight_smile:

Hello,

Is it possible to have more detail about your issue?

The FullScreenPass affects the color buffer so the terrain is included as long as it’s visible on the screen and from what I tested on terrain with DrawRenderers pass, it works correctly.

Hm, the Custom Pass does not affect my terrain. Only meshes with Lit shader or my custom graphs.

About my shader: I take the HD scene color node, apply my filters and add triplanar mapped texture onto it.

I tried to replicate your setup but it works for me: sfgq8l

Here’s the ShaderGraph I’m using:

Are you using the builtin unity terrain?

2 Likes

Hi, thanks for the reply, that looks interesting!

Yes, Unity terrain is used. We are on Unity 2019 LTS and HDRP 7.4.1.
I see you’re using Unity alpha. Could it be it does not work with our version?

EDIT: Ok, I found out, when “Draw Instanced” is enabled on Terrain, Custom Passes will not work. :hushed:

1 Like

Indeed, I managed to repro as well, I’ll add this to the list of things to fix, thanks for investigating the issue :slight_smile:

2 Likes

this issue still can be found on Unity 2020.3.18, when “Draw Instanced” is enabled on Terrain, Custom Pass will not work.

is there any workarounds for this?

Hate to repeat old post, but has anyone found any workaround? The issue is still there in 2022 LTS.