Log in or register to post comments

Depth Mask and Unity Terrain - Not occluding my terrain. Please help.

August 22, 2013 - 10:01pm #1

I have my Unity scene with the Vuforia AR camera set up. I have a plane with the Depth Mask shader applied to it. It is occluding everything Except my Unity terrain. So basically everything that is a mesh is occluded, but the Unity terrain seems to act differently. Does anyone know how to fix this? I have tried several methods.. and looked elsewhere online. 

I have attached a screenshot. Thanks

Depth Mask and Unity Terrain - Not occluding my terrain. Please

August 23, 2013 - 10:16am #5

Now that I am playing around with the terrain more. It does not seem to be the terrain that is not being occluded. It seems that it is the textures on the terrain. If I remove all textures it occludes as I would expect. As soon as I add textures it stops occluding. 

Depth Mask and Unity Terrain - Not occluding my terrain. Please

August 23, 2013 - 9:26am #4

No it's just a standard depth mask. Please report back if you find one that works w/ Terrains.

Depth Mask and Unity Terrain - Not occluding my terrain. Please

August 23, 2013 - 7:47am #3

Hi. Thanks for the links. I did not run across those while searching for an answer. The reason I posted here on the Vuforia forum is because I thought the Depth Mask shader I was using was from Vuforia and that it was specific for their ARCamera. I will try the Unity Depth Mask shader. 

Thanks again. 

Depth Mask and Unity Terrain - Not occluding my terrain. Please

August 23, 2013 - 7:40am #2

See: http://forum.unity3d.com/threads/12128-DepthMask-shader-on-the-Terrain

which leads to http://forum.unity3d.com/threads/7791-Hollowed-Mountain , which contains a sample.

But it's my understanding that it is possible to depth mask terrains, so it may be that the shader needs to be modified. Try posting to Unity Answers a/o their forum. Someone there will know.

Log in or register to post comments