I want to extend a shader from THREE.ShaderLib, (THREE.ShaderLib.lambert)
THREE Version: 153.0
First I don’t change any thing:
var mat = new THREE.ShaderMaterial({
uniforms: THREE.UniformsUtils.clone( THREE.ShaderLib.lambert.uniforms ),
vertexShader: THREE.ShaderLib.lambert.vertexShader,
fragmentShader: THREE.ShaderLib.lambert.fragmentShader,
})
// assign to mesh
mesh.material = mat
Then I got an error:
So how to do it corretly?