Is there a way to preview functions that use scene depth?

Hi Folks,

I’m having trouble working with functions that use scene depth.

I get the error ‘Only transparent or postprocess materials can read from scene depth’

But there is no way to set a function to preview as translucent as far as I can tell.

Is there any solution for this?