uSceneDepthMap not available despite camera having depth enabled

As part of a shader I’m working on, I need access to the depth map. For some reason, I can’t seem to get it to work. I’ve included a simple repro project that just tries to draw the depth map onto a plane and you’ll see that we get an error. I have enabled depth grabpass on the camera and it’s still not working.

Here’s the project: PlayCanvas 3D HTML5 Game Engine

The problem is that you have a light that is rendering a shadow map … and your object is casting shadow … but the camera depth is not available in shadow map. You can:
Disable shadow for the light.
Disable shadow casting for your model where you need depth map.