Lighting
Lighting is an important and non trivial part of creating shaders.
Built in
The library comes with some built in implementations of materials.
Lambert
The Lambert material implementation is highly efficient as it only calculated the light at each vertex. It can take a diffuse color and returns an RgbaNode.
Standard
The standard material is based on a physically based rendering approach and looks just like THREE.MeshStandardMaterial except it that it does not have features like metalness or refraction.
Creating your own
Light and shadow information is passed in by ThreeJS based on what exists in the scene and you can access them with uniforms. Check out the / for what predefined uniforms exist and for how to create new ones if some you need are missing.
Last updated