Reputation: 7611
I see in various demos that you can use a shader like so:
shader = THREE.ShaderLib[ "normalmap" ];
What other shaders are in ShaderLib, and where is ShaderLib documented? It doesn't even seem to show up in the github repo.
Upvotes: 3
Views: 5047
Reputation: 7611
As of r.59, the three.js shaders available through ShaderLib are:
The shaders in ShaderLib are listed and defined here: https://github.com/mrdoob/three.js/blob/r59/src/renderers/WebGLShaders.js#L1936 – This includes their linked uniforms, as well as included shader shunks, and in a few cases, fragment and vertex shader definitions.
They are so far unmentioned in the documentation, and for some reason a search in the repo for ShaderLib turns up empty, apparently because of unexplained deficiencies with github search.
Upvotes: 4