Book Image

Babylon.js Essentials

By : Julien Moreau-Mathis
Book Image

Babylon.js Essentials

By: Julien Moreau-Mathis

Overview of this book

Are you familiar with HTML5? Do you want to build exciting games and Web applications? Then explore the exciting world of game and Web development with one of the best frameworks out there: Babylon.JS. Starting from the beginning, the book introduces the required basics for 3D development and the knowledge you need to use the Babylon.js framework. It focuses on the simplicity provided by Babylon.js and uses a combination of theory and practice. All the chapters are provided with example files ready to run; each example file provides the previously learned features of the framework. Finally, developers will be ready to easily understand new features added to the framework in the future.
Table of Contents (15 chapters)
Babylon.js Essentials
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Discussing the awesome theory behind the materials


The materials are used to customize 3D objects appearance; however, behind them lie two programs called shaders. The goal of materials is to hide this notion of shaders and simply work with the values in the material object. In other words, the values in the material can be the emissive color of the object, the diffuse color, the transparency level and so on.

In fact, to go further with the theory, there are several types of shader, as shown in the following list:

  • Vertex Shader: This works directly on the 3D object geometry.
  • Pixel Shader: This works directly on the pixels on the screen.
  • Geometry Shader (not available on WebGL): This works on the 3D object geometry; however, here it is able to directly add polygons to the geometry of the 3D object according to the output of the vertex shader.
  • Compute Shader (not available on WebGL): This doesn't work directly on the 3D objects and pixels. It is just used to compute some user-defined data using...