|
|
преди 10 години | |
|---|---|---|
| .. | ||
| babylon.normalMaterial.ts | преди 10 години | |
| normal.fragment.fx | преди 10 години | |
| normal.vertex.fx | преди 10 години | |
| readme.md | преди 10 години | |
Very simple
var ground = BABYLON.Mesh.CreateGround("ground", 512, 512, 32, scene);
var normalMaterial = new BABYLON.NormalMaterial("normal", scene);
ground.material = normalMaterial;
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);