Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn ARCore - Fundamentals of Google ARCore

You're reading from  Learn ARCore - Fundamentals of Google ARCore

Product type Book
Published in Mar 2018
Publisher Packt
ISBN-13 9781788830409
Pages 274 pages
Edition 1st Edition
Languages
Toc

Table of Contents (17) Chapters close

Title Page
Packt Upsell
Contributors
Preface
1. Getting Started 2. ARCore on Android 3. ARCore on Unity 4. ARCore on the Web 5. Real-World Motion Tracking 6. Understanding the Environment 7. Light Estimation 8. Recognizing the Environment 9. Blending Light for Architectural Design 10. Mixing in Mixed Reality 11. Performance Tips and Troubleshooting 1. Other Books You May Enjoy Index

Cg/HLSL shaders


The shading language used in Unity is a variety of HLSL, or sometimes referred to as Cg. This shading variant provides two different forms of shaders: surface and vertex/fragment shaders. Now, coming from Android, this may sound confusing, since GLSL treats vertex and fragment shaders differently. However, variety of HLSL in Unity treats vertex and fragment shaders as the same, since they reside in the same file and are in the same workflow. A surface shader, which handles the lighting of our model, can be simple or quite complex. The Standard Unity surface shader uses a PBR lighting model, which is quite advanced and not supported on most mobile devices. This issue, combined with our limited ability to track scene lights, limits us to writing our own shaders in order to get our object lighting correct. ARCore provides us with a very simple surface shader that is used in the sample to light the Andy model. Let's open up Unity and take a look at what that shader looks like...

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 $15.99/month. Cancel anytime}