- Home /
How can I make a transparent ground, that hides other objects beneath it?
I am making AR App. I'm in trouble with an animation that pond is created, fish come up and goes down and disappear. I did the rest of it but the fish is visible under the pond. Since it's an AR App, the whole animation shouldn't just cover the Screen. So what I thought is, I should just make a totally transparent plane and make it hide objects underneath it.(make other objects under plane invisible.) (Maybe just render upper parts of plane?) But I really couldn't figure out how to do it. Is there anyway to do it?
Answer by Lazp_Very · Nov 27, 2020 at 11:33 PM
I found the solution here https://gamedev.stackexchange.com/questions/172656/how-to-hide-objects-behind-an-invisible-plane
i needed custom shader
Shader "Custom/DepthReserve"
{
Properties
{
}
SubShader
{
Tags { "RenderType" = "Opaque" "Queue"="Geometry-1" }
LOD 100
Blend Zero One
Pass
{
}
}
}
Applying this shader to material, any object can be transparent and also hide other object beneath it.