Normal Material


Playgound Example

PG: Normal Material

Using the normal material

Very simple :

var ground = BABYLON.MeshBuilder.CreateGround("ground", { width: 512, height: 512, subdivisions: 32 }, scene);
var normalMaterial = new BABYLON.NormalMaterial("normal", scene);
ground.material = normalMaterial;

Customize the normal material

You can add a diffuse texture to the normal material, because why not? Normal colors will be mixed with texture color.

normalMaterial.diffuseTexture = new BABYLON.Texture("textures/amiga.jpg", scene);