Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microsoft HoloLens Developer???s Guide

You're reading from   Microsoft HoloLens Developer???s Guide A Complete Guide to HoloLens Application Development

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781786460851
Length 390 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Dennis Vroegop Dennis Vroegop
Author Profile Icon Dennis Vroegop
Dennis Vroegop
Arrow right icon
View More author details
Toc

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. You do this by right-clicking in the Assets pane and selecting the relevant menu options, as shown in the following screenshot:

Creating...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime