Getting Depth for Tessellated and Translucent Material

My engine build currently has a bunch of stuff integrated, including nVidia’s WaveWorks, which I’m, obviously, using for my water rendering.

I’m trying to create a good shoreline response into the WaveWorks material, but I’m having difficulties grabbing the depth from the landscape inside the material since I can’t use the DepthFade node in the tessellated part of the material. WaveWorks is also too heavy to render twice (ie, a depth-only pass).

Are there any other methods I can employ to get the current depth from the landscape? I tried using the landscape’s height map, but I was having difficulties getting a reliable world position since WaveWorks uses an infinite plane to render according to camera position. :frowning:

Why you can’t use depth fade? Can you use SceneDepth and manually calculate fade?

If your landscape heightmap can fit in a 4k texture, then you could use the same technique Epic used in the Kite demo. They even have a handy material function called Landscape_Intersection_Blend that you could use in conjunction with the ActorPositionWS node.

You can’t use SceneDepth in a domain/hull shader.

This is brilliant; I’ll give this a shot.