O'Reilly logo

Microsoft HoloLens Developer’s Guide by Dennis Vroegop

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Occlusion

We have covered a lot so far. However, we have not discussed one very important thing: how to hide virtual things behind physical things.

I have shown you the virtual puppy hiding behind my living room chair. How do we do this? The answer is: using the right kind of shader.

We have mentioned shaders before, but now it is time to delve a little bit more deeply into them.

In DirectX, we have a whole set of shaders: we have seen pixelshaders, geometryshaders, and vertexshaders. There are a lot more, but we will not go into those at all.

In Unity3D we only have one, simply called the shader. The shader we use is a property of the material we apply.

Let us create a new one. In our Unity3D project, create a new shader. Call it Occlusion. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required